// CyberX Battle Pass — Posters, season cover, merch mockups, promo

// ─────────────────────────────────────────────────────────────
// SEASON 1 COVER — vertical 1080×1920
// ─────────────────────────────────────────────────────────────
function SeasonCoverVertical({ width = 540 }) {
  const h = width * (1920 / 1080);
  return (
    <div style={{
      width, height: h, position: 'relative', overflow: 'hidden',
      background: CX.black, borderRadius: 12,
      fontFamily: FONT_DISPLAY, color: CX.white,
    }}>
      {/* Layered backgrounds */}
      <div style={{
        position: 'absolute', inset: 0,
        background: `
          radial-gradient(ellipse 80% 50% at 50% 20%, ${CX.bronze}55, transparent 70%),
          radial-gradient(ellipse 90% 40% at 30% 60%, ${CX.red}33, transparent 70%),
          radial-gradient(ellipse 70% 30% at 80% 90%, ${CX.red}22, transparent 70%),
          linear-gradient(180deg, #1a0f06 0%, ${CX.black} 50%, #200a0a 100%)
        `,
      }}/>
      {/* sparks */}
      {Array.from({ length: 50 }).map((_, i) => {
        const seed = i * 2654435761 % 1000;
        const left = (seed % 100);
        const top = ((seed * 31) % 100);
        const sz = ((seed * 17) % 4) + 1.5;
        return (
          <div key={i} style={{
            position: 'absolute', left: `${left}%`, top: `${top}%`,
            width: sz, height: sz, borderRadius: '50%',
            background: i % 3 === 0 ? CX.bronzeHi : CX.red,
            opacity: 0.7,
            boxShadow: `0 0 ${sz * 4}px ${i % 3 === 0 ? CX.bronzeHi : CX.red}`,
          }}/>
        );
      })}
      {/* Diagonal sweep */}
      <div style={{
        position: 'absolute', top: '40%', left: '-10%', right: '-10%', height: '20%',
        background: `linear-gradient(110deg, transparent 30%, ${CX.bronze}66 50%, transparent 70%)`,
        transform: 'rotate(-8deg)',
        filter: 'blur(20px)',
      }}/>

      {/* Top — logo */}
      <div style={{ position: 'absolute', top: '7%', left: 0, right: 0, textAlign: 'center' }}>
        <BPLogo width={width * 0.55}/>
      </div>

      {/* HUGE S1 */}
      <div style={{
        position: 'absolute', top: '24%', left: 0, right: 0, textAlign: 'center',
      }}>
        <div style={{
          fontSize: width * 0.65, lineHeight: 0.82, letterSpacing: '-0.05em',
          background: `linear-gradient(180deg, ${CX.bronzeHi} 0%, ${CX.bronze} 50%, #5a2a0d 100%)`,
          WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent',
          filter: `drop-shadow(0 0 24px ${CX.bronze}aa)`,
          fontWeight: 700,
        }}>S1</div>
        <div style={{
          marginTop: width * 0.02, fontSize: width * 0.05, color: CX.bronzeHi,
          letterSpacing: '0.32em', fontWeight: 600,
        }}>СЕЗОН ПЕРВЫЙ</div>
      </div>

      {/* Operation name */}
      <div style={{
        position: 'absolute', top: '64%', left: 0, right: 0, textAlign: 'center',
      }}>
        <div style={{ display: 'inline-flex', alignItems: 'center', gap: 8, marginBottom: 8 }}>
          <div style={{ width: 30, height: 2, background: CX.red, boxShadow: `0 0 8px ${CX.red}` }}/>
          <span style={{ fontSize: width * 0.022, letterSpacing: '0.3em', color: CX.white, fontWeight: 600 }}>ОПЕРАЦИЯ</span>
          <div style={{ width: 30, height: 2, background: CX.red, boxShadow: `0 0 8px ${CX.red}` }}/>
        </div>
        <div style={{
          fontSize: width * 0.14, lineHeight: 1, letterSpacing: '0.06em',
          color: CX.white, fontWeight: 700,
          textShadow: `0 0 24px ${CX.red}77`,
        }}>COPPER</div>
      </div>

      {/* Bottom meta */}
      <div style={{
        position: 'absolute', bottom: '6%', left: 0, right: 0, textAlign: 'center',
      }}>
        <div style={{
          display: 'inline-flex', gap: width * 0.04, padding: `${width * 0.025}px ${width * 0.04}px`,
          borderRadius: 8, background: 'rgba(255,255,255,0.04)',
          backdropFilter: 'blur(10px)',
          border: `1px solid rgba(255,255,255,0.1)`,
        }}>
          {[
            { l: 'ДНЕЙ', v: '90' },
            { l: 'УРОВНЕЙ', v: '30' },
            { l: 'НАГРАД', v: '60+' },
          ].map(s => (
            <div key={s.l} style={{ textAlign: 'center' }}>
              <div style={{ fontSize: width * 0.06, color: CX.white, lineHeight: 1, fontWeight: 700 }}>{s.v}</div>
              <div style={{ fontSize: width * 0.018, color: CX.textSec, marginTop: 4, letterSpacing: '0.2em' }}>{s.l}</div>
            </div>
          ))}
        </div>
        <div style={{
          marginTop: width * 0.035, fontSize: width * 0.022, color: CX.textSec,
          letterSpacing: '0.24em', fontFamily: FONT_MONO,
        }}>15.05.2026 — 12.08.2026 • CYBERX КОПЕЙСК</div>
      </div>

      {/* Corner red shadow */}
      <div style={{
        position: 'absolute', top: 0, right: 0, width: 8, height: '100%',
        background: `linear-gradient(180deg, transparent, ${CX.red}, transparent)`,
        boxShadow: `0 0 16px ${CX.red}`,
      }}/>
    </div>
  );
}

