@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --fg: #e8f6ff;
  --dim: #6c8394;
  --accent: #ff4fd8;
  --bg: #04060a;
}

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, #10182a 0%, var(--bg) 70%);
  font-family: 'Press Start 2P', monospace;
  color: var(--fg);
  min-height: 100vh;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.22) 3px,
    rgba(0,0,0,0.22) 4px
  );
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.95; }
  50% { opacity: 1; }
  100% { opacity: 0.97; }
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 16px 32px;
}

header { text-align: center; margin-bottom: 48px; }

.insert { color: #fff27a; font-size: 11px; margin-bottom: 20px; text-shadow: 0 0 8px #fff27a; }

h1 {
  font-size: clamp(30px, 7vw, 56px);
  line-height: 1.3;
  letter-spacing: 6px;
}

.glow { color: var(--accent); text-shadow: 0 0 12px var(--accent), 0 0 44px var(--accent); }

.sub { margin-top: 20px; font-size: 11px; color: var(--dim); letter-spacing: 2px; }

.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.loading { grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--dim); }

.card {
  --c: #33ff33;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 22px 20px 24px;
  color: var(--c);
  text-decoration: none;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  border: 3px solid color-mix(in srgb, var(--c) 35%, transparent);
  border-radius: 14px;
  box-shadow: 0 0 24px color-mix(in srgb, var(--c) 12%, transparent);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--c);
  box-shadow: 0 0 40px color-mix(in srgb, var(--c) 35%, transparent);
  outline: none;
}

.screen {
  width: 100%;
  background: #000;
  border: 2px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-radius: 8px;
  padding: 10px;
}

.screen canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }

.card h2 {
  font-size: 16px;
  line-height: 1.5;
  text-shadow: 0 0 10px var(--c);
  hyphens: manual;
  overflow-wrap: anywhere;
}

.tagline { font-size: 9px; line-height: 1.8; color: var(--fg); opacity: 0.8; }

.scores { width: 100%; }
.scores h3 { font-size: 10px; margin-bottom: 10px; color: var(--fg); opacity: 0.7; }

.scores ol { list-style: none; font-size: 10px; }
.scores li {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
}
.scores li:nth-child(1) { color: #fff27a; text-shadow: 0 0 6px #fff27a; }
.scores li:nth-child(2) { color: #cccccc; }
.scores li:nth-child(3) { color: #cc8844; }
.scores li.empty { justify-content: center; color: var(--dim); text-shadow: none; }

.meta { font-size: 8px; line-height: 1.8; color: var(--dim); }

.play {
  margin-top: auto;
  font-size: 12px;
  padding: 12px 18px;
  border: 2px solid var(--c);
  border-radius: 6px;
  text-shadow: 0 0 6px var(--c);
}
.card:hover .play, .card:focus-visible .play { background: var(--c); color: #000; text-shadow: none; }

footer {
  margin-top: 56px;
  text-align: center;
  font-size: 8px;
  line-height: 2.4;
  color: var(--dim);
}
footer a { color: var(--dim); }

@media (max-width: 420px) {
  main { padding-top: 32px; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .scanlines, .blink { animation: none; }
  .card { transition: none; }
}
