* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 4% 0%, rgba(255, 90, 72, 0.22), transparent 18rem),
    radial-gradient(circle at 96% 100%, rgba(79, 48, 234, 0.18), transparent 18rem),
    #f8f9ff;
  color: #10205a;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.game-page {
  position: relative;
  isolation: isolate;
  --math-shift-soft: 0px;
  --math-shift-deep: 0px;
  min-height: 100vh;
  overflow: hidden;
}

.math-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.math-symbol {
  position: absolute;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  font-size: 4.2rem;
  font-weight: 950;
  line-height: 1;
  opacity: 0.16;
  text-shadow: 0 18px 45px rgba(75, 55, 232, 0.08);
}

.math-symbol.plus { color: #2cad4f; }
.math-symbol.minus { color: #0878cf; }
.math-symbol.multiply { color: #7a42bf; }
.math-symbol.divide { color: #f49a12; }

.math-symbol:nth-child(4n + 1) {
  transform: translate3d(0, calc(var(--math-shift-soft) * -1), 0) rotate(-3deg);
}

.math-symbol:nth-child(4n + 2) {
  transform: translate3d(0, var(--math-shift-soft), 0) rotate(4deg);
}

.math-symbol:nth-child(4n + 3) {
  transform: translate3d(0, calc(var(--math-shift-deep) * -1), 0) rotate(3deg);
}

.math-symbol:nth-child(4n) {
  transform: translate3d(0, var(--math-shift-deep), 0) rotate(5deg);
}

.math-symbol:nth-child(1) { left: 4%; top: 12%; }
.math-symbol:nth-child(2) { left: 24%; top: 24%; }
.math-symbol:nth-child(3) { left: 44%; top: 36%; }
.math-symbol:nth-child(4) { left: 64%; top: 48%; }
.math-symbol:nth-child(5) { left: 84%; top: 60%; }
.math-symbol:nth-child(6) { left: 14%; top: 72%; }
.math-symbol:nth-child(7) { left: 34%; top: 84%; }
.math-symbol:nth-child(8) { left: 74%; top: 8%; }
.math-symbol:nth-child(9) { left: 6%; top: 42%; }
.math-symbol:nth-child(10) { left: 28%; top: 54%; }
.math-symbol:nth-child(11) { left: 50%; top: 66%; }
.math-symbol:nth-child(12) { left: 72%; top: 78%; }
.math-symbol:nth-child(13) { left: 88%; top: 26%; }
.math-symbol:nth-child(14) { left: 18%; top: 6%; }
.math-symbol:nth-child(15) { left: 58%; top: 18%; }
.math-symbol:nth-child(16) { left: 92%; top: 90%; }

.game-header,
.game-hero,
.quick-stats,
.content-grid,
.method-section,
.leaderboard-section,
.ad-slot,
.final-cta,
.game-footer {
  width: 100%;
  padding-right: max(18px, calc((100vw - 1160px) / 2));
  padding-left: max(18px, calc((100vw - 1160px) / 2));
}

.game-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(16, 32, 90, 0.1);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

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

.game-brand img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: contain;
}

.game-brand span {
  display: grid;
  gap: 2px;
}

.game-brand strong {
  font-weight: 950;
}

.game-brand small,
.game-language,
.game-header nav a {
  color: #52617d;
  font-size: 0.86rem;
  font-weight: 850;
}

.game-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.game-header nav a {
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.game-header nav a:hover {
  background: #eef2ff;
  color: #4b37e8;
}

.game-language {
  display: grid;
  gap: 6px;
}

.game-language select {
  min-height: 38px;
  border: 1px solid rgba(16, 32, 90, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #10205a;
  font: inherit;
  padding: 0 10px;
}

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(360px, 1fr);
  align-items: center;
  gap: 52px;
  padding-top: 54px;
  padding-bottom: 28px;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #ff5948;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.hero-copy h1,
.info-panel h2,
.method-section h2,
.leaderboard-section h2,
.final-cta h2 {
  margin: 0;
  color: #10205a;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 13.5ch;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: clamp(2.35rem, 4.1vw, 3.55rem);
}

.hero-copy p:not(.eyebrow),
.info-panel p,
.method-section p,
.leaderboard-section p,
.final-cta p {
  color: #43516f;
  font-size: 1.04rem;
  font-weight: 720;
  line-height: 1.62;
}

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

.play-button,
.secondary-button {
  display: inline-grid;
  min-height: 52px;
  place-items: center;
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 950;
  text-decoration: none;
}

.play-button {
  background: linear-gradient(135deg, #ff5948, #4b37e8);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(75, 55, 232, 0.24);
}

.secondary-button {
  border: 1px solid rgba(16, 32, 90, 0.12);
  background: #ffffff;
  color: #10205a;
}

.hero-art {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(16, 32, 90, 0.12);
}

.hero-art a {
  display: block;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 120px;
  margin: 18px 0;
  border: 1px dashed rgba(16, 32, 90, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.ad-slot ins {
  min-height: inherit;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.quick-stats article,
.info-panel,
.leaderboard-card,
.final-cta {
  border: 1px solid rgba(16, 32, 90, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(16, 32, 90, 0.08);
}

.quick-stats article {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.quick-stats span {
  color: #61708d;
  font-size: 0.84rem;
  font-weight: 850;
}

.quick-stats strong {
  color: #4b37e8;
  font-size: 1.5rem;
}

.content-grid,
.method-section,
.leaderboard-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.info-panel,
.method-section,
.leaderboard-section,
.final-cta {
  padding-top: 30px;
  padding-bottom: 30px;
}

.info-panel {
  padding-right: 26px;
  padding-left: 26px;
}

.info-panel.accent {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 89, 72, 0.16), transparent 12rem),
    rgba(255, 255, 255, 0.9);
}

.method-section,
.leaderboard-section {
  align-items: center;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  border-radius: 8px;
  padding: 16px 18px;
  background: #ffffff;
  color: #10205a;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(16, 32, 90, 0.08);
}

.leaderboard-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.leaderboard-card div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 14px;
  background: #f4f7ff;
}

.leaderboard-card span {
  font-size: 1.45rem;
}

.leaderboard-card strong {
  color: #10205a;
}

.leaderboard-card em {
  color: #4b37e8;
  font-style: normal;
  font-weight: 950;
}

.final-cta {
  margin-top: 20px;
  margin-bottom: 28px;
  text-align: center;
}

.game-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 34px;
  background: #10205a;
}

.game-footer a {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 850;
  text-decoration: none;
}

.game-footer a:hover {
  color: #ffffff;
}

@media (max-width: 840px) {
  .game-header {
    align-items: stretch;
    flex-direction: column;
  }

  .game-header nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .game-header nav a {
    background: #f4f7ff;
    text-align: center;
  }

  .game-hero,
  .content-grid,
  .method-section,
  .leaderboard-section {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .game-header,
  .game-hero,
  .quick-stats,
  .content-grid,
  .method-section,
  .leaderboard-section,
  .ad-slot,
  .final-cta,
  .game-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .game-header nav {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .play-button,
  .secondary-button {
    width: 100%;
  }
}
