:root {
  --bg: #120c1c;
  --ink: #120b19;
  --panel: #1c1428;
  --panel-2: #241a33;
  --border: rgba(255,255,255,0.09);
  --text: #f6f0ff;
  --muted: #b3a6cc;
  --accent: #b08cff;
  --accent-2: #8b5cf6;
  --gold: #ffcf5c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); overflow-x: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 16px;
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }

/* animated backdrop (drawn by bg.js) */
#bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 35%, transparent 40%, rgba(8,4,14,.75) 100%); }
.nav, main { position: relative; z-index: 2; }

/* navbar: pill buttons with ink outlines */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; padding: 12px 24px;
  background: rgba(18,12,28,0.82); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink); box-shadow: 0 1px 0 rgba(176,140,255,.18);
}
.brand { font-size: 23px; font-weight: 900; letter-spacing: -.5px; paint-order: stroke fill; -webkit-text-stroke: 5px var(--ink);
  text-shadow: 0 3px 0 var(--ink), 0 0 16px rgba(176,140,255,.45); }
.brand span { color: var(--accent); }
.nav nav { display: flex; gap: 8px; }
.pill { padding: 7px 16px; border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--muted);
  background: rgba(255,255,255,.04); border: 2px solid var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 3px 0 var(--ink);
  transition: transform .1s, color .1s, background .1s; }
.pill:hover { color: var(--text); background: rgba(255,255,255,.08); transform: translateY(-1px); }
.pill:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 1px 0 var(--ink); }
.pill.primary { background: var(--accent-2); color: #fff; box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 3px 0 var(--ink); }

main { max-width: 1180px; margin: 0 auto; padding: 0 20px 90px; }

/* hero: chunky inked title like the in-game title cards */
.hero { text-align: center; padding: 64px 0 46px; position: relative; }
.hero h1 { font-weight: 900; font-size: clamp(54px, 9vw, 104px); margin: 0; letter-spacing: -2px; line-height: 1;
  paint-order: stroke fill; -webkit-text-stroke: 14px var(--ink);
  text-shadow: 0 8px 0 var(--ink), 0 0 40px rgba(176,140,255,.55), 0 0 90px rgba(139,92,246,.4);
  animation: float 6s ease-in-out infinite; }
.hero h1 .stroke > span { background: linear-gradient(180deg, #f3ecff 0%, #c9adff 40%, #9a6bff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 0; filter: drop-shadow(0 0 0 var(--ink)); position: relative; }
.hero h1 .stroke { position: relative; display: inline-block; }
.hero h1 .stroke::before { content: attr(data-t); position: absolute; inset: 0; z-index: -1; -webkit-text-stroke: 14px var(--ink); color: var(--ink);
  text-shadow: 0 8px 0 var(--ink), 0 0 40px rgba(176,140,255,.55), 0 0 90px rgba(139,92,246,.4); }
.hero p { margin: 18px auto 0; color: #d6cbea; font-size: 20px; font-weight: 600; max-width: 560px;
  display: inline-block; padding: 8px 20px; background: rgba(18,12,28,.7); border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 4px 0 var(--ink); }
@keyframes float { 50% { transform: translateY(-6px); } }
.sparkle { position: absolute; width: 14px; height: 14px; background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 6px rgba(255,207,92,.8)); animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .3; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }

/* section heading: a banner plaque */
.list-head { display: flex; justify-content: center; margin-bottom: 22px; }
.list-head h2 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #fff;
  padding: 8px 34px; background: linear-gradient(180deg, #2c2040, #1c1428); border: 3px solid var(--ink); border-radius: 6px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.1), 0 5px 0 var(--ink); position: relative;
  paint-order: stroke fill; -webkit-text-stroke: 4px var(--ink); }
.list-head h2::before, .list-head h2::after { content: ''; position: absolute; top: 50%; width: 46px; height: 3px; background: var(--ink); }
.list-head h2::before { right: 100%; } .list-head h2::after { left: 100%; }

/* game cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 440px)); justify-content: center; gap: 34px; perspective: 1200px; }
.card { --c: var(--accent-2); --c2: var(--gold); position: relative; border-radius: 18px; background: var(--panel); border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent), 0 8px 0 var(--ink), 0 18px 40px rgba(0,0,0,.5);
  transition: transform .18s ease-out, box-shadow .18s; transform-style: preserve-3d; will-change: transform; }
.card:hover { box-shadow: inset 0 0 0 2px var(--c), 0 10px 0 var(--ink), 0 0 50px color-mix(in srgb, var(--c) 45%, transparent), 0 24px 50px rgba(0,0,0,.55); }
.thumb { position: relative; display: block; aspect-ratio: 1.05; border-radius: 15px 15px 0 0; overflow: hidden; border-bottom: 3px solid var(--ink); }
.thumb .art { position: absolute; inset: -4%; background-size: cover; background-position: 70% center; transition: transform .35s ease-out; }
.card:hover .thumb .art { transform: scale(1.06); }
.thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(18,12,28,.7)); pointer-events: none; }
.thumb .shine { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.22), transparent 45%); opacity: 0; transition: opacity .2s; }
.card:hover .thumb .shine { opacity: 1; }
.badge { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--gold);
  background: rgba(18,12,28,.9); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.body { padding: 18px 20px 20px; }
.body h3 { margin: 0 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -.5px; paint-order: stroke fill; -webkit-text-stroke: 6px var(--ink);
  text-shadow: 0 4px 0 var(--ink); }
.body p { margin: 0 0 14px; font-size: 15.5px; color: var(--muted); line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.chip { font-size: 13px; font-weight: 800; padding: 3px 11px; border-radius: 999px; color: color-mix(in srgb, var(--c) 30%, #fff);
  background: color-mix(in srgb, var(--c) 18%, transparent); border: 2px solid var(--ink); }
.play { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px; border-radius: 12px;
  font-size: 22px; font-weight: 900; letter-spacing: .04em; color: #fff; background: var(--c); border: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.3), inset 0 -4px 0 rgba(0,0,0,.25), 0 5px 0 var(--ink);
  paint-order: stroke fill; -webkit-text-stroke: 5px var(--ink); transition: transform .08s, filter .12s; }
.play::before { content: ''; width: 0; height: 0; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent;
  filter: drop-shadow(0 0 0 var(--ink)) drop-shadow(1.5px 0 0 var(--ink)) drop-shadow(-1.5px 0 0 var(--ink)) drop-shadow(0 1.5px 0 var(--ink)) drop-shadow(0 -1.5px 0 var(--ink)); }
.play:hover { filter: brightness(1.12); }
.play:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255,255,255,.3), inset 0 -4px 0 rgba(0,0,0,.25), 0 1px 0 var(--ink); }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1, .hero h1 .stroke::before { -webkit-text-stroke-width: 9px; }
  .list-head h2::before, .list-head h2::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero h1, .sparkle { animation: none; } }