// Horizontal version
function SeasonCoverHorizontal({ width = 900 }) {
  const h = width * (1080 / 1920);
  return (
    <div style={{
      width, height: h, position: 'relative', overflow: 'hidden',
      background: CX.black, borderRadius: 12,
      fontFamily: FONT_DISPLAY, color: CX.white,
    }}>
      <div style={{
        position: 'absolute', inset: 0,
        background: `
          radial-gradient(ellipse 60% 80% at 25% 50%, ${CX.bronze}55, transparent 70%),
          radial-gradient(ellipse 50% 70% at 80% 60%, ${CX.red}33, transparent 70%),
          linear-gradient(135deg, #1a0f06 0%, ${CX.black} 60%, #200a0a 100%)
        `,
      }}/>
      {Array.from({ length: 40 }).map((_, i) => {
        const seed = i * 2654435761 % 1000;
        const left = (seed % 100);
        const top = ((seed * 31) % 100);
        const sz = ((seed * 17) % 3) + 1.5;
        return (
          <div key={i} style={{
            position: 'absolute', left: `${left}%`, top: `${top}%`,
            width: sz, height: sz, borderRadius: '50%',
            background: i % 3 === 0 ? CX.bronzeHi : CX.red,
            opacity: 0.7, boxShadow: `0 0 ${sz * 4}px ${i % 3 === 0 ? CX.bronzeHi : CX.red}`,
          }}/>
        );
      })}

      {/* Left big S1 */}
      <div style={{ position: 'absolute', left: '4%', top: '50%', transform: 'translateY(-50%)' }}>
        <div style={{
          fontSize: width * 0.32, lineHeight: 0.82, letterSpacing: '-0.05em',
          background: `linear-gradient(180deg, ${CX.bronzeHi} 0%, ${CX.bronze} 50%, #5a2a0d 100%)`,
          WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent',
          filter: `drop-shadow(0 0 24px ${CX.bronze}aa)`,
          fontWeight: 700,
        }}>S1</div>
      </div>

      {/* Right copy */}
      <div style={{ position: 'absolute', right: '5%', top: '50%', transform: 'translateY(-50%)', textAlign: 'right' }}>
        <BPLogo width={width * 0.3}/>
        <div style={{ marginTop: width * 0.025 }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 8, justifyContent: 'flex-end' }}>
            <div style={{ width: 24, height: 2, background: CX.red, boxShadow: `0 0 8px ${CX.red}` }}/>
            <span style={{ fontSize: width * 0.013, letterSpacing: '0.3em', color: CX.white, fontWeight: 600 }}>ОПЕРАЦИЯ</span>
          </div>
          <div style={{
            fontSize: width * 0.08, lineHeight: 1, letterSpacing: '0.06em',
            color: CX.white, fontWeight: 700, marginTop: 6,
            textShadow: `0 0 24px ${CX.red}77`,
          }}>COPPER</div>
          <div style={{ marginTop: 14, fontSize: width * 0.013, color: CX.textSec, letterSpacing: '0.24em', fontFamily: FONT_MONO }}>
            90 ДНЕЙ • 30 УРОВНЕЙ • 60+ НАГРАД
          </div>
        </div>
      </div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// VK Story (1080×1920) — half-vertical, recreates story format
// ─────────────────────────────────────────────────────────────
function VKStory({ width = 280 }) {
  const h = width * (1920 / 1080);
  return (
    <div style={{
      width, height: h, position: 'relative', overflow: 'hidden',
      background: CX.black, borderRadius: 18,
      fontFamily: FONT_DISPLAY, color: CX.white,
    }}>
      <div style={{
        position: 'absolute', inset: 0,
        background: `
          radial-gradient(ellipse at 50% 30%, ${CX.red}44, transparent 60%),
          radial-gradient(ellipse at 30% 80%, ${CX.bronze}33, transparent 60%),
          linear-gradient(180deg, ${CX.black}, #1a0606 70%, ${CX.black})
        `,
      }}/>
      {Array.from({ length: 30 }).map((_, i) => {
        const seed = i * 2654435761 % 1000;
        return (
          <div key={i} style={{
            position: 'absolute', left: `${seed % 100}%`, top: `${(seed * 31) % 100}%`,
            width: 2, height: 2, borderRadius: '50%',
            background: CX.bronzeHi, opacity: 0.7, boxShadow: `0 0 4px ${CX.bronzeHi}`,
          }}/>
        );
      })}

      {/* Top: small CyberX logo */}
      <div style={{ position: 'absolute', top: '8%', left: 0, right: 0, display: 'flex', justifyContent: 'center' }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 6, padding: '6px 10px', borderRadius: 999, background: 'rgba(255,255,255,0.06)', border: '1px solid rgba(255,255,255,0.1)' }}>
          <CXMark size={width * 0.07} color={CX.red} glow/>
          <span style={{ fontSize: width * 0.055, letterSpacing: '0.06em', color: CX.white }}>CYBER<span style={{ color: CX.red }}>X</span></span>
        </div>
      </div>

      {/* Center label */}
      <div style={{ position: 'absolute', top: '22%', left: 0, right: 0, textAlign: 'center' }}>
        <div style={{ fontSize: width * 0.05, color: CX.bronzeHi, letterSpacing: '0.32em', fontWeight: 600 }}>СТАРТУЕТ</div>
      </div>

      {/* HUGE BATTLE PASS */}
      <div style={{ position: 'absolute', top: '30%', left: 0, right: 0, textAlign: 'center' }}>
        <div style={{
          fontSize: width * 0.22, lineHeight: 0.9, letterSpacing: '0.02em',
          color: CX.white, fontWeight: 700, textShadow: `0 0 16px ${CX.red}88`,
        }}>BATTLE</div>
        <div style={{
          fontSize: width * 0.28, lineHeight: 0.9, letterSpacing: '-0.02em', marginTop: -8,
          background: `linear-gradient(180deg, #fff 0%, ${CX.red} 100%)`,
          WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent',
          fontWeight: 700,
        }}>PASS</div>
      </div>

      {/* Mid: 30 levels */}
      <div style={{ position: 'absolute', top: '60%', left: 0, right: 0, textAlign: 'center' }}>
        <div style={{
          fontSize: width * 0.4, lineHeight: 0.85, letterSpacing: '-0.05em',
          background: `linear-gradient(180deg, ${CX.bronzeHi}, ${CX.bronze} 50%, #5a2a0d)`,
          WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent',
          fontWeight: 700, filter: `drop-shadow(0 0 16px ${CX.bronze}88)`,
        }}>30</div>
        <div style={{
          marginTop: -10, fontSize: width * 0.06, color: CX.white, letterSpacing: '0.18em', fontWeight: 600,
        }}>УРОВНЕЙ НАГРАД</div>
      </div>

      {/* CTA button */}
      <div style={{ position: 'absolute', bottom: '12%', left: '8%', right: '8%' }}>
        <div style={{
          padding: `${width * 0.05}px`, borderRadius: 10,
          background: `linear-gradient(180deg, ${CX.red}, ${CX.redDeep})`,
          boxShadow: `0 8px 24px ${CX.red}77`,
          textAlign: 'center', fontSize: width * 0.06, letterSpacing: '0.16em',
          color: CX.white, fontWeight: 700,
        }}>СВАЙПНИ ВВЕРХ</div>
        <div style={{ marginTop: 8, textAlign: 'center', fontSize: width * 0.033, color: CX.textSec, letterSpacing: '0.2em' }}>
          15.05 — 12.08 • CYBERX КОПЕЙСК
        </div>
      </div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// VK Post (1080×1080)
// ─────────────────────────────────────────────────────────────
function VKPost({ width = 360 }) {
  return (
    <div style={{
      width, height: width, position: 'relative', overflow: 'hidden',
      background: CX.black, borderRadius: 14,
      fontFamily: FONT_DISPLAY,
    }}>
      <div style={{
        position: 'absolute', inset: 0,
        background: `
          radial-gradient(ellipse at 70% 30%, ${CX.red}44, transparent 60%),
          radial-gradient(ellipse at 20% 80%, ${CX.bronze}44, transparent 60%),
          linear-gradient(135deg, ${CX.black}, #1a0606 50%, #160a04)
        `,
      }}/>
      {Array.from({ length: 25 }).map((_, i) => {
        const seed = i * 2654435761 % 1000;
        return (
          <div key={i} style={{
            position: 'absolute', left: `${seed % 100}%`, top: `${(seed * 31) % 100}%`,
            width: 2, height: 2, borderRadius: '50%',
            background: CX.red, opacity: 0.5, boxShadow: `0 0 4px ${CX.red}`,
          }}/>
        );
      })}

      {/* Left text block */}
      <div style={{ position: 'absolute', left: '6%', top: '50%', transform: 'translateY(-50%)' }}>
        <div style={{ fontSize: width * 0.04, color: CX.bronzeHi, letterSpacing: '0.32em' }}>СЕЗОН 1 • 15 МАЯ</div>
        <div style={{
          marginTop: 8, fontSize: width * 0.13, lineHeight: 0.9, color: CX.white, letterSpacing: 0.02,
          textShadow: `0 0 14px ${CX.red}66`,
        }}>BATTLE</div>
        <div style={{
          fontSize: width * 0.18, lineHeight: 0.9, letterSpacing: '-0.02em',
          background: `linear-gradient(180deg, #fff, ${CX.red})`,
          WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent',
        }}>PASS</div>
        <div style={{ marginTop: 14, fontSize: width * 0.034, color: CX.white, letterSpacing: '0.18em' }}>
          ИГРАЙ • ВЫПОЛНЯЙ • ЗАБИРАЙ
        </div>
        <div style={{
          marginTop: 14, padding: `${width * 0.025}px ${width * 0.04}px`, borderRadius: 8,
          background: `linear-gradient(180deg, ${CX.red}, ${CX.redDeep})`,
          boxShadow: `0 6px 16px ${CX.red}77`,
          display: 'inline-block', fontSize: width * 0.038, letterSpacing: '0.14em', color: CX.white, fontWeight: 700,
        }}>ПОДРОБНОСТИ →</div>
      </div>

      {/* Right big S1 */}
      <div style={{ position: 'absolute', right: '-3%', top: '45%', transform: 'translateY(-50%)' }}>
        <div style={{
          fontSize: width * 0.55, lineHeight: 0.82, letterSpacing: '-0.05em',
          background: `linear-gradient(180deg, ${CX.bronzeHi} 0%, ${CX.bronze} 50%, #5a2a0d 100%)`,
          WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent',
          filter: `drop-shadow(0 0 16px ${CX.bronze}aa)`,
          fontWeight: 700,
        }}>S1</div>
      </div>

      {/* Bottom branding */}
      <div style={{ position: 'absolute', bottom: '6%', left: '6%', display: 'flex', alignItems: 'center', gap: 6 }}>
        <CXMark size={width * 0.05} color={CX.red} glow/>
        <span style={{ fontSize: width * 0.04, letterSpacing: '0.06em', color: CX.white }}>CYBER<span style={{ color: CX.red }}>X</span></span>
        <span style={{ fontSize: width * 0.026, letterSpacing: '0.18em', color: CX.textMute, marginLeft: 6 }}>КОПЕЙСК</span>
      </div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// MERCH — Hoodie
// ─────────────────────────────────────────────────────────────
function HoodieMock({ width = 280, back = false }) {
  return (
    <div style={{
      width, height: width * 1.2, background: '#0a0c11', borderRadius: 14,
      position: 'relative', overflow: 'hidden', padding: 30, boxSizing: 'border-box',
      border: `1px solid ${CX.line}`,
    }}>
      <svg width="100%" height="100%" viewBox="0 0 280 320">
        {/* hoodie shape */}
        <defs>
          <linearGradient id={`hood-${width}-${back}`} x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor="#1a1d24"/>
            <stop offset="1" stopColor="#0d0f14"/>
          </linearGradient>
        </defs>
        {/* Body */}
        <path d="M70 100 Q140 60 210 100 L240 130 L225 160 L225 290 L55 290 L55 160 L40 130 Z"
              fill={`url(#hood-${width}-${back})`} stroke="#2a2d35" strokeWidth="1.5"/>
        {/* Hood */}
        <path d="M100 100 Q140 50 180 100 L160 130 Q140 110 120 130 Z"
              fill="#15171c" stroke="#2a2d35" strokeWidth="1.5"/>
        {!back && (
          <>
            {/* Front pouch */}
            <path d="M90 200 L190 200 L195 270 L85 270 Z" fill="none" stroke="#2a2d35" strokeWidth="1"/>
            {/* Cords */}
            <line x1="130" y1="130" x2="128" y2="170" stroke="#2a2d35" strokeWidth="1.2"/>
            <line x1="150" y1="130" x2="152" y2="170" stroke="#2a2d35" strokeWidth="1.2"/>
            {/* Chest logo */}
            <g transform="translate(125 165)">
              <path d="M15 0 L28 6 L28 14 Q28 19 15 24 Q2 19 2 14 L2 6 Z" fill={CX.red}/>
              <path d="M8 10 L15 17 L22 10" stroke="#0D0F14" strokeWidth="1.8" fill="none"/>
              <path d="M22 17 L8 10 M8 17 L22 10" stroke="#0D0F14" strokeWidth="1.8" fill="none"/>
            </g>
            <text x="140" y="200" textAnchor="middle" fontFamily="Bebas Neue,sans-serif" fontSize="10" fill="#fff" letterSpacing="2">CYBERX</text>
          </>
        )}
        {!back ? null : (
          <>
            {/* Back: big BATTLE PASS S1 */}
            <text x="140" y="170" textAnchor="middle" fontFamily="Bebas Neue,sans-serif" fontSize="22" fill="#fff" letterSpacing="3">BATTLE PASS</text>
            <text x="140" y="220" textAnchor="middle" fontFamily="Bebas Neue,sans-serif" fontSize="56" fill={CX.red} letterSpacing="0" filter={`url(#glow-${width})`}>S1</text>
            <text x="140" y="250" textAnchor="middle" fontFamily="Bebas Neue,sans-serif" fontSize="9" fill="#888" letterSpacing="3">OPERATION COPPER</text>
            {/* Bronze stripe */}
            <line x1="100" y1="265" x2="180" y2="265" stroke={CX.bronze} strokeWidth="1.5"/>
            <defs>
              <filter id={`glow-${width}`}>
                <feGaussianBlur stdDeviation="3" result="b"/>
                <feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge>
              </filter>
            </defs>
          </>
        )}
        {/* Sleeves */}
        <path d="M55 160 L25 250 L55 250" fill={`url(#hood-${width}-${back})`} stroke="#2a2d35" strokeWidth="1.5"/>
        <path d="M225 160 L255 250 L225 250" fill={`url(#hood-${width}-${back})`} stroke="#2a2d35" strokeWidth="1.5"/>
      </svg>
      <div style={{
        position: 'absolute', bottom: 12, left: 16, fontFamily: FONT_MONO, fontSize: 10, color: CX.textMute, letterSpacing: 0.5,
      }}>HOODIE.CX_S1.{back ? 'BACK' : 'FRONT'}</div>
    </div>
  );
}

// T-shirt mock
function TshirtMock({ width = 260 }) {
  return (
    <div style={{ width, height: width * 1.15, background: '#0a0c11', borderRadius: 14, padding: 24, boxSizing: 'border-box', border: `1px solid ${CX.line}`, position: 'relative' }}>
      <svg width="100%" height="100%" viewBox="0 0 260 300">
        <defs>
          <linearGradient id={`ts-${width}`} x1="0" y1="0" x2="0" y2="1"><stop offset="0" stopColor="#22262f"/><stop offset="1" stopColor="#15171c"/></linearGradient>
        </defs>
        <path d="M70 60 L100 50 Q130 70 160 50 L190 60 L220 80 L200 110 L185 100 L185 270 L75 270 L75 100 L60 110 L40 80 Z"
              fill={`url(#ts-${width})`} stroke="#2a2d35" strokeWidth="1.5"/>
        {/* Center logo */}
        <g transform="translate(115 130)">
          <path d="M15 0 L28 6 L28 14 Q28 19 15 24 Q2 19 2 14 L2 6 Z" fill={CX.red}/>
          <path d="M8 10 L15 17 L22 10 M22 17 L8 10 M8 17 L22 10" stroke="#0D0F14" strokeWidth="1.8" fill="none"/>
        </g>
        <text x="130" y="180" textAnchor="middle" fontFamily="Bebas Neue,sans-serif" fontSize="14" fill="#fff" letterSpacing="3">CYBERX</text>
        <text x="130" y="200" textAnchor="middle" fontFamily="Bebas Neue,sans-serif" fontSize="8" fill={CX.bronze} letterSpacing="2">OPERATION COPPER • S1</text>
      </svg>
      <div style={{ position: 'absolute', bottom: 12, left: 14, fontFamily: FONT_MONO, fontSize: 10, color: CX.textMute, letterSpacing: 0.5 }}>TSHIRT.CX_S1</div>
    </div>
  );
}

// Mousepad
function MousepadMock({ width = 320 }) {
  return (
    <div style={{ width, height: width * 0.55, background: '#0a0c11', borderRadius: 14, padding: 18, boxSizing: 'border-box', border: `1px solid ${CX.line}`, position: 'relative' }}>
      <div style={{
        width: '100%', height: '100%', borderRadius: 6,
        background: `linear-gradient(135deg, ${CX.black}, #1a0606 60%, #2a0c0c)`,
        position: 'relative', overflow: 'hidden',
        border: `2px solid ${CX.red}`,
        boxShadow: `inset 0 0 30px ${CX.red}33, 0 0 16px ${CX.red}44`,
      }}>
        {Array.from({ length: 20 }).map((_, i) => {
          const seed = i * 2654435761 % 1000;
          return <div key={i} style={{
            position: 'absolute', left: `${seed % 100}%`, top: `${(seed * 31) % 100}%`,
            width: 2, height: 2, borderRadius: '50%', background: CX.bronzeHi, opacity: 0.6,
          }}/>;
        })}
        <div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 14 }}>
          <CXMark size={36} color={CX.red} glow/>
          <div>
            <div style={{ fontFamily: FONT_DISPLAY, fontSize: 30, letterSpacing: '0.08em', color: CX.white }}>CYBER<span style={{ color: CX.red }}>X</span></div>
            <div style={{ fontFamily: FONT_DISPLAY, fontSize: 11, letterSpacing: '0.24em', color: CX.bronzeHi, marginTop: 1 }}>BATTLE PASS • S1</div>
          </div>
        </div>
      </div>
      <div style={{ position: 'absolute', bottom: 2, left: 18, fontFamily: FONT_MONO, fontSize: 9.5, color: CX.textMute }}>MOUSEPAD.CX_S1 • 800×400</div>
    </div>
  );
}

// Sticker pack
function StickerPack({ width = 320 }) {
  const stickers = [
    { kind: 'mark' },
    { kind: 's1' },
    { kind: 'legend' },
    { kind: 'frag' },
  ];
  return (
    <div style={{
      width, height: width * 0.55, background: '#0a0c11', borderRadius: 14,
      padding: 16, boxSizing: 'border-box', border: `1px solid ${CX.line}`, position: 'relative',
      display: 'flex', alignItems: 'center', justifyContent: 'space-around',
    }}>
      {/* mark */}
      <svg width="62" height="62" viewBox="0 0 64 64" style={{ filter: `drop-shadow(0 4px 8px ${CX.red}44)` }}>
        <circle cx="32" cy="32" r="30" fill="#fff"/>
        <g transform="translate(16 14)">
          <path d="M16 2 L29 8 L29 18 Q29 24 16 30 Q3 24 3 18 L3 8 Z" fill={CX.red}/>
          <path d="M10 11 L16 17 L22 11 M10 23 L22 11 M22 23 L10 11" stroke="#0D0F14" strokeWidth="2.4" strokeLinecap="square" fill="none"/>
        </g>
      </svg>
      {/* S1 die-cut */}
      <div style={{ background: '#fff', padding: '6px 14px', borderRadius: 8, transform: 'rotate(-6deg)', boxShadow: `0 4px 12px ${CX.bronze}66` }}>
        <div style={{ fontFamily: FONT_DISPLAY, fontSize: 32, color: CX.bronze, letterSpacing: '-0.04em', lineHeight: 1 }}>S1</div>
        <div style={{ fontFamily: FONT_DISPLAY, fontSize: 8, color: '#3a2700', letterSpacing: '0.2em', marginTop: -3 }}>OP. COPPER</div>
      </div>
      {/* LEGEND */}
      <div style={{ background: `linear-gradient(135deg, ${CX.legend}, ${CX.legendHi})`, padding: '8px 12px', borderRadius: 6, transform: 'rotate(4deg)', boxShadow: `0 4px 12px ${CX.legend}66` }}>
        <div style={{ fontFamily: FONT_DISPLAY, fontSize: 18, color: '#fff', letterSpacing: '0.16em', lineHeight: 1, fontWeight: 700 }}>LEGEND</div>
      </div>
      {/* FRAG */}
      <div style={{
        background: '#fff', padding: '10px 12px', borderRadius: 6, transform: 'rotate(-3deg)',
        position: 'relative',
        border: `2px solid ${CX.black}`,
      }}>
        <div style={{ fontFamily: FONT_DISPLAY, fontSize: 20, color: CX.black, letterSpacing: '0.08em', lineHeight: 1 }}>FRAG</div>
        <div style={{ fontFamily: FONT_DISPLAY, fontSize: 10, color: CX.red, letterSpacing: '0.12em', marginTop: 2 }}>OR DIE</div>
      </div>

      <div style={{ position: 'absolute', bottom: 2, left: 16, fontFamily: FONT_MONO, fontSize: 9.5, color: CX.textMute }}>STICKERS.CX_S1 • 4× DIE-CUT</div>
    </div>
  );
}

// A3 Club Poster
function ClubPoster({ width = 280 }) {
  const h = width * 1.414; // A3 ratio
  return (
    <div style={{
      width, height: h, background: CX.black, borderRadius: 8, overflow: 'hidden',
      position: 'relative', boxShadow: '0 8px 24px rgba(0,0,0,0.5), 0 0 0 4px #1a1d24',
      fontFamily: FONT_DISPLAY, color: CX.white,
    }}>
      <div style={{
        position: 'absolute', inset: 0,
        background: `
          radial-gradient(ellipse at 50% 25%, ${CX.bronze}55, transparent 65%),
          radial-gradient(ellipse at 30% 75%, ${CX.red}44, transparent 60%),
          linear-gradient(180deg, #1a0f06, ${CX.black} 60%)
        `,
      }}/>
      {Array.from({ length: 35 }).map((_, i) => {
        const seed = i * 2654435761 % 1000;
        return <div key={i} style={{
          position: 'absolute', left: `${seed % 100}%`, top: `${(seed * 31) % 100}%`,
          width: 2, height: 2, borderRadius: '50%', background: CX.bronzeHi, opacity: 0.6, boxShadow: `0 0 4px ${CX.bronzeHi}`,
        }}/>;
      })}

      {/* Header */}
      <div style={{ position: 'absolute', top: '5%', left: 0, right: 0, textAlign: 'center' }}>
        <BPLogo width={width * 0.7}/>
      </div>

      {/* Big S1 */}
      <div style={{ position: 'absolute', top: '24%', left: 0, right: 0, textAlign: 'center' }}>
        <div style={{
          fontSize: width * 0.6, lineHeight: 0.82, letterSpacing: '-0.05em',
          background: `linear-gradient(180deg, ${CX.bronzeHi}, ${CX.bronze} 50%, #5a2a0d)`,
          WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent',
          filter: `drop-shadow(0 0 16px ${CX.bronze}99)`,
          fontWeight: 700,
        }}>S1</div>
        <div style={{ fontSize: width * 0.045, color: CX.bronzeHi, letterSpacing: '0.32em', marginTop: -4 }}>ОПЕРАЦИЯ COPPER</div>
      </div>

      {/* Hook copy */}
      <div style={{ position: 'absolute', top: '57%', left: '8%', right: '8%', textAlign: 'center' }}>
        <div style={{ fontSize: width * 0.06, color: CX.white, lineHeight: 1.1, letterSpacing: '0.04em' }}>
          ИГРАЙ. ЗАРАБАТЫВАЙ XP.<br/>
          ЗАБИРАЙ <span style={{ color: CX.red }}>МЕРЧ И ХУДИ.</span>
        </div>
        <div style={{ marginTop: 14, fontSize: width * 0.032, color: CX.textSec, letterSpacing: '0.08em', fontFamily: FONT_BODY }}>
          Каждый час в клубе, каждый чек в баре, каждый фраг в CS2 —<br/>
          теперь это XP. 30 уровней. 60+ наград. ДР под ключ на финале.
        </div>
      </div>

      {/* QR */}
      <div style={{ position: 'absolute', bottom: '6%', left: '50%', transform: 'translateX(-50%)', display: 'flex', alignItems: 'center', gap: 14 }}>
        <div style={{
          width: width * 0.22, height: width * 0.22, background: '#fff', borderRadius: 6,
          padding: 6, boxSizing: 'border-box',
          boxShadow: `0 4px 16px ${CX.red}66`,
        }}>
          <FakeQR size={width * 0.22 - 12}/>
        </div>
        <div>
          <div style={{ fontSize: width * 0.028, color: CX.bronzeHi, letterSpacing: '0.24em' }}>СКАНЬ КОД</div>
          <div style={{ fontSize: width * 0.045, color: CX.white, letterSpacing: '0.06em', marginTop: 2 }}>СТАНЬ LEGEND</div>
          <div style={{ fontSize: width * 0.025, color: CX.textSec, fontFamily: FONT_MONO, marginTop: 4 }}>cyberx.club/pass</div>
        </div>
      </div>
    </div>
  );
}

// Laptop sticker w/ QR
function LaptopSticker({ width = 220 }) {
  return (
    <div style={{
      width, height: width * 0.85, background: '#0a0c11', borderRadius: 14,
      padding: 18, boxSizing: 'border-box', border: `1px solid ${CX.line}`,
      position: 'relative',
    }}>
      <div style={{
        width: '100%', height: '100%', background: CX.black, borderRadius: 10,
        padding: 12, boxSizing: 'border-box', position: 'relative',
        border: `1.5px solid ${CX.red}`,
        boxShadow: `inset 0 0 16px ${CX.red}33, 0 4px 16px ${CX.red}55`,
        display: 'flex', alignItems: 'center', gap: 10,
      }}>
        <div style={{ width: 70, height: 70, background: '#fff', borderRadius: 4, padding: 4, boxSizing: 'border-box' }}>
          <FakeQR size={62}/>
        </div>
        <div style={{ flex: 1 }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
            <CXMark size={14} color={CX.red}/>
            <span style={{ fontFamily: FONT_DISPLAY, fontSize: 14, color: CX.white, letterSpacing: '0.06em' }}>CYBER<span style={{ color: CX.red }}>X</span></span>
          </div>
          <div style={{ marginTop: 6, fontFamily: FONT_DISPLAY, fontSize: 16, color: CX.bronzeHi, letterSpacing: '0.08em', lineHeight: 1 }}>BATTLE PASS</div>
          <div style={{ marginTop: 4, fontFamily: FONT_BODY, fontSize: 9, color: CX.textSec, lineHeight: 1.3 }}>
            Сканяй — получай 100 XP стартовых
          </div>
        </div>
      </div>
      <div style={{ position: 'absolute', bottom: 2, left: 18, fontFamily: FONT_MONO, fontSize: 9, color: CX.textMute }}>STICKER.LAPTOP_QR • 65×40mm</div>
    </div>
  );
}

// Fake QR using deterministic noise
function FakeQR({ size = 80 }) {
  const cells = 21;
  const cellSize = size / cells;
  const out = [];
  for (let y = 0; y < cells; y++) {
    for (let x = 0; x < cells; x++) {
      // Anchor squares
      const inAnchor = (x < 7 && y < 7) || (x >= cells - 7 && y < 7) || (x < 7 && y >= cells - 7);
      if (inAnchor) {
        const lx = x < 7 ? x : x - (cells - 7);
        const ly = y < 7 ? y : y - (cells - 7);
        const inOuter = lx === 0 || lx === 6 || ly === 0 || ly === 6;
        const inInner = lx >= 2 && lx <= 4 && ly >= 2 && ly <= 4;
        if (inOuter || inInner) out.push(<rect key={`a-${x}-${y}`} x={x*cellSize} y={y*cellSize} width={cellSize+0.2} height={cellSize+0.2} fill="#000"/>);
        continue;
      }
      const v = ((x*7+y*13+x*y) % 3 === 0);
      if (v) out.push(<rect key={`b-${x}-${y}`} x={x*cellSize} y={y*cellSize} width={cellSize+0.2} height={cellSize+0.2} fill="#000"/>);
    }
  }
  return <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>{out}</svg>;
}

Object.assign(window, {
  SeasonCoverVertical, SeasonCoverHorizontal,
  VKStory, VKPost,
  HoodieMock, TshirtMock, MousepadMock, StickerPack, ClubPoster, LaptopSticker, FakeQR,
});
