:root {
  --bg: #0b0620;
  --panel: #1a1040;
  --ink: #e8f4ff;
  --dim: #8f88c0;
  --green: #39ff6a;
  --pink: #ff3fa4;
  --yellow: #ffe23f;
  --cyan: #3ff2ff;
  --orange: #ff8a3f;
  --shadow: #000;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'VT323', monospace;
  font-size: 22px;
  line-height: 1.25;
  min-height: 100vh;
  overflow-x: hidden;
  image-rendering: pixelated;
}
a { color: var(--cyan); }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.crt {
  pointer-events: none; position: fixed; inset: 0; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.22) 3px, rgba(0,0,0,0) 4px);
  box-shadow: inset 0 0 120px rgba(0,0,0,.75);
  animation: flicker .15s infinite;
}
@keyframes flicker { 0%{opacity:.95} 50%{opacity:1} 100%{opacity:.97} }
.top, .wrap, .foot { position: relative; z-index: 1; }

.top { text-align: center; padding: 28px 16px 0; }
.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(26px, 8vw, 64px);
  margin: 0; letter-spacing: 2px;
  text-shadow: 4px 4px 0 var(--shadow);
}
.logo span { display: inline-block; animation: bounce 1.4s steps(2) infinite; }
.logo span:nth-child(3n+1) { color: var(--pink); }
.logo span:nth-child(3n+2) { color: var(--yellow); }
.logo span:nth-child(3n)   { color: var(--green); }
.logo span:nth-child(2) { animation-delay: .1s } .logo span:nth-child(3) { animation-delay: .2s }
.logo span:nth-child(4) { animation-delay: .3s } .logo span:nth-child(5) { animation-delay: .4s }
.logo span:nth-child(6) { animation-delay: .5s } .logo span:nth-child(7) { animation-delay: .6s }
.logo span:nth-child(8) { animation-delay: .7s } .logo span:nth-child(9) { animation-delay: .8s }
@keyframes bounce { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.tag { color: var(--cyan); margin: 10px 0 16px; font-size: 22px; }

.marquee { border-top: 3px solid var(--pink); border-bottom: 3px solid var(--pink); background: #000; overflow: hidden; white-space: nowrap; }
.marquee-inner { display: inline-block; padding: 6px 0 6px 100%; animation: scroll 22s linear infinite; color: var(--yellow); font-size: 24px; }
@keyframes scroll { to { transform: translateX(-100%); } }

.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }
.section { font-family: 'Press Start 2P', monospace; font-size: 16px; color: var(--green); margin: 18px 0 16px; text-shadow: 2px 2px 0 var(--shadow); }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.cart {
  display: block; text-decoration: none; color: var(--ink);
  background: #3a3a46; border: 4px solid #000; padding: 10px 10px 12px;
  box-shadow: 6px 6px 0 #000, inset 0 0 0 3px #55556a;
  transition: transform .08s steps(2);
}
.cart.playable:hover, .cart.playable:focus-visible { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 #000, inset 0 0 0 3px var(--yellow); outline: none; }
.cart-screen { background: #7ec8e3; border: 3px solid #000; aspect-ratio: 5/3; display: grid; place-items: center; overflow: hidden; }
.cart-screen canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.cart.locked .cart-screen { background: #14142a; }
.q { font-family: 'Press Start 2P', monospace; font-size: 40px; color: #33335a; }
.cart-label { display: grid; gap: 4px; padding-top: 10px; }
.cart-no { color: var(--dim); font-size: 18px; }
.cart-title { font-family: 'Press Start 2P', monospace; font-size: 14px; color: var(--yellow); }
.cart.locked .cart-title { color: #66668a; }
.cart-desc { font-size: 20px; color: #cfd0e6; }
.cart-btn { justify-self: start; margin-top: 6px; font-family: 'Press Start 2P', monospace; font-size: 11px; background: var(--green); color: #000; padding: 6px 8px; border: 3px solid #000; }
.cart-btn.off { background: #55556a; color: #222; }

.discord-box, .counter-box {
  margin-top: 34px; background: var(--panel); border: 4px solid #000; box-shadow: 6px 6px 0 #000, inset 0 0 0 3px #3b2c86; padding: 18px; text-align: center;
}
.discord-box p { margin: 0 0 16px; }
.big-btn {
  display: inline-block; font-family: 'Press Start 2P', monospace; font-size: clamp(11px, 3vw, 15px); text-decoration: none;
  color: #fff; background: #5865f2; border: 4px solid #000; padding: 14px 16px; box-shadow: 5px 5px 0 #000;
}
.big-btn:hover { background: var(--pink); }
.big-btn:active { transform: translate(3px,3px); box-shadow: 2px 2px 0 #000; }
.counter-box { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 22px; }
.counter { font-family: 'Press Start 2P', monospace; background: #000; color: var(--green); padding: 8px 10px; letter-spacing: 4px; border: 3px inset #444; }

.foot { text-align: center; color: var(--dim); padding: 20px 16px 30px; font-size: 18px; }
.foot-sprite { width: 24px; height: 24px; vertical-align: middle; image-rendering: pixelated; }

@media (prefers-reduced-motion: reduce) {
  .logo span, .marquee-inner, .crt, .blink { animation: none; }
  .marquee-inner { padding-left: 16px; }
}
