:root {
  --bg-deep: #071a4a;
  --bg-mid: #123a8c;
  --bg-shallow: #2e67c4;
  --ocean-glow: #85d8ff;
  --panel: rgba(8, 25, 72, 0.66);
  --panel-soft: rgba(13, 42, 112, 0.5);
  --line: rgba(164, 211, 255, 0.28);
  --text-main: #f3f8ff;
  --text-soft: #bed1f5;
  --text-muted: #9ab2e4;
  --cta-green: #16b66a;
  --cta-green-dark: #0d8f52;
  --cta-blue: #0d56d8;
  --cta-blue-dark: #073389;
  --star: #ffc845;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-deep: 0 24px 70px rgba(1, 9, 32, 0.46);
  --shadow-card: 0 18px 44px rgba(1, 9, 32, 0.4);
  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 10%, rgba(183, 225, 255, 0.35), transparent 38%),
    radial-gradient(circle at 85% 12%, rgba(97, 217, 255, 0.24), transparent 33%),
    linear-gradient(165deg, #d6ecff 0%, var(--bg-shallow) 34%, var(--bg-mid) 58%, var(--bg-deep) 100%);
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 48vw;
  height: 48vw;
  right: -12vw;
  top: -10vw;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(156, 233, 255, 0.3) 0%, rgba(87, 166, 255, 0.05) 55%, transparent 70%);
}

body::after {
  width: 70vw;
  height: 34vw;
  left: 50%;
  bottom: -13vw;
  transform: translateX(-50%);
  border-radius: 100%;
  background: radial-gradient(circle, rgba(39, 128, 255, 0.4) 0%, rgba(15, 42, 112, 0.08) 65%, transparent 82%);
}

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

.bubble-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -120px;
  border-radius: 999px;
  border: 1px solid rgba(205, 239, 255, 0.5);
  background: radial-gradient(circle at 28% 30%, rgba(255, 255, 255, 0.85), rgba(147, 220, 255, 0.14) 62%, rgba(147, 220, 255, 0.05) 100%);
  animation: bubble-rise var(--rise, 16s) linear infinite;
}

@keyframes bubble-rise {
  0% {
    transform: translateY(0) scale(0.86);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-125vh) scale(1.05);
    opacity: 0;
  }
}

.top-nav,
.page-shell,
.site-footer {
  position: relative;
  z-index: 2;
}

.top-nav {
  width: min(1100px, 92vw);
  margin: 14px auto 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.58rem 0.8rem 0.58rem 1rem;
  background: rgba(11, 32, 88, 0.58);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(3, 14, 45, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 180ms ease, background-color 180ms ease;
}

.top-nav.is-scrolled {
  background: rgba(7, 25, 77, 0.84);
}

.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  font-size: 1.05rem;
}

.brand-mini__mark {
  width: 26px;
  height: 26px;
  border-radius: 50% 46% 52% 47%;
  background:
    radial-gradient(circle at 32% 24%, #d3fbff 0%, rgba(211, 251, 255, 0.25) 32%, transparent 54%),
    linear-gradient(145deg, #2ec2ff, #1261ff);
  box-shadow: 0 0 18px rgba(93, 204, 255, 0.66);
}

.top-nav__links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-nav__links a {
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.top-nav__links a:hover,
.top-nav__links a:focus-visible {
  color: var(--text-main);
}

.page-shell {
  width: min(1100px, 92vw);
  margin: 1.1rem auto 2.4rem;
  display: grid;
  gap: 1.1rem;
}

.hero,
.featured,
.discover,
.creator,
.stats-strip {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(20, 56, 138, 0.3), transparent 40%),
    linear-gradient(178deg, var(--panel), var(--panel-soft));
  box-shadow: var(--shadow-deep);
}

.hero,
.featured,
.discover,
.creator {
  padding: clamp(1.1rem, 2.2vw, 2rem);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  overflow: hidden;
}

.hero h1,
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  line-height: 1.06;
}

.hero h1 {
  font-size: clamp(2rem, 5.1vw, 3.65rem);
  max-width: 16ch;
}

.eyebrow {
  margin: 0 0 0.52rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ocean-glow);
  font-weight: 800;
}

.hero__lead {
  margin: 0.9rem 0 0;
  color: var(--text-soft);
  max-width: 46ch;
  line-height: 1.6;
  font-size: 1.02rem;
}

.hero__actions,
.creator__actions {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.66rem 1.05rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:focus-visible {
  outline: 2px solid rgba(217, 244, 255, 0.7);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--cta-green), var(--cta-green-dark));
  color: #ecfff4;
  box-shadow: 0 9px 20px rgba(7, 89, 48, 0.38);
}

