:root {
  color-scheme: dark;
  --bg: #020814;
  --bg-deep: #00040d;
  --panel: rgba(5, 18, 40, 0.86);
  --panel-strong: rgba(7, 24, 52, 0.94);
  --line: #0954aa;
  --line-soft: rgba(34, 127, 255, 0.42);
  --text: #f2f7ff;
  --muted: #bac8da;
  --accent: #f2c86b;
  --red: #ff3f4e;
  --blue: #49b8ff;
  --green: #72f09b;
  --spotlight-x: 50vw;
  --spotlight-y: 16vh;
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at var(--spotlight-x) var(--spotlight-y), rgba(73, 184, 255, 0.18), transparent 24rem),
    linear-gradient(rgba(7, 20, 42, 0.82), rgba(3, 8, 18, 0.96)),
    repeating-linear-gradient(0deg, rgba(73, 184, 255, 0.055) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(73, 184, 255, 0.055) 0 1px, transparent 1px 64px),
    var(--bg);
  background-attachment: fixed;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.hero-panel,
.docs-panel,
.section-grid {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(5, 20, 48, 0.86), rgba(3, 11, 27, 0.92));
  box-shadow: 0 0 28px rgba(0, 91, 210, 0.18);
}

.hero-panel::before,
.docs-panel::before,
.section-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(73, 184, 255, 0.12);
  box-shadow: inset 0 0 38px rgba(73, 184, 255, 0.08);
}

.hero-panel {
  padding: clamp(24px, 5vw, 64px);
}

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background: linear-gradient(180deg, transparent 0 48%, rgba(73, 184, 255, 0.2) 50%, transparent 52% 100%);
  background-size: 100% 16px;
  mix-blend-mode: screen;
}

.hero-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px solid rgba(34, 127, 255, 0.34);
  background:
    radial-gradient(circle at center, rgba(20, 72, 145, 0.46), rgba(2, 8, 22, 0.22) 58%),
    linear-gradient(90deg, transparent, rgba(73, 184, 255, 0.08), transparent);
  box-shadow: inset 0 0 34px rgba(73, 184, 255, 0.11);
}

.hero-logo {
  width: min(620px, 88%);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 22px rgba(73, 184, 255, 0.22));
}

.hero-actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.pill-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  border-top: 1px solid var(--line-soft);
  background: rgba(17, 76, 155, 0.28);
}

.pillar {
  position: relative;
  min-height: 150px;
  padding: 22px 18px;
  text-align: center;
  background: rgba(2, 10, 27, 0.78);
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.pillar:hover {
  transform: translateY(-3px);
  background: rgba(5, 24, 54, 0.94);
  box-shadow: inset 0 0 0 1px rgba(73, 184, 255, 0.18);
}

.pillar-icon {
  color: var(--blue);
  font-family: Consolas, "Segoe UI Mono", monospace;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 14px;
  text-shadow: 0 0 18px rgba(73, 184, 255, 0.58);
}

.pillar h2,
.game-card h2 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pillar p,
.game-card p,
.docs-panel p,
.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.section-grid {
  margin-top: 24px;
  padding: 28px;
}

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

.section-heading > div:first-child {
  max-width: 760px;
}

.section-heading h1,
.docs-panel h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
}

.eyebrow {
  color: var(--accent) !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.game-card {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid rgba(34, 127, 255, 0.38);
  background: rgba(4, 16, 35, 0.86);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(242, 200, 107, 0.18), transparent 38%);
  transition: opacity 160ms ease;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(73, 184, 255, 0.9);
  background: rgba(7, 24, 52, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25), 0 0 24px rgba(73, 184, 255, 0.16);
}

.game-card:hover::after,
.game-card:focus-within::after {
  opacity: 1;
}

.game-card.available {
  border-color: rgba(242, 200, 107, 0.74);
}

.game-card .status {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(73, 184, 255, 0.72);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  background: rgba(13, 36, 68, 0.88);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(73, 184, 255, 0.16), 0 0 22px rgba(73, 184, 255, 0.2);
  outline: none;
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  border-color: var(--accent);
  color: #071225;
  background: var(--accent);
}

.button.primary:hover,
.button.primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(242, 200, 107, 0.2), 0 0 28px rgba(242, 200, 107, 0.24);
}

.glow-button {
  animation: pulse-glow 2.4s ease-in-out infinite;
}

.button.disabled {
  pointer-events: none;
  color: rgba(242, 247, 255, 0.48);
  border-color: rgba(186, 200, 218, 0.22);
  background: rgba(186, 200, 218, 0.08);
}

.filter-row {
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(73, 184, 255, 0.26);
  background: rgba(2, 10, 27, 0.72);
}

.filter-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.filter-button:hover,
.filter-button:focus-visible {
  color: var(--text);
  border-color: rgba(73, 184, 255, 0.46);
  outline: none;
}

.filter-button.active {
  color: #071225;
  border-color: var(--accent);
  background: var(--accent);
}

.docs-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 24px;
  padding: 28px;
}

.docs-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px 0;
  color: var(--muted);
  font-size: 13px;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(242, 200, 107, 0);
  }
  50% {
    box-shadow: 0 0 24px rgba(242, 200, 107, 0.28);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 18px, 1180px);
    padding: 10px 0 18px;
  }

  .hero-panel,
  .section-grid,
  .docs-panel {
    padding: 18px;
  }

  .hero-frame {
    min-height: 180px;
  }

  .pill-row,
  .section-heading,
  .docs-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .pillar {
    min-height: auto;
  }

  .docs-actions,
  .site-footer {
    justify-content: flex-start;
  }

  .filter-row {
    width: 100%;
    justify-content: stretch;
  }

  .filter-button {
    flex: 1;
  }
}

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