:root {
  --bg-0: #060b16;
  --bg-1: #0b1833;
  --bg-2: #132a54;
  --bg-3: #20144f;
  --surface: #10264bcc;
  --surface-strong: #122f5fcc;
  --line: #8dd6ff52;
  --text: #e9f5ff;
  --text-soft: #b7d4e9;
  --cyan: #33d9ff;
  --cyan-strong: #1cb7ff;
  --orange: #ff9b2f;
  --orange-strong: #ff6a00;
  --mint: #74ffbf;
  --shadow: 0 18px 44px #050d1e7a;
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 18% -8%, #33d9ff30 0%, transparent 42%),
    radial-gradient(circle at 88% 2%, #9f65ff22 0%, transparent 36%),
    linear-gradient(145deg, var(--bg-0), var(--bg-1) 44%, var(--bg-2) 76%, var(--bg-3));
  overflow-x: hidden;
}

.container {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding-inline: 1rem;
}

.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#ffffff09 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, #ffffff09 1px, transparent 1px) 0 0 / 26px 26px;
  animation: gridShift 18s linear infinite;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(44px);
  opacity: 0.36;
  animation: drift 12s ease-in-out infinite;
}

.orb-a {
  width: 320px;
  height: 320px;
  top: 14%;
  left: -80px;
  background: #29c7ff;
}

.orb-b {
  width: 260px;
  height: 260px;
  top: 56%;
  right: -40px;
  background: #7f68ff;
  animation-delay: -2s;
}

.orb-c {
  width: 240px;
  height: 240px;
  bottom: -90px;
  left: 44%;
  background: #ff7f38;
  opacity: 0.24;
  animation-delay: -4s;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: #09162ca8;
  border-bottom: 1px solid #7ed3ff2a;
}

.header-shell {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

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

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #0a2647;
  border: 1px solid #8adfff66;
  box-shadow: 0 8px 22px #1ec0ff4d;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1.38rem;
}

.brand-copy small {
  margin-top: 0.15rem;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.32rem;
}

.main-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  background: #173257c4;
  color: #f4fbff;
  transform: translateY(-1px);
}

.main-nav .nav-cta {
  margin-left: 0.35rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #76cbf25b;
  background: #132e52d2;
  padding: 0.55rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #e8f8ff;
}

.menu-toggle span + span {
  margin-top: 0.35rem;
}

.hero-section {
  padding-block: 2.2rem 1rem;
}

.hero-copy {
  padding: clamp(1.1rem, 2vw, 1.8rem);
  border-radius: var(--radius);
  border: 1px solid #8ad7ff3c;
  background:
    linear-gradient(150deg, #10274fcc 0%, #173f74be 60%, #162f5cb5 100%);
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #95e5ff;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
}

.hero-lead {
  margin: 0.95rem 0 0;
  font-size: clamp(0.98rem, 2.4vw, 1.15rem);
  color: var(--text-soft);
  max-width: 64ch;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.hero-stats {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.stat-card {
  border: 1px solid #80d6ff4b;
  border-radius: 11px;
  background: #163f6a99;
  padding: 0.66rem 0.72rem;
}

.stat-card strong {
  display: block;
  font-size: 0.95rem;
}

.stat-card span {
  display: block;
  margin-top: 0.18rem;
  color: #b5d3ea;
  font-size: 0.79rem;
  font-weight: 700;
}

.featured-section {
  padding-block: 0.8rem 1rem;
}

.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 1rem;
  align-items: center;
  border: 1px solid #93dcff45;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, #15315fbf 0%, #11487ecf 100%);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.featured-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.feature-desc {
  margin: 0.62rem 0;
  color: var(--text-soft);
}

.feature-meta {
  display: grid;
  gap: 0.28rem;
  margin-bottom: 0.75rem;
}

.feature-meta span {
  color: #cbe9fb;
  font-size: 0.86rem;
  font-weight: 700;
}

.featured-media {
  display: block;
  border-radius: 14px;
  border: 1px solid #9adeff55;
  background: #0a2646;
  overflow: hidden;
  min-height: 210px;
}

.featured-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: contain;
  padding: 0.8rem;
  animation: floatSlow 4.4s ease-in-out infinite;
}

.games-section,
.leaderboard-preview {
  padding-block: 1rem;
}

.section-head {
  margin-bottom: 0.8rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
}

.browser-shell {
  border-radius: var(--radius);
  border: 1px solid #8bd8ff40;
  background: #0e274dbf;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.browser-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 220px;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid #89d7ff6f;
  background: #0b1f39;
  color: #eaf8ff;
  padding: 0.66rem 0.78rem;
  font-size: 0.95rem;
}

.search-box input::placeholder {
  color: #95bdd8;
}

.chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #8cd8ff73;
  background: #112a4d;
  color: #d5f2ff;
  border-radius: 999px;
  min-height: 40px;
  padding: 0.44rem 0.76rem;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(180deg, var(--cyan), var(--cyan-strong));
  color: #032a42;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.game-card {
  position: relative;
  border: 1px solid #90dcff62;
  border-radius: 14px;
  background: #0d2a4bbf;
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #9ce6ff;
  box-shadow: 0 14px 32px #05152995, 0 0 0 1px #6ddaff8a inset;
}

