:root {
  --bg: #07111f;
  --bg-secondary: #0d1e35;
  --panel: rgba(10, 20, 35, 0.78);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #f5f7ff;
  --muted: rgba(235, 241, 255, 0.72);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 120, 80, 0.18), transparent 24%),
    radial-gradient(circle at 85% 15%, rgba(106, 227, 199, 0.14), transparent 26%),
    linear-gradient(145deg, var(--bg) 0%, #08162a 48%, #050b15 100%);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

code {
  font-family: "SFMono-Regular", "JetBrains Mono", "Fira Code", monospace;
}

.backdrop,
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.backdrop-a {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 151, 96, 0.18), transparent 0 32%),
    radial-gradient(circle at 75% 8%, rgba(109, 230, 220, 0.12), transparent 0 26%);
  filter: blur(10px);
}

.backdrop-b {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.9));
}

.noise {
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 20% 20%, #fff 0 0.6px, transparent 0.8px),
    radial-gradient(circle at 70% 40%, #fff 0 0.8px, transparent 1px),
    radial-gradient(circle at 45% 75%, #fff 0 0.6px, transparent 0.8px);
  background-size: 180px 180px;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.hero,
.section-block,
.filters {
  backdrop-filter: blur(20px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.hero-note,
.section-block,
.filters {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-note {
  border-radius: var(--radius-xl);
  padding: 32px;
}

.eyebrow,
.section-kicker,
.note-title {
  margin: 0 0 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 197, 120, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4.5vw, 4.8rem);
  line-height: 0.96;
  max-width: 12ch;
}

.hero-text,
.section-copy,
.hero-note li {
  color: var(--muted);
  line-height: 1.7;
}

.hero-text {
  max-width: 58ch;
  margin: 22px 0 0;
  font-size: 1.02rem;
}

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

.hero-stats article {
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-value {
  display: block;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  font-weight: 800;
}

.stat-label {
  display: block;
  margin-top: 6px;
  color: rgba(235, 241, 255, 0.62);
  font-size: 0.9rem;
}

.hero-note ol {
  margin: 0;
  padding-left: 20px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 20px;
}

.filter-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  transform: translateY(-2px);
  border-color: rgba(255, 197, 120, 0.4);
  background: rgba(255, 197, 120, 0.12);
}

.section-block {
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

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

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

.section-copy {
  max-width: 46ch;
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, var(--card-base, #122643), var(--card-base-dark, #0b1628));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
  isolation: isolate;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.game-card.is-muted {
  opacity: 0.84;
}

.game-card.is-blocked {
  min-height: 220px;
}

.card-glow {
  position: absolute;
  inset: auto auto -15% -8%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent, rgba(255, 155, 0, 0.5)), transparent 70%);
  opacity: 0.38;
  filter: blur(8px);
}

.card-topline {
  height: 6px;
  background: linear-gradient(90deg, var(--card-accent, #ffa94d), var(--card-accent-strong, #72f2d0));
}

.card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100% - 6px);
  padding: 18px;
}

.card-meta,
.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.badge-status.is-playable {
  color: #fff4d8;
  background: rgba(255, 186, 73, 0.16);
}

.badge-status.is-planned {
  color: #d8fbff;
  background: rgba(86, 227, 220, 0.14);
}

.badge-status.is-backend {
  color: #ffd7df;
  background: rgba(255, 107, 132, 0.14);
}

.card-copy {
  margin-top: 20px;
}

.card-copy h3 {
  margin: 0;
  font-size: 1.45rem;
}

.game-desc {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 247, 255, 0.82);
  font-size: 0.76rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 22px;
}

.card-folder {
  color: rgba(245, 247, 255, 0.56);
  font-size: 0.84rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #0a1321;
  background: linear-gradient(135deg, #fff3c4, #ffc36f);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease;
}

.card-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.card-link.is-disabled {
  cursor: default;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.12);
}

.muted-grid .game-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, #102337, #0d1624);
}

.compact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.compact-item {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-item h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.compact-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.compact-item .badge {
  margin-bottom: 10px;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: rgba(245, 247, 255, 0.66);
}

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

  .section-head {
    align-items: start;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 24px;
    padding-bottom: 36px;
  }

  .hero-copy,
  .hero-note,
  .section-block {
    padding: 22px;
  }

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

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

  .card-grid,
  .compact-list {
    grid-template-columns: 1fr;
  }

  .card-footer {
    flex-direction: column;
    align-items: start;
  }

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