:root {
  color-scheme: light;
  --page: #f6f8fb;
  --white: #ffffff;
  --ink: #142033;
  --muted: #5e6f86;
  --line: #dce8f4;
  --blue: #08aeea;
  --blue-dark: #0878b8;
  --gold: #f3b62f;
  --gold-soft: #fff3cb;
  --sky: #eaf8ff;
  --shadow: 0 18px 45px rgba(23, 43, 77, 0.12);
  --soft-shadow: 0 10px 26px rgba(23, 43, 77, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 4%, rgba(8, 174, 234, 0.16), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(243, 182, 47, 0.16), transparent 24rem),
    linear-gradient(180deg, #ffffff 0%, var(--page) 62%, #eef6fb 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(124deg, transparent 0 50%, rgba(8, 174, 234, 0.08) 50.2%, transparent 51.2%),
    linear-gradient(58deg, transparent 0 66%, rgba(243, 182, 47, 0.1) 66.2%, transparent 67.2%);
}

img,
canvas {
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 0.55rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(220, 232, 244, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 132px;
  text-decoration: none;
}

.brand img {
  display: block;
  width: min(156px, 38vw);
  height: 58px;
  object-fit: contain;
}

.main-nav,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.main-nav {
  justify-content: flex-end;
}

.main-nav a,
.footer-links a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 780;
  padding: 0.45rem 0.68rem;
  text-decoration: none;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--blue-dark);
  background: rgba(8, 174, 234, 0.1);
}

.hero {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.4rem, 5vw, 4rem) 0 2rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-media {
  position: relative;
  min-width: 0;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 8% 6% 10%;
  border-radius: 28px;
  background:
    radial-gradient(circle, rgba(8, 174, 234, 0.25), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(234, 248, 255, 0.75));
  filter: blur(4px);
}

.hero-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(520px, 100%);
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--blue-dark);
  font-size: 0.8rem;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.55rem, 7vw, 5.4rem);
  line-height: 0.95;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.1;
}

h3 {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
  line-height: 1.25;
}

p {
  margin: 0;
}

.lead {
  max-width: 64ch;
  margin: 1rem 0 1.25rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.button,
button.button {
  min-height: 44px;
  border: 1px solid rgba(8, 120, 184, 0.25);
  border-radius: 8px;
  background: linear-gradient(180deg, #20c6ff, #0878b8);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1rem;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(8, 120, 184, 0.22);
}

.button.gold,
button.button.gold {
  border-color: rgba(204, 139, 24, 0.34);
  background: linear-gradient(180deg, #ffe48b, #f3b62f);
  color: #271800;
  box-shadow: 0 12px 28px rgba(243, 182, 47, 0.24);
}

.button.secondary,
button.button.secondary {
  background: #ffffff;
  color: var(--blue-dark);
  box-shadow: none;
}

.button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.58;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.fact,
.card,
.feature-card,
.review-box,
.faq-item,
.notice,
.game-shell,
.form-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.fact {
  padding: 0.85rem;
}

.fact strong,
.fact span {
  display: block;
}

.fact span {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.2rem, 6vw, 4.5rem) 0;
}

.section.narrow {
  width: min(880px, calc(100% - 2rem));
}

.game-shell {
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(243, 182, 47, 0.18), transparent 18rem),
    radial-gradient(circle at 90% 5%, rgba(8, 174, 234, 0.18), transparent 18rem),
    #ffffff;
}

.game-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1rem;
}

.hud {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 0.55rem;
}

.hud div {
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sky);
  text-align: center;
}

.hud span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  margin-top: 0.08rem;
  color: var(--blue-dark);
  font-size: 1.35rem;
  line-height: 1;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 300px;
  max-height: min(70vh, 560px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7fbff;
  touch-action: none;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.game-message {
  position: absolute;
  inset: auto 1rem 1rem;
  display: none;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(8, 120, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}

.game-message.is-visible {
  display: block;
}

.game-message strong,
.game-message span {
  display: block;
}

.game-message span {
  color: var(--muted);
}

.game-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
}

.control-buttons,
.touch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.touch-controls button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  border: 1px solid rgba(8, 120, 184, 0.28);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}

.notice {
  margin: 1rem;
  padding: 0.9rem 1rem;
  border-color: rgba(243, 182, 47, 0.45);
  background: var(--gold-soft);
  color: #5d4105;
}

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

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.card,
.feature-card,
.review-box,
.form-shell {
  padding: 1.1rem;
}

.card p,
.feature-card p,
.review-box p,
.faq-item p,
.legal-content p,
.legal-content li {
  color: var(--muted);
}

.feature-card strong {
  color: var(--blue-dark);
}

.feature-card:nth-child(even) strong {
  color: #9b690d;
}

.steps {
  counter-reset: steps;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: steps;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.steps li::before {
  content: counter(steps);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #20c6ff, #0878b8);
  color: #ffffff;
  font-weight: 900;
}

.review-box {
  display: grid;
  gap: 0.8rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  padding: 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 820;
}

.faq-item p {
  margin-top: 0.65rem;
}

.page-hero {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.6rem, 7vw, 5rem) 0 clamp(1.4rem, 4vw, 2.4rem);
}

.page-hero h1 {
  max-width: 14ch;
}

.legal-content {
  display: grid;
  gap: 1rem;
}

.legal-content ul {
  margin: 0;
  padding-left: 1.2rem;
}

.form-shell {
  display: grid;
  gap: 0.85rem;
}

.form-shell label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
}

.form-shell input,
.form-shell textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0.72rem 0.8rem;
}

.form-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.35rem 0;
}

.footer-brand {
  display: grid;
  gap: 0.2rem;
}

.footer-brand strong {
  color: var(--blue-dark);
}

.footer-brand span {
  color: var(--muted);
}

@media (max-width: 940px) {
  .site-header,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav,
  .footer-links {
    justify-content: flex-start;
  }

  .hero-layout,
  .two-col {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .site-header {
    position: relative;
  }

  .brand img {
    width: 136px;
    height: 50px;
  }

  .main-nav a,
  .footer-links a {
    padding: 0.42rem 0.5rem;
  }

  .hero,
  .section,
  .page-hero,
  .section.narrow {
    width: min(100% - 1rem, 1120px);
  }

  .hero-media {
    order: -1;
  }

  .facts,
  .grid,
  .steps,
  .game-head,
  .hud {
    grid-template-columns: 1fr;
  }

  .canvas-wrap {
    min-height: 280px;
    aspect-ratio: 10 / 12;
  }

  .game-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .control-buttons,
  .touch-controls {
    width: 100%;
  }

  .control-buttons .button,
  .touch-controls button {
    flex: 1 1 auto;
  }
}
