/* Ez Studio – Hollywood Prompt Engine card (dark, gold accent) */
/* eslint-disable */

const HWC = {
  ink:      '#0a0a0a',
  border:   'rgba(255,255,255,0.08)',
  borderHi: 'rgba(232,160,32,0.32)',
  fg:       '#f6f4ef',
  fg2:      'rgba(246,244,239,0.62)',
  fg3:      'rgba(246,244,239,0.4)',
  gold:     '#e8a020',
  goldSoft: 'rgba(232,160,32,0.10)',
};

function HWChip({ children }) {
  return (
    <span style={{
      display: 'inline-flex', alignItems: 'center', gap: 6,
      height: 22, padding: '0 9px',
      border: `1px solid ${HWC.border}`,
      borderRadius: 999,
      fontFamily: 'JetBrains Mono, monospace',
      fontSize: 9, letterSpacing: '0.1em', textTransform: 'uppercase',
      color: HWC.fg2, background: 'rgba(255,255,255,0.02)',
    }}>
      <span style={{ width: 4, height: 4, borderRadius: 999, background: HWC.gold, boxShadow: `0 0 6px ${HWC.gold}` }}/>
      {children}
    </span>
  );
}

function HollywoodCard({ T }) {
  const h = T.hw;
  return (
    <a
      href={`hollywood.html?lang=${(typeof window !== 'undefined' && window.__ezLang) || 'pt'}`}
      style={{ display: 'block', textDecoration: 'none', color: 'inherit' }}
      onMouseEnter={(e) => {
        const card = e.currentTarget.firstChild;
        card.style.borderColor = HWC.borderHi;
        card.style.transform = 'translateY(-2px)';
      }}
      onMouseLeave={(e) => {
        const card = e.currentTarget.firstChild;
        card.style.borderColor = HWC.border;
        card.style.transform = 'translateY(0)';
      }}
    >
      <div style={{
        position: 'relative',
        background: `radial-gradient(140% 100% at 100% 0%, rgba(232,160,32,0.09) 0%, rgba(232,160,32,0) 55%), ${HWC.ink}`,
        border: `1px solid ${HWC.border}`,
        borderRadius: 14,
        padding: '22px 22px',
        color: HWC.fg,
        fontFamily: 'Inter, sans-serif',
        overflow: 'hidden',
        boxShadow: '0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 40px -20px rgba(0,0,0,0.55)',
        transition: 'transform 0.25s cubic-bezier(0.2,0,0,1), border-color 0.25s',
        cursor: 'pointer',
        minHeight: 240,
        display: 'flex', flexDirection: 'column', gap: 14,
      }}>
        {/* Header */}
        <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
            <div style={{
              width: 46, height: 46, borderRadius: 11, overflow: 'hidden',
              border: `1px solid ${HWC.border}`,
              boxShadow: `0 12px 24px -10px rgba(0,0,0,0.6), 0 0 24px -6px rgba(232,160,32,0.28)`,
              flexShrink: 0,
            }}>
              <img src="assets/icon-hollywood.png" alt="Hollywood Prompt Engine" style={{ width: '100%', height: '100%', display: 'block' }}/>
            </div>
            <div>
              <div style={{ fontSize: 15, fontWeight: 500, color: HWC.fg, letterSpacing: '-0.01em' }}>{h.title}</div>
              <div style={{
                fontFamily: 'JetBrains Mono, monospace', fontSize: 9,
                letterSpacing: '0.2em', textTransform: 'uppercase',
                color: HWC.gold, marginTop: 3,
              }}>{h.kind}</div>
            </div>
          </div>
          <span style={{
            display: 'inline-flex', alignItems: 'center', gap: 5,
            fontSize: 9, fontFamily: 'JetBrains Mono, monospace',
            color: HWC.fg3, letterSpacing: '0.14em', textTransform: 'uppercase',
            whiteSpace: 'nowrap',
          }}>
            <span style={{ width: 5, height: 5, borderRadius: 999, background: HWC.gold, boxShadow: `0 0 8px ${HWC.gold}` }}/>
            {h.status}
          </span>
        </div>

        {/* Tagline */}
        <div style={{ fontSize: 14, fontWeight: 500, color: HWC.fg, letterSpacing: '-0.005em', lineHeight: 1.3 }}>
          {h.tagline}
        </div>

        {/* Description */}
        <p style={{ fontSize: 12, color: HWC.fg2, lineHeight: 1.55, margin: 0 }}>
          {h.desc}
        </p>

        {/* Chips */}
        <div style={{ display: 'flex', flexWrap: 'wrap', gap: 6, marginTop: 'auto' }}>
          {h.chips.map((c) => <HWChip key={c}>{c}</HWChip>)}
        </div>
      </div>
    </a>
  );
}

Object.assign(window, { HollywoodCard, HWChip, HWC });