.live-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  border-radius: 999px;
  background: #c8ffe1;
  color: #176238;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.2rem 0.48rem;
}

.card-media {
  display: grid;
  place-items: center;
  min-height: 170px;
  background: linear-gradient(150deg, #1a4672, #21517f);
  border-bottom: 1px solid #74c8f157;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  padding: 0.7rem;
  animation: floatSlow 4.2s ease-in-out infinite;
}

.card-body {
  padding: 0.8rem;
}

.card-body h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card-body p {
  margin: 0.45rem 0 0.7rem;
  color: var(--text-soft);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chip-tag {
  border: 1px solid #7ecffb;
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #dcf3ff;
}

.leaderboard-card {
  border-radius: var(--radius);
  border: 1px solid #8fd9ff4f;
  padding: 1rem;
  background: linear-gradient(145deg, #152a56c7, #2a1e62ba);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.leaderboard-card h2 {
  margin: 0;
}

.leaderboard-card p {
  margin: 0.42rem 0 0;
  color: #c6ddf4;
}

.leaderboard-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.site-footer {
  margin-top: 1.2rem;
  border-top: 1px solid #7aceff35;
  background: #08152ab0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-block: 1.15rem;
}

.footer-brand p {
  margin: 0.6rem 0 0;
  color: var(--text-soft);
}

.footer-col h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.footer-col a {
  display: block;
  width: fit-content;
  color: #d6eefb;
  text-decoration: none;
  font-weight: 700;
  margin: 0.2rem 0;
}

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

.footer-bottom {
  border-top: 1px solid #71c6ef2b;
  text-align: center;
  padding: 0.75rem 1rem 1rem;
  color: #b5cbe0;
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 11px;
  padding: 0.56rem 0.92rem;
  text-decoration: none;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.03);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--orange), var(--orange-strong));
  box-shadow: 0 10px 22px #ff780045;
}

.btn-accent {
  color: #032f4a;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-strong));
  box-shadow: 0 10px 22px #1dc7ff4f;
}

.btn-ghost {
  color: #e8f8ff;
  border-color: #85d7ff84;
  background: #12355f88;
}

.btn-sm {
  min-height: 38px;
  padding: 0.42rem 0.78rem;
  border-radius: 10px;
  font-size: 0.84rem;
}

.full {
  width: 100%;
}

.empty-state {
  margin: 0.8rem 0 0;
  text-align: center;
  color: #ffd0d0;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

.img-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 170px;
  font-size: 2.1rem;
  font-weight: 900;
  color: #dbf3ff;
  background: linear-gradient(145deg, #1a446d, #173357);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-delay.visible {
  transition-delay: 0.08s;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #92e2ff;
  outline-offset: 1px;
}

@keyframes gridShift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(26px);
  }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(12px, -18px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

  .featured-card {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 1rem;
    right: 1rem;
    border-radius: 13px;
    border: 1px solid #83d8ff59;
    background: #0d2647ef;
    padding: 0.5rem;
    display: grid;
    gap: 0.2rem;
    transform-origin: top;
    transform: scaleY(0.85);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
  }

  .main-nav .nav-cta {
    margin-left: 0;
    margin-top: 0.2rem;
  }
}

@media (max-width: 640px) {
  .container,
  .header-shell {
    padding-inline: 0.72rem;
  }

  .brand-copy strong {
    font-size: 1.16rem;
  }

  .brand-copy small {
    font-size: 0.77rem;
  }

  .hero-section {
    padding-top: 1.1rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.7rem, 11vw, 2.25rem);
  }

  .hero-buttons,
  .leaderboard-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .featured-media,
  .featured-media img {
    min-height: 180px;
  }
}

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