:root {
  --bg-top: #b8f4ff;
  --bg-bottom: #fff8df;
  --panel: rgba(255, 255, 255, 0.7);
  --panel-strong: rgba(255, 255, 255, 0.86);
  --line: rgba(72, 170, 216, 0.2);
  --text: #18405a;
  --muted: #4f7690;
  --cyan: #2cb6e8;
  --blue: #4f8fff;
  --cyan-deep: #42d7d8;
  --accent: #ffb347;
  --accent-soft: #ff7aa8;
  --shadow: 0 24px 65px rgba(66, 125, 160, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 214, 115, 0.55), transparent 24%),
    radial-gradient(circle at 84% 10%, rgba(91, 193, 255, 0.42), transparent 24%),
    linear-gradient(180deg, #bff6ff 0%, #d6fbff 36%, #fff7db 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.26), transparent 30%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12) 0,
      rgba(255, 255, 255, 0.12) 1px,
      transparent 1px,
      transparent 140px
    );
  opacity: 0.42;
}

.page-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 28px 42px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.46), transparent 32%),
    linear-gradient(135deg, rgba(114, 229, 255, 0.92), rgba(93, 160, 255, 0.84) 42%, rgba(255, 212, 120, 0.82) 100%);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% 15%;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 194, 92, 0.26), transparent 60%);
  filter: blur(50px);
  z-index: -1;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 10%;
  background: linear-gradient(135deg, #ffd86f, #ff8fb1);
  box-shadow: 0 0 18px rgba(255, 173, 104, 0.55);
}

.brand-text,
.nav-links a,
.eyebrow,
.button,
.section-tag,
.card-label,
.toolbar-label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-text,
.nav-links a,
.button,
.section-tag {
  font-family: "Baloo 2", sans-serif;
}

.brand-text {
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  line-height: 1.05;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  max-width: 100%;
}

.nav-links a {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #24516b;
  text-decoration: none;
  font-size: 0.98rem;
  background: rgba(255, 255, 255, 0.28);
  transition: 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.54);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  padding: 76px 0 14px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: #fff8ff;
  font-size: 0.92rem;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.96;
  max-width: 11ch;
  color: #fffef8;
  text-shadow: 0 6px 22px rgba(57, 117, 176, 0.18);
}

.hero-copy p,
.section-heading p,
.support-tile span {
  color: var(--muted);
  line-height: 1.5;
}

.hero-copy p {
  max-width: 54ch;
  margin: 18px 0 0;
  font-size: 1.16rem;
  color: rgba(255, 255, 255, 0.92);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: #78430a;
  background: linear-gradient(135deg, #fff5c4, #ffc86f);
  box-shadow: 0 12px 30px rgba(255, 187, 87, 0.32);
}

.button.secondary {
  color: #fffef8;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.hero-visual {
  position: absolute;
  top: 34px;
  right: -70px;
  width: min(58vw, 720px);
  min-width: 420px;
  opacity: 0.88;
  z-index: 1;
}

.brain-gear-art {
  width: 100%;
  height: auto;
}

.content-grid {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.legal-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 72px);
}

.legal-panel {
  width: min(760px, 100%);
}

.legal-title {
  color: var(--text);
  text-shadow: none;
  max-width: none;
}

.legal-content {
  display: grid;
  gap: 12px;
  margin: 24px 0 28px;
  color: var(--text);
}

.legal-content p {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(130, 214, 242, 0.18);
}

.legal-back {
  width: fit-content;
}

.panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(252, 255, 255, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.section-tag,
.card-label,
.toolbar-label {
  color: #2e9ac6;
  font-size: 0.75rem;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.section-heading p {
  margin: 0;
  max-width: 58ch;
  font-size: 1.05rem;
}

.media-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);
  gap: 20px;
  align-items: start;
}

.splash-card,
.shot-card,
.leaderboard-shell,
.support-tile {
  border: 1px solid rgba(130, 214, 242, 0.22);
  background: rgba(255, 255, 255, 0.44);
  border-radius: 24px;
}

.splash-card,
.shot-card {
  padding: 18px;
}

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

.screenshots-stack {
  grid-template-columns: 1fr;
}

.phone-frame {
  position: relative;
  min-height: 420px;
  margin-top: 12px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06)),
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.26), transparent 30%);
}

.landscape-card {
  align-self: start;
}

.landscape-frame {
  min-height: 0;
  aspect-ratio: 1672 / 941;
  border-radius: 26px;
}

.splash-frog {
  aspect-ratio: 867 / 1814;
}

.splash-troopers::before,
.splash-frog::before,
.splash-dolphin::before,
.splash-troopers .placeholder-copy,
.splash-frog .placeholder-copy,
.splash-dolphin .placeholder-copy {
  display: none;
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 34%;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.placeholder-copy,
.shot-placeholder span {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 10px;
}

.placeholder-copy span,
.shot-placeholder span {
  font-family: "Baloo 2", sans-serif;
  font-size: 0.88rem;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 3px 10px rgba(74, 117, 154, 0.25);
}

.placeholder-copy strong {
  color: #fff7c1;
  font-size: 1.05rem;
}

.splash-placeholder {
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 248, 182, 0.48), transparent 20%),
    linear-gradient(180deg, rgba(132, 225, 255, 0.24), rgba(255, 186, 103, 0.22)),
    linear-gradient(135deg, rgba(88, 183, 255, 0.7), rgba(106, 240, 220, 0.6));
}

.shot-placeholder {
  min-height: 300px;
  background:
    linear-gradient(180deg, rgba(102, 207, 255, 0.3), rgba(255, 183, 120, 0.35)),
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.34), transparent 26%);
}

.shot-placeholder.alt {
  background:
    linear-gradient(180deg, rgba(111, 210, 255, 0.26), rgba(255, 137, 183, 0.34)),
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.28), transparent 22%);
}

.shot-placeholder.alt-two {
  background:
    linear-gradient(180deg, rgba(104, 157, 255, 0.26), rgba(255, 207, 106, 0.34)),
    radial-gradient(circle at 48% 18%, rgba(255, 255, 255, 0.3), transparent 18%);
}

.alt-splash {
  background:
    radial-gradient(circle at 48% 22%, rgba(255, 255, 224, 0.52), transparent 18%),
    linear-gradient(180deg, rgba(116, 240, 224, 0.24), rgba(255, 164, 112, 0.28)),
    linear-gradient(135deg, rgba(84, 178, 255, 0.66), rgba(255, 132, 178, 0.58));
}

.happy-one {
  background:
    linear-gradient(180deg, rgba(107, 215, 255, 0.26), rgba(255, 200, 109, 0.36)),
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.34), transparent 24%);
}

.happy-two {
  background:
    linear-gradient(180deg, rgba(116, 218, 255, 0.24), rgba(255, 142, 180, 0.34)),
    radial-gradient(circle at 76% 26%, rgba(255, 255, 255, 0.32), transparent 24%);
}

.happy-three {
  background:
    linear-gradient(180deg, rgba(112, 175, 255, 0.24), rgba(255, 196, 116, 0.36)),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.34), transparent 22%);
}

.splash-troopers {
  background-image: url("images/splash_trooper.png");
}

.splash-frog {
  background-image: url("images/splash_frog.png");
}

.splash-dolphin {
  background-image: url("images/splash_dolphinchaos.png");
}

.splash-troopers,
.splash-frog,
.splash-dolphin {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.leaderboard-shell {
  overflow: hidden;
}

.leaderboard-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(110, 193, 226, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.18));
}

.leaderboard-toolbar strong {
  display: block;
  margin-top: 6px;
  font-family: "Baloo 2", sans-serif;
  font-size: 0.96rem;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 18px 22px;
  text-align: left;
}

.leaderboard-table thead th {
  color: #278cb3;
  font-family: "Baloo 2", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(131, 218, 248, 0.14);
}

.leaderboard-table tbody tr {
  border-top: 1px solid rgba(110, 193, 226, 0.16);
}

.leaderboard-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.24);
}

.leaderboard-table tbody tr:hover {
  background: rgba(255, 225, 161, 0.24);
}

.leaderboard-table tbody tr.leaderboard-top {
  position: relative;
}

.leaderboard-table tbody tr.leaderboard-top td {
  font-weight: 700;
}

.leaderboard-table tbody tr.leaderboard-top-1 {
  background: linear-gradient(90deg, rgba(255, 236, 164, 0.68), rgba(255, 255, 255, 0.2));
}

.leaderboard-table tbody tr.leaderboard-top-2 {
  background: linear-gradient(90deg, rgba(225, 239, 249, 0.88), rgba(255, 255, 255, 0.18));
}

.leaderboard-table tbody tr.leaderboard-top-3 {
  background: linear-gradient(90deg, rgba(255, 208, 170, 0.72), rgba(255, 255, 255, 0.16));
}

.leaderboard-table tbody tr.leaderboard-top-1 td:first-child,
.leaderboard-table tbody tr.leaderboard-top-2 td:first-child,
.leaderboard-table tbody tr.leaderboard-top-3 td:first-child {
  color: #1a4a62;
}

.leaderboard-table tbody tr.leaderboard-top-1 td:first-child::after {
  content: " 1st";
  color: #b27a00;
  font-size: 0.82em;
}

.leaderboard-table tbody tr.leaderboard-top-2 td:first-child::after {
  content: " 2nd";
  color: #6b8191;
  font-size: 0.82em;
}

.leaderboard-table tbody tr.leaderboard-top-3 td:first-child::after {
  content: " 3rd";
  color: #b56b38;
  font-size: 0.82em;
}

.leaderboard-table td:first-child,
.leaderboard-table td:last-child {
  font-family: "Baloo 2", sans-serif;
}

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

.support-tile {
  padding: 22px;
}

.support-tile strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Baloo 2", sans-serif;
  color: var(--text);
}

.support-tile span {
  display: block;
  font-size: 1rem;
}

@media (max-width: 1100px) {
  .hero {
    padding-bottom: 34px;
  }

  .hero-visual {
    right: -120px;
    width: min(60vw, 620px);
  }

  .media-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, 1220px);
    padding-top: 12px;
  }

  .hero {
    padding: 20px 18px 28px;
  }

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

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

  .hero-copy {
    padding-top: 320px;
  }

  .hero-visual {
    top: 86px;
    right: 50%;
    transform: translateX(50%);
    width: min(95vw, 520px);
    min-width: 320px;
    opacity: 0.58;
  }

  .screenshots-grid,
  .support-strip {
    grid-template-columns: 1fr;
  }

  .leaderboard-toolbar {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .panel {
    padding: 18px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .hero-copy p,
  .section-heading p {
    font-size: 1rem;
  }

  .button,
  .nav-links a {
    width: 100%;
    justify-content: center;
  }

  .phone-frame {
    min-height: 320px;
  }

  .landscape-frame {
    min-height: 0;
  }

  .leaderboard-table thead {
    display: none;
  }

  .leaderboard-table,
  .leaderboard-table tbody,
  .leaderboard-table tr,
  .leaderboard-table td {
    display: block;
    width: 100%;
  }

  .leaderboard-table tr {
    padding: 12px 0;
  }

  .leaderboard-table td {
    padding: 8px 18px;
  }

  .leaderboard-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #278cb3;
    font-family: "Baloo 2", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}