.btn-secondary {
  background: linear-gradient(180deg, var(--cta-blue), var(--cta-blue-dark));
  color: #ebf4ff;
  border-color: rgba(136, 196, 255, 0.55);
  box-shadow: 0 9px 20px rgba(4, 37, 112, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(183, 224, 255, 0.55);
  color: var(--text-main);
}

.btn-card {
  width: 100%;
  margin-top: 0.85rem;
  background: linear-gradient(180deg, #16b66a, #0f8d52);
  color: #e9fff3;
  box-shadow: 0 7px 18px rgba(8, 89, 47, 0.36);
}

.hero__visual {
  min-height: 300px;
  display: grid;
  place-items: center;
}

.hero-orb {
  width: clamp(210px, 29vw, 320px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 220ms ease;
  background:
    radial-gradient(circle at 30% 20%, rgba(224, 249, 255, 0.92), transparent 30%),
    radial-gradient(circle at 80% 78%, rgba(80, 173, 255, 0.2), transparent 48%),
    linear-gradient(160deg, rgba(18, 96, 255, 0.95), rgba(11, 51, 137, 0.95));
  box-shadow: inset 0 -26px 58px rgba(7, 15, 63, 0.6), 0 22px 48px rgba(7, 19, 61, 0.4);
}

.hero-orb__halo {
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  border: 1px solid rgba(157, 223, 255, 0.48);
  box-shadow: 0 0 44px rgba(157, 223, 255, 0.36);
}

.hero-orb__jelly {
  position: absolute;
  left: 50%;
  top: 24%;
  width: 42%;
  aspect-ratio: 1.05 / 0.82;
  transform: translateX(-50%);
  border-radius: 56% 56% 45% 45%;
  background: linear-gradient(170deg, #79f0ff, #258eff 62%, #10449f 100%);
  box-shadow: 0 0 24px rgba(84, 182, 255, 0.56);
}

.hero-orb__jelly::before,
.hero-orb__jelly::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 66%;
  left: 26%;
  top: 76%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(178, 240, 255, 0.85), rgba(89, 174, 255, 0.1));
}

.hero-orb__jelly::after {
  left: 68%;
  height: 76%;
}

.hero-orb__spark {
  position: absolute;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0) 70%);
}

.hero-orb__spark--a {
  top: 17%;
  right: 21%;
}

.hero-orb__spark--b {
  top: 39%;
  left: 18%;
}

.hero-orb__spark--c {
  bottom: 23%;
  right: 29%;
}

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

.stat-pill {
  border: 1px solid rgba(162, 211, 255, 0.24);
  border-radius: 14px;
  background: rgba(15, 41, 103, 0.46);
  padding: 0.72rem 0.8rem;
}

.stat-pill__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.stat-pill__label {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.section-head {
  display: grid;
  gap: 0.2rem;
}

.section-head h2 {
  font-size: clamp(1.4rem, 3.4vw, 2.32rem);
}

.games-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.game-card {
  border: 1px solid rgba(167, 216, 255, 0.26);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(9, 32, 84, 0.72);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.game-card:hover,
.game-card:focus-within {
  border-color: rgba(180, 225, 255, 0.58);
  transform: translateY(-4px);
}

.game-card__thumb {
  height: 126px;
  position: relative;
  padding: 0.7rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.38), transparent 36%),
    radial-gradient(circle at 82% 78%, rgba(255, 219, 154, 0.24), transparent 44%),
    linear-gradient(145deg, var(--thumb-a), var(--thumb-b));
}

.thumb-chip {
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(236, 248, 255, 0.7);
  background: rgba(6, 16, 54, 0.54);
  font-weight: 800;
}

.game-card__body {
  padding: 0.72rem 0.74rem 0.78rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card__body h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  line-height: 1.08;
  font-size: 1.26rem;
}

.game-card__body p {
  margin: 0.4rem 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.48;
  flex: 1;
}

.rating-row {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.stars {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.star {
  width: 13px;
  height: 13px;
  background: rgba(207, 227, 255, 0.26);
  clip-path: polygon(50% 0, 61% 37%, 100% 38%, 70% 59%, 81% 100%, 50% 74%, 20% 100%, 31% 59%, 0 38%, 39% 37%);
}

.star.is-on {
  background: linear-gradient(180deg, #ffdf72, var(--star));
}

.rating-score {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  font-size: 1rem;
}

.section-cta {
  margin-top: 0.95rem;
  display: flex;
  justify-content: center;
}

.discover p,
.creator p {
  margin: 0.74rem 0 0;
  max-width: 70ch;
  line-height: 1.6;
  color: var(--text-soft);
}

.site-footer {
  width: min(1100px, 92vw);
  margin: 0 auto 2.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    min-height: 250px;
    order: -1;
  }

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

@media (max-width: 760px) {
  .top-nav {
    border-radius: 22px;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.74rem;
    padding: 0.88rem;
  }

  .top-nav__links {
    width: 100%;
    justify-content: space-between;
  }

  .top-nav .btn {
    width: 100%;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(1120px, 94vw);
  }

  .hero,
  .featured,
  .discover,
  .creator {
    padding: 0.95rem;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 9vw, 2.5rem);
  }

  .hero__actions,
  .creator__actions {
    flex-direction: column;
  }

  .hero__actions .btn,
  .creator__actions .btn,
  .section-cta .btn {
    width: 100%;
  }

  .games-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.7rem;
    padding-bottom: 0.3rem;
  }

  .game-card {
    min-width: min(78vw, 270px);
    scroll-snap-align: start;
  }

  .site-footer {
    font-size: 0.82rem;
  }
}

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