:root {
  --bg: #0f1226;
  --bg-2: #171a3a;
  --card: #1e2246;
  --ink: #f2f4ff;
  --muted: #a6adda;
  --accent: #ffd13b;
  --accent-2: #ff5d73;
  --cyan: #38e8ff;
  --green: #45e07f;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, #2a2f66 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #3b1d4d 0%, transparent 55%),
    radial-gradient(700px 500px at 50% 110%, #1c2a52 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 34px 34px;
  z-index: 0;
}

.topbar, main, footer { position: relative; z-index: 1; }

a { color: inherit; }

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(15, 18, 38, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .3px;
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 18px rgba(255, 93, 115, .35);
  transition: transform .25s ease, box-shadow .25s ease;
}

.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 8px 22px rgba(255, 93, 115, .5);
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: color .15s ease, background .15s ease;
}

.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .1); }

/* ---------- hero ---------- */
.hero {
  padding: 54px 0 34px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 32px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-size: .72rem;
  color: #0f1226;
  background: linear-gradient(120deg, var(--accent), #ffb23b);
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(255, 209, 59, .25);
}

h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1.05;
  margin: 16px 0 12px;
  text-shadow: 0 2px 24px rgba(56, 232, 255, .12);
}

h1 .glow {
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 48ch;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ffae2b);
  color: #16182f;
  box-shadow: 0 10px 26px rgba(255, 209, 59, .28);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(255, 209, 59, .4); }
.btn:active { transform: translateY(-1px); }

.btn.ghost {
  background: rgba(255, 255, 255, .07);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, .18);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, .13);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.hero-art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #2b1d55, #10122b 60%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 18%, rgba(255, 209, 59, .18), transparent 70%);
  pointer-events: none;
}

.hero-art .road {
  position: absolute;
  inset: auto 0 0 0;
  height: 72%;
  background: #22243f;
  clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
}

.hero-art .dash {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10px;
  height: 14%;
  margin-left: -5px;
  background: var(--accent);
  border-radius: 4px;
  animation: zoom 1.1s linear infinite;
}

.hero-art .dash:nth-child(3) { animation-delay: .27s; }
.hero-art .dash:nth-child(4) { animation-delay: .55s; }
.hero-art .dash:nth-child(5) { animation-delay: .82s; }

@keyframes zoom {
  from { bottom: 72%; transform: scale(.25); opacity: .2; }
  to   { bottom: -14%; transform: scale(1.6); opacity: 1; }
}

.hero-art .sun {
  position: absolute;
  top: 12%;
  left: 50%;
  width: 120px;
  height: 120px;
  margin-left: -60px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  filter: blur(.4px);
  opacity: .9;
}

/* ---------- sections ---------- */
section { padding: 28px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

h2 {
  font-size: 1.6rem;
  margin: 0;
  position: relative;
  padding-left: 16px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--accent-2));
}

.section-head p { color: var(--muted); margin: 0; }

/* ---------- game grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 20px;
}

.card {
  background: linear-gradient(165deg, var(--card), #171a3a);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 209, 59, .25);
}

.thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(9, 11, 28, .55));
  pointer-events: none;
}

.card:hover .thumb { filter: brightness(1.08); }

.thumb span.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 18, 38, .8);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
}

.card-body { padding: 16px 16px 18px; }

.card-body h3 { margin: 0 0 6px; font-size: 1.12rem; }

.card-body p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.card-foot {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
}

.play-pill {
  background: linear-gradient(120deg, var(--green), #2fc96c);
  color: #0d2416;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(69, 224, 127, .25);
  transition: transform .15s ease;
}

.card:hover .play-pill { transform: scale(1.06); }

/* thumbnail art */
.art-highway { background: linear-gradient(180deg, #121634, #2b2f5e); }
.art-drift   { background: linear-gradient(135deg, #10261f, #1d4b3a); }
.art-moto    { background: linear-gradient(180deg, #3a1b3f, #8a3b5c); }
.art-tunnel  { background: linear-gradient(180deg, #0a1030, #113a6b); }
.art-rally   { background: linear-gradient(135deg, #3a2a12, #241708); }
.art-blaster { background: linear-gradient(180deg, #121634, #30204f); }
.art-space   { background: linear-gradient(180deg, #080a1e, #171b3f); }
.art-snake   { background: linear-gradient(135deg, #10132d, #1c2550); }
.art-sky     { background: linear-gradient(180deg, #0e1030, #2a2060); }
.art-bricks  { background: linear-gradient(180deg, #121533, #211846); }
.art-pong    { background: linear-gradient(135deg, #101333, #1b1f4a); }
.art-word    { background: linear-gradient(180deg, #0f1230, #231a48); }

.art-grid-cell {
  position: absolute;
  border-radius: 5px;
  background: var(--green);
  box-shadow: 0 0 10px rgba(69, 224, 127, .6);
}

.art-plat {
  position: absolute;
  height: 10px;
  border-radius: 5px;
  background: var(--green);
}

.art-brick {
  position: absolute;
  height: 14px;
  border-radius: 3px;
}

.art-paddle {
  position: absolute;
  width: 6%;
  height: 16%;
  border-radius: 4px;
}

.art-letters {
  position: absolute;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .5);
  font-size: .85rem;
}

.art-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #fff, transparent),
    radial-gradient(2px 2px at 70% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 65%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 55% 45%, #fff, transparent);
  opacity: .7;
}

.art-rock {
  position: absolute;
  aspect-ratio: 1;
  border: 2px solid #c9cdee;
  background: rgba(180, 186, 230, .12);
  border-radius: 38% 62% 55% 45% / 45% 40% 60% 55%;
}

.art-ship {
  position: absolute;
  left: 46%;
  top: 70%;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 16px solid var(--cyan);
  transform: rotate(-35deg);
}

.art-bolt {
  position: absolute;
  width: 5%;
  height: 16%;
  background: var(--accent);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(255, 209, 59, .7);
}

.art-track {
  position: absolute;
  inset: 20%;
  border: 3px dashed rgba(255, 255, 255, .28);
  border-radius: 40% 60% 55% 45% / 50%;
}

.art-dot {
  position: absolute;
  width: 14%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: rgba(255, 209, 59, .18);
}

.art-lanes, .art-lanes::before, .art-lanes::after {
  position: absolute;
  background: rgba(255, 255, 255, .22);
}

.art-lanes {
  inset: 0 46% 0 46%;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .5) 0 18px, transparent 18px 44px);
}

.art-car {
  position: absolute;
  width: 16%;
  aspect-ratio: 3 / 5;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--accent-2), #c42a46);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .25);
}

.art-car.b { background: linear-gradient(180deg, var(--cyan), #1f8fb0); }
.art-car.c { background: linear-gradient(180deg, var(--green), #1c8f4b); }

.art-oval {
  position: absolute;
  inset: 16%;
  border: 16px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
}

.art-hill {
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: #241029;
  border-radius: 60% 40% 0 0 / 70% 60% 0 0;
}

.art-rings {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 55%, transparent 8%, rgba(56, 232, 255, .25) 9%, transparent 11%),
    radial-gradient(circle at 50% 55%, transparent 18%, rgba(56, 232, 255, .2) 19%, transparent 22%),
    radial-gradient(circle at 50% 55%, transparent 32%, rgba(56, 232, 255, .15) 33%, transparent 37%);
}

/* ---------- info cards ---------- */
.info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.tile {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius);
  padding: 20px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.tile:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  transform: translateY(-2px);
}

.tile h3 { margin: 0 0 8px; font-size: 1.05rem; }
.tile p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .94rem; }

kbd {
  background: #0e1130;
  border: 1px solid rgba(255, 255, 255, .18);
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 2px 7px;
  font-family: inherit;
  font-size: .85em;
  font-weight: 700;
}

/* ---------- footer ---------- */
footer {
  margin-top: 30px;
  padding: 26px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-art { order: -1; }
}
