:root {
  --ink: #0e1726;
  --ink-2: #172033;
  --muted: #667085;
  --paper: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #d9e1ec;
  --night: #101827;
  --night-2: #18243a;
  --blue: #2f6df6;
  --cyan: #20c7d9;
  --green: #13a86b;
  --yellow: #f6c445;
  --pink: #e84d89;
  --orange: #f47a3d;
  --purple: #7a5cff;
  --teal: #0aa69f;
  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 24px 70px rgba(15, 23, 42, 0.14);
  --shadow-dark: 0 28px 80px rgba(2, 8, 23, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #0d1424 0, #0d1424 520px, #f5f7fb 520px, #f5f7fb 100%);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: relative;
  overflow: hidden;
  padding: 22px clamp(16px, 4vw, 48px) 52px;
  color: white;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(47, 109, 246, 0.25), transparent 38%),
    linear-gradient(245deg, rgba(32, 199, 217, 0.18), transparent 42%),
    linear-gradient(180deg, #101827, #141f34);
  z-index: -2;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 78%);
  z-index: -1;
}

.topbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: 0 16px 38px rgba(47, 109, 246, 0.34);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.brand small {
  color: #aebbd0;
  margin-top: 2px;
  font-size: 0.82rem;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.nav-links a {
  text-decoration: none;
  font-weight: 800;
  color: #d7deea;
  padding: 10px 13px;
  border-radius: 10px;
  transition: background 180ms ease, color 180ms ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.hero {
  max-width: 1200px;
  margin: 54px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.88fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  animation: riseIn 520ms ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
.hero-stat strong,
.progress-card strong {
  font-family: "Space Grotesk", "Inter", sans-serif;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7.5vw, 6.3rem);
  line-height: 0.92;
  letter-spacing: 0;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3.35rem);
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 0;
}

h3 {
  font-size: 1.08rem;
}

.hero-text {
  max-width: 690px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.75;
  color: #c4cedd;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.primary-action,
.secondary-action,
.play-link {
  min-height: 48px;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-action,
.play-link {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 16px 40px rgba(32, 199, 217, 0.24);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-action:hover,
.secondary-action:hover,
.play-link:hover {
  transform: translateY(-2px);
}

.hero-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(18px);
  animation: riseIn 680ms ease 100ms both;
}

.hero-panel-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d9e4f5;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-panel-label::after {
  content: "LIVE";
  color: #0d1424;
  background: var(--yellow);
  padding: 5px 8px;
  border-radius: 8px;
}

.sudoku-preview {
  grid-row: span 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  aspect-ratio: 1;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: #09111f;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sudoku-preview span {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 10px;
  background: #edf4ff;
  color: #0d1424;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1.05rem, 3vw, 2rem);
  font-weight: 800;
}

.sudoku-preview span:empty {
  background: rgba(47, 109, 246, 0.22);
  border: 1px solid rgba(123, 160, 255, 0.24);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stat strong {
  color: white;
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
  line-height: 1;
}

.hero-stat span {
  color: #b7c3d6;
  font-weight: 800;
  margin-top: 9px;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 52px;
}

.progress-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: -26px 0 54px;
  position: relative;
  z-index: 2;
}

.progress-card,
.why-grid article,
.game-card,
.achievement-item {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 225, 236, 0.86);
  box-shadow: var(--shadow-sm);
}

.progress-card {
  border-radius: 18px;
  padding: 22px;
}

.metric-label {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  display: block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.progress-card strong {
  font-size: 2rem;
  color: var(--ink);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

main .eyebrow {
  color: var(--blue);
}

.search-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 14px;
  min-width: min(380px, 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.search-box span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  display: block;
  padding: 5px 0 2px;
  color: var(--ink);
  background: transparent;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: #344054;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--night);
  border-color: var(--night);
  color: white;
  transform: translateY(-1px);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.game-card {
  border-radius: 20px;
  padding: 18px;
  min-height: 338px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--accent, var(--blue));
}

.game-card.featured {
  border-color: color-mix(in srgb, var(--accent, var(--blue)) 34%, var(--line));
  box-shadow: 0 20px 48px rgba(47, 109, 246, 0.18);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent, var(--blue)) 13%, white);
  color: var(--accent, var(--blue));
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 1.35rem;
}

.status-pill {
  background: #eef2f7;
  color: #344054;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.72rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pill.done {
  background: #dcfae6;
  color: #087443;
}

.game-card h3 {
  margin-bottom: 6px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.34rem;
}

.game-card p {
  color: #586579;
  line-height: 1.58;
  margin-bottom: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  background: #f6f8fb;
  border: 1px solid var(--line);
  color: #4b5565;
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.play-link {
  margin-top: 3px;
  background: var(--accent, var(--ink));
  color: white;
  box-shadow: none;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 34px;
  background: white;
  border-radius: 16px;
}

.why-section,
.achievements-section {
  margin-top: 64px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.why-grid article {
  border-radius: 18px;
  padding: 22px;
}

.why-grid h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.22rem;
}

.why-grid p {
  color: #586579;
  line-height: 1.65;
  margin-bottom: 0;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.achievement-item {
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.badge-dot {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #d9e1ec;
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  color: white;
  font-size: 0.76rem;
}

.achievement-item.unlocked .badge-dot {
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.achievement-item.locked {
  opacity: 0.64;
}

.achievement-item strong,
.achievement-item span {
  display: block;
}

.achievement-item strong {
  font-family: "Space Grotesk", "Inter", sans-serif;
}

.achievement-item span {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 2px;
}

.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  padding: 28px 18px 34px;
  background: #f8fafc;
}

.site-footer p {
  margin-bottom: 8px;
}

.site-footer p:last-child {
  margin-bottom: 0;
  color: var(--ink);
  font-weight: 800;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  body {
    background:
      linear-gradient(180deg, #0d1424 0, #0d1424 700px, #f5f7fb 700px, #f5f7fb 100%);
  }

  .hero,
  .progress-band,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .hero-board {
    max-width: 580px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .progress-band {
    margin-top: -18px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-bottom: 40px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .hero {
    margin-top: 42px;
  }

  .hero-board {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .sudoku-preview {
    grid-row: auto;
  }

  .hero-stat {
    min-height: 104px;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }
}
