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

:root {
  --pixel: "Press Start 2P", monospace;
}

html, body {
  height: 100%;
  background: radial-gradient(ellipse at 50% -10%, #2a1a5a 0%, #0b0a1a 55%, #05050a 100%);
  color: #e6e8ff;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow: hidden;
}

.bg-grid {
  position: fixed;
  inset: 45% -50% -50% -50%;
  background-image:
    linear-gradient(rgba(255, 60, 200, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 60, 200, 0.35) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(60deg);
  animation: grid 4s linear infinite;
  mask-image: linear-gradient(to bottom, transparent, black 40%);
  pointer-events: none;
}

@keyframes grid {
  to { background-position: 0 60px; }
}

.hub {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4vh;
  padding: 3vh 3vw;
}

header { text-align: center; }

h1 {
  font-family: var(--pixel);
  font-size: clamp(22px, 4.2vw, 56px);
  letter-spacing: 4px;
}

.neon {
  background: linear-gradient(90deg, #ff4fd8, #ffd84a, #4ff0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 80, 220, 0.6));
}

.sub {
  margin-top: 14px;
  font-size: clamp(13px, 1.4vw, 18px);
  letter-spacing: 6px;
  color: #b8b8ff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  width: min(1600px, 100%);
}

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
  position: relative;
  border-radius: 18px;
  padding: 10px 10px 16px;
  background: linear-gradient(160deg, #22224a, #121228);
  border: 2px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  outline: none;
}

.card canvas {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  border-radius: 12px;
  image-rendering: pixelated;
}

.card h2 {
  margin-top: 14px;
  font-size: clamp(15px, 1.5vw, 20px);
  text-align: center;
}

.card .en {
  display: block;
  margin-top: 8px;
  font-family: var(--pixel);
  font-size: clamp(8px, 0.75vw, 11px);
  text-align: center;
  color: #9aa0d8;
}

.card .tags {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.card .tags span {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #c8ccff;
}

.card.active {
  transform: translateY(-8px) scale(1.04);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 40px var(--accent), 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card.active::after {
  content: "▶ START";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--pixel);
  font-size: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #10101a;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: 0.4; }
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  font-size: 13px;
  color: #a8acd8;
}

.pad.on { color: #7dff9a; }

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  margin: 0 2px;
  border-radius: 5px;
  background: #23264a;
  border: 1px solid #3c4270;
  border-bottom-width: 3px;
  font-family: inherit;
  font-size: 12px;
  text-align: center;
  color: #eef;
}
