:root {
  color-scheme: dark;
  --bg: #06111f;
  --bg-accent: #10213d;
  --panel: rgba(11, 28, 51, 0.84);
  --panel-soft: rgba(19, 40, 70, 0.76);
  --panel-solid: #122847;
  --line: rgba(120, 169, 255, 0.18);
  --text: #eef5ff;
  --muted: #a2b6d7;
  --accent: #52bbff;
  --accent-strong: #2e8df7;
  --glow: rgba(82, 187, 255, 0.28);
  --success: #31b36b;
  --danger: #ff5d65;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 16px 44px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 118, 255, 0.24), transparent 30%),
    radial-gradient(circle at top right, rgba(70, 217, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #11284b 0%, #0a1630 22%, #06111f 100%);
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

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

.site-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(8, 19, 38, 0.8);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

.topbar--compact {
  position: static;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #67d8ff 0%, #3187ff 100%);
  color: white;
  font-family: "Teko", sans-serif;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 18px 36px rgba(49, 135, 255, 0.34);
}

.brand__eyebrow,
.section-heading__label,
.hero-carousel__kicker {
  margin: 0 0 4px;
  color: #81bbff;
  font-family: "Teko", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand h1,
.section-heading h2,
.game-stage-panel__header h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.1;
}

.topbar__nav,
.topbar__actions,
.hero-carousel__controls,
.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link,
.ghost-button,
.primary-button,
.carousel-button,
.section-link,
.close-link {
  border-radius: 999px;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(82, 187, 255, 0.14);
  border-color: rgba(82, 187, 255, 0.22);
}

.nav-link--button {
  font: inherit;
}

.ghost-button,
.primary-button,
.section-link,
.close-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 700;
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ghost-button:hover,
.section-link:hover,
.close-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button--link {
  text-decoration: none;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 18px 36px var(--glow);
}

.primary-button:hover,
.carousel-button:hover {
  transform: translateY(-1px);
}

.primary-button--wide,
.ghost-button--wide {
  width: 100%;
}

.category-panel,
.content-section,
.game-stage-panel,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow-md);
}

.category-panel {
  padding: 22px;
  margin-bottom: 20px;
}

.category-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-chip {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.filter-chip.is-active {
  background: rgba(82, 187, 255, 0.18);
  color: var(--text);
}

.page-content {
  display: grid;
  gap: 22px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #0e203b;
  box-shadow: var(--shadow-lg);
}

.hero-carousel__track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 420ms ease;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 11, 23, 0.88) 0%, rgba(4, 11, 23, 0.46) 46%, rgba(4, 11, 23, 0.1) 100%),
    linear-gradient(180deg, rgba(3, 9, 18, 0.1) 0%, rgba(3, 9, 18, 0.65) 100%);
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide__ambient,
.hero-slide__badge,
.hero-slide__number {
  position: absolute;
}

.hero-slide__ambient {
  inset: 0;
}

.hero-slide__ambient--1 {
  background:
    radial-gradient(circle at 82% 22%, rgba(82, 187, 255, 0.28), transparent 15%),
    radial-gradient(circle at 74% 72%, rgba(109, 120, 255, 0.2), transparent 22%),
    linear-gradient(135deg, #0b1530 0%, #10284a 48%, #091423 100%);
}

.hero-slide__ambient--2 {
  background:
    radial-gradient(circle at 80% 30%, rgba(41, 212, 175, 0.24), transparent 16%),
    radial-gradient(circle at 68% 70%, rgba(48, 121, 255, 0.16), transparent 24%),
    linear-gradient(135deg, #08182a 0%, #12344d 44%, #071421 100%);
}

.hero-slide__ambient--3 {
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 97, 151, 0.2), transparent 15%),
    radial-gradient(circle at 70% 70%, rgba(103, 81, 255, 0.18), transparent 20%),
    linear-gradient(135deg, #10152e 0%, #1c2551 48%, #0a1020 100%);
}

.hero-slide__ambient--4 {
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 181, 78, 0.22), transparent 16%),
    radial-gradient(circle at 65% 72%, rgba(72, 117, 255, 0.16), transparent 22%),
    linear-gradient(135deg, #15122d 0%, #27315c 46%, #0d1122 100%);
}

.hero-slide__badge {
  top: 30px;
  right: 34px;
  z-index: 1;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9ecff;
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-slide__number {
  right: 36px;
  bottom: 74px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.08);
  font-family: "Teko", sans-serif;
  font-size: clamp(7rem, 18vw, 12rem);
  line-height: 0.8;
}

.hero-carousel__overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  width: min(560px, 100%);
  padding: 44px;
}

.hero-carousel__overlay h2 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
}

.hero-carousel__overlay p:last-of-type {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.carousel-button {
  width: 52px;
  height: 52px;
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1.75rem;
}

.hero-carousel__dots {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(82, 187, 255, 0.14);
}

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

.stat-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.stat-card__label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.stat-card__value {
  font-family: "Teko", sans-serif;
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.content-section {
  padding: 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-subtitle {
  margin: 0;
  color: var(--muted);
}

.section-link,
.close-link {
  color: #9cc8ff;
  background: rgba(255, 255, 255, 0.04);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: #10223d;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(82, 187, 255, 0.38);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.3);
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
  font-size: 0;
}

.game-card__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 16px 14px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(3, 9, 18, 0.16) 8%, rgba(3, 9, 18, 0.86) 100%);
}

.game-card__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

.game-card__meta {
  display: block;
  margin-top: 6px;
  color: #83a2cf;
  font-size: 0.82rem;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  color: var(--muted);
}

.all-games-sentinel {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 56px;
  margin-top: 4px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.03);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.game-stage-panel {
  padding: 24px;
}

.game-stage-panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.game-stage {
  display: grid;
  place-items: center;
  min-height: 80vh;
  padding: 28px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    #050b15;
}

.game-frame-shell {
  position: relative;
  width: min(100%, 750px);
  aspect-ratio: 750 / 1334;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background: black;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
}

.game-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: black;
}

.game-sidebar {
  display: grid;
  gap: 20px;
}

.info-card {
  padding: 22px;
}

.info-card h3 {
  margin: 0 0 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-grid article {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.info-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.info-grid strong {
  font-size: 1.05rem;
}

.game-cover {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.04);
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
  font-size: 0;
}

.tips-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 1180px) {
  .games-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .game-stage {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .topbar {
    top: 10px;
    flex-wrap: wrap;
    padding: 16px;
  }

  .topbar__nav,
  .topbar__actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero-carousel,
  .hero-carousel__overlay {
    min-height: 360px;
  }

  .hero-carousel__overlay {
    padding: 28px 24px;
  }

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

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

  .content-section,
  .game-stage-panel,
  .info-card {
    padding: 20px;
  }

  .game-stage {
    padding: 12px;
    background: transparent;
  }

  .game-frame-shell {
    width: 100%;
    border-radius: 24px;
  }
}

@media (max-width: 560px) {
  .brand h1,
  .section-heading h2,
  .game-stage-panel__header h2 {
    font-size: 1.15rem;
  }

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

  .section-heading,
  .game-stage-panel__header {
    align-items: start;
    flex-direction: column;
  }

  .hero-carousel__dots {
    right: 18px;
    bottom: 18px;
  }
}
