:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #eef2ff;
  background: #0b0f16;
  --surface: #1a2332;
  --surface-strong: #0f172a;
  --surface-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.18);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #0f1419;
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: calc(100vh - var(--navbar-height, 64px));
  position: relative;
  display: flex;
  flex-direction: column;
}


.home-main {
  flex: 1;
}

.hero-wrapper {
  min-height: calc(72vh - var(--navbar-height, 64px));
  display: grid;
  place-items: start center;
  padding: 16px 24px 56px;
  text-align: center;
}

.hero-panel {
  width: min(100%, 720px);
  display: grid;
  gap: 28px;
  align-items: center;
  justify-items: center;
}

.hero-copy {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  object-fit: contain;
  color: #ffffff;
}

.hero-logo-svg {
  display: block;
  width: 300px;
  height: auto;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-panel h1 {
  margin: 0;
  font-size: clamp(2.4rem, 3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero-panel h2 {
  margin: 0;
}

.hero-description {
  margin: 16px auto 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-cta {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.button-secondary {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: #cbd5e1;
}

.button-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.2rem;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 40px rgba(16, 50, 93, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.button-play:hover,
.button-play:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 70px rgba(107, 89, 255, 0.28);
}


/* How to play */

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

.how-to-play {
  width: min(100%, 620px);
  margin: 56px auto 0;
  padding: 56px clamp(20px, 5vw, 32px) 32px;
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.how-to-play-title {
  margin: 0 0 24px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.howto-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
}

.howto-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
}

.howto-step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.95rem;
}

.howto-step-copy h3 {
  margin: 5px 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.howto-step-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.howto-example {
  margin: 34px 0 0;
}

.howto-example-caption {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.example-card {
  padding: 18px;
  border-radius: 18px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.example-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.example-card-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  padding: 6px;
  overflow: hidden;
  color: var(--accent);
  background: rgba(238, 242, 255, 0.956);
  border: 1px solid rgba(0, 51, 133, 0.22);
}

.example-card-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.example-card-avatar-fallback {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.example-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.example-card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 10px;
}

.example-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  min-width: 5rem;
}

.example-tile-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.example-tile-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.example-tile-badge {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.example-tile--correct {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.example-tile--correct .example-tile-badge {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
}

.example-tile--wrong {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.22);
}

.example-tile--wrong .example-tile-badge {
  background: rgba(234, 179, 8, 0.22);
  color: #debe1c;
}

.example-tile--higher {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.22);
}

.example-tile--higher .example-tile-badge {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.howto-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.88rem;
}

.howto-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.howto-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.howto-swatch--correct {
  background: rgba(34, 197, 94, 0.5);
}

.howto-swatch--wrong {
  background: rgba(234, 179, 8, 0.5);
}

.howto-swatch--hint {
  background: rgba(56, 189, 248, 0.5);
}

.howto-footnote {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.howto-footnote strong {
  color: #cbd5e1;
}

.howto-step,
.howto-example,
.howto-legend {
  animation: howtoRise 0.55s ease both;
}

.howto-step:nth-child(2) { animation-delay: 0.06s; }
.howto-step:nth-child(3) { animation-delay: 0.12s; }
.howto-step:nth-child(4) { animation-delay: 0.18s; }
.howto-example { animation-delay: 0.24s; }
.howto-legend { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .howto-step,
  .howto-example,
  .howto-legend {
    animation: none;
  }

  .button-play:hover,
  .button-play:focus-visible {
    transform: none;
  }
}

@media (min-width: 769px) {
  .hero-wrapper {
    padding-top: 38px;
    padding-bottom: 120px;
  }

  .how-to-play {
    margin-top: clamp(128px, 22vh, 280px);
    padding-top: 90px;
  }
}

@media (max-width: 768px) {
  .hero-wrapper {
    padding-top: 36px;
    padding-bottom: 40px;
  }

  .hero-panel {
    gap: 10px;
    padding-top: 0.5rem;
  }

  .hero-logo-svg {
    width: min(240px, 82vw);
    max-width: 240px;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-preview {
    padding: 22px;
    padding-bottom: 4rem;
  }

  .how-to-play {
    margin-top: clamp(220px, 48vh, 400px);
    padding-top: 40px;
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
  }

  .howto-example-caption {
    line-height: 1.55;
  }

  .example-card {
    padding: 16px;
  }

  .example-card-grid {
    gap: 8px;
  }
}
