:root {
  --bg: #07111f;
  --surface-card: rgba(15, 30, 50, 0.78);
  --surface-card-hover: rgba(19, 36, 59, 0.96);
  --text: #edf4ff;
  --muted: #9db0c9;
  --muted-strong: #bfd0e6;
  --line: rgba(180, 208, 234, 0.14);
  --line-strong: rgba(122, 196, 255, 0.35);
  --accent: #37c99a;
  --accent-strong: #73f0c8;
  --accent-2: #6fb9ff;
  --accent-3: #ffd166;
  --shadow: 0 24px 80px rgba(2, 8, 18, 0.45);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(111, 185, 255, 0.14), transparent 32%),
    radial-gradient(circle at 85% 14%, rgba(55, 201, 154, 0.18), transparent 26%),
    linear-gradient(180deg, #07111f 0%, #091523 45%, #07111c 100%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  isolation: isolate;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 80%);
  z-index: -1;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 17, 31, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

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

.brand-mark {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px rgba(115, 240, 200, 0.18));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.83rem;
}

.btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 700;
}

.btn-primary {
  color: #03231c;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: 0 12px 30px rgba(55, 201, 154, 0.22);
}

.btn-secondary {
  color: var(--text);
  background: rgba(111, 185, 255, 0.12);
  border: 1px solid rgba(111, 185, 255, 0.22);
}

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

.hero {
  padding: 72px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.game-card,
.ranking-panel {
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 36px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(9, 22, 37, 0.96), rgba(10, 24, 41, 0.78));
  border: 1px solid rgba(115, 240, 200, 0.12);
}

.eyebrow,
.section-kicker,
.ranking-kicker {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.hero-copy h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-text {
  margin: 22px 0 0;
  max-width: 58ch;
  color: var(--muted-strong);
  font-size: 1.05rem;
  line-height: 1.72;
}

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

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

.hero-stats div,
.meta-chip {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.hero-stats dt,
.meta-chip span,
.hero-highlight-label,
.rank-date,
.rank-game,
.ranking-meta,
.section-note,
.brand-copy span {
  color: var(--muted);
}

.hero-stats dd {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-panel {
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 29, 51, 0.98), rgba(11, 22, 39, 0.94));
  border: 1px solid rgba(111, 185, 255, 0.18);
}

.panel-badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.2);
  color: var(--accent-3);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-panel h2,
.section-head h2,
.ranking-title {
  margin: 16px 0 0;
  letter-spacing: -0.03em;
}

.hero-panel h2 {
  font-size: 1.55rem;
  line-height: 1.15;
}

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

.feature-list li {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  line-height: 1.6;
}

.feature-list code {
  color: var(--accent-strong);
}

.hero-highlight {
  margin-top: 20px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(55, 201, 154, 0.1), rgba(111, 185, 255, 0.08));
  border: 1px solid rgba(115, 240, 200, 0.14);
}

.hero-highlight strong {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
}

.hero-highlight p,
.game-card-desc {
  margin: 8px 0 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

.main-content {
  padding: 22px 0 92px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin-top: 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.section-note {
  max-width: 42ch;
  margin: 0;
  line-height: 1.7;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface-card), rgba(8, 18, 32, 0.9));
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  background: linear-gradient(180deg, var(--surface-card-hover), rgba(9, 20, 34, 0.98));
  border-color: var(--line-strong);
}

.game-card-head,
.game-card-actions,
.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.game-card-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(111, 185, 255, 0.11);
  border: 1px solid rgba(111, 185, 255, 0.14);
  color: var(--accent-2);
  font-size: 1.2rem;
  font-weight: 800;
}

.game-card-tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(55, 201, 154, 0.1);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-card-name,
.rank-name {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.game-card-name {
  font-size: 1.26rem;
}

.game-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meta-chip span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-chip strong {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.game-card-actions {
  align-items: center;
  margin-top: auto;
}

.game-card-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), #9ed0ff);
  color: #06203d;
  text-decoration: none;
  font-weight: 800;
}

.game-card-status {
  color: var(--muted);
  font-size: 0.85rem;
}

.ranking-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 7, 14, 0.56);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 150;
}

.ranking-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ranking-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100vw);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(8, 18, 32, 0.99), rgba(9, 21, 37, 0.98));
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 160;
}

.ranking-panel.open {
  transform: translateX(0);
}

.ranking-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.ranking-title {
  margin-top: 0;
  font-size: 1.45rem;
}

.ranking-close,
.tab-btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.ranking-close {
  width: 38px;
  height: 38px;
}

.ranking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 24px 0;
}

.tab-btn {
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 700;
}

.tab-btn.active,
.tab-btn:hover {
  background: rgba(111, 185, 255, 0.14);
  border-color: rgba(111, 185, 255, 0.28);
}

.ranking-meta {
  padding: 16px 24px 0;
  font-size: 0.84rem;
}

.ranking-list {
  margin: 0;
  padding: 18px 24px 28px;
  list-style: none;
  overflow: auto;
}

.ranking-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.rank-num {
  min-width: 32px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.rank-score {
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ranking-empty {
  margin: 30px 0 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

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

  .hero-copy h1 {
    max-width: 100%;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 28px, 1160px);
  }

  .brand-copy span {
    display: none;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-copy,
  .hero-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .hero-stats,
  .game-card-meta {
    grid-template-columns: 1fr;
  }

  .game-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .game-card-link {
    width: 100%;
  }

  .ranking-panel {
    width: 100vw;
    border-left: 0;
  }
}
