/* TopupZoneX API docs — navy / amber glass (local assets only) */

:root {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --ink: #f3f4f6;
  --muted: #9aa3b5;
  --dim: #6b7289;
  --accent: #5b9cff;
  --accent-2: #f0b45a;
  --accent-soft: rgba(91, 156, 255, 0.16);
  --ok: #4ade80;
  --warn: #fbbf24;
  --rose: #f87171;
  --sky: #93c5fd;
  --glass: rgba(17, 24, 39, 0.62);
  --glass-strong: rgba(15, 23, 42, 0.82);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(91, 156, 255, 0.4);
  --glow-a: rgba(91, 156, 255, 0.22);
  --glow-b: rgba(240, 180, 90, 0.16);
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 248px;
  --header-h: 58px;
  --read-w: 860px;
  --font: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-mono: "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(240, 180, 90, 0.08), transparent 50%),
    radial-gradient(ellipse 45% 35% at 0% 80%, rgba(56, 189, 248, 0.08), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, var(--bg) 42%, #070b12 100%);
  overflow-x: hidden;
}

/* Layered atmosphere: film grain + tech grid + soft orbs */
.page-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.page-atmosphere::before,
.page-atmosphere::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
}
.page-atmosphere::before {
  background:
    radial-gradient(circle at 18% 12%, rgba(91, 156, 255, 0.28), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(240, 180, 90, 0.16), transparent 28%),
    radial-gradient(circle at 70% 78%, rgba(56, 189, 248, 0.12), transparent 34%);
  filter: blur(28px);
  animation: orbDrift 20s ease-in-out infinite alternate;
  opacity: 0.9;
}
.page-atmosphere::after {
  inset: 0;
  opacity: 0.55;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E"),
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 180px 180px, 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 15%, transparent 78%);
}

@keyframes orbDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(2.5%, 3%, 0) scale(1.06); }
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

a {
  color: var(--sky);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--accent-2); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1.25rem;
  background: linear-gradient(180deg, rgba(10, 14, 23, 0.92), rgba(10, 14, 23, 0.72));
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 650;
}
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  background: transparent;
  border-radius: 0;
  filter:
    drop-shadow(0 0 10px rgba(0, 170, 255, 0.55))
    drop-shadow(0 0 2px rgba(147, 197, 253, 0.8));
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}
.topbar-brand:hover .brand-logo {
  transform: scale(1.06) rotate(-2deg);
  filter:
    drop-shadow(0 0 14px rgba(0, 190, 255, 0.75))
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.35));
}

.search-trigger {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--muted);
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.search-trigger kbd {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--dim);
}

.icon-btn {
  display: none;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--ink);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  cursor: pointer;
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
}

.sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: auto;
  padding: 1.25rem 1rem 2rem;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(10, 14, 23, 0.35)),
    rgba(10, 14, 23, 0.45);
  backdrop-filter: blur(16px);
}

.nav-section {
  margin: 1.1rem 0 0.4rem;
  padding: 0 0.65rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.sidebar a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.sidebar a:hover,
.sidebar a.active {
  color: var(--ink);
  background: var(--accent-soft);
}
.sidebar a.active { box-shadow: inset 2px 0 0 var(--accent); }

.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 3rem;
}

.doc-prose {
  max-width: var(--read-w);
  animation: riseIn 0.6s var(--ease) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.breadcrumbs {
  color: var(--dim);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.breadcrumbs .sep { margin: 0 0.4rem; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 4vw, 2.65rem); margin: 0 0 0.6rem; }
h2 {
  font-size: 1.5rem;
  margin: 2.4rem 0 0.85rem;
  position: relative;
  padding-bottom: 0.45rem;
}
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.85;
}
h3 { font-size: 1.12rem; margin: 1.5rem 0 0.55rem; }
p { color: rgba(243, 244, 246, 0.88); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 40rem; }

.gradient-title {
  background: linear-gradient(120deg, #f8fafc 8%, var(--accent) 48%, var(--accent-2) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero {
  position: relative;
  padding: 1.6rem 1.55rem;
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(145deg, rgba(30, 58, 138, 0.18), rgba(15, 23, 42, 0.35) 40%, rgba(17, 24, 39, 0.55)),
    var(--glass);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle, 0deg), transparent 40%, var(--accent), var(--accent-2), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spinBorder 8s linear infinite;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -40px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 156, 255, 0.22), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
  animation: orbDrift 12s ease-in-out infinite alternate;
}
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes spinBorder {
  to { --angle: 360deg; }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.25rem;
  align-items: center;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.78rem;
}
.pill.ok { color: var(--ok); border-color: rgba(74, 222, 128, 0.35); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #0b1220;
  background: linear-gradient(135deg, #93c5fd, var(--accent) 55%, #f0b45a);
  box-shadow: 0 12px 28px rgba(91, 156, 255, 0.28);
}
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.55s linear;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(2.4); opacity: 0; }
}

.api-illustration {
  position: relative;
  padding: 1.05rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(8, 12, 22, 0.85);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow: hidden;
}
.api-illustration .orbit {
  position: absolute;
  width: 120px;
  height: 120px;
  right: -30px;
  top: -40px;
  border-radius: 50%;
  border: 1px dashed rgba(91, 156, 255, 0.35);
  animation: spinSlow 12s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
.api-illustration .line {
  position: relative;
  color: var(--muted);
  margin: 0.38rem 0;
  opacity: 0;
  animation: slideSoft 0.5s var(--ease) forwards;
}
.api-illustration .line:nth-child(2) { animation-delay: 0.08s; color: var(--sky); }
.api-illustration .line:nth-child(3) { animation-delay: 0.18s; }
.api-illustration .line:nth-child(4) { animation-delay: 0.28s; }
.api-illustration .line:nth-child(5) { animation-delay: 0.38s; }
.api-illustration .line:nth-child(6) { animation-delay: 0.48s; color: var(--accent-2); }
@keyframes slideSoft {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.status-panel {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.9rem;
  margin: 1.25rem 0;
}

.glass-card {
  position: relative;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--glass-strong);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.glass-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(91, 156, 255, 0.12);
}
.glass-card .label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.35rem;
}
.glass-card .url {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--sky);
  word-break: break-all;
}
.status-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  font-weight: 650;
  color: var(--ink);
}
.support-link:hover { color: var(--accent-2); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.feature-grid--4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.feature-card,
.endpoint-card {
  display: block;
  padding: 1.05rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background:
    linear-gradient(165deg, rgba(91, 156, 255, 0.08), transparent 42%),
    var(--glass);
  backdrop-filter: blur(12px);
  color: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
  animation: cardPop 0.55s var(--ease) both;
}
.feature-card:nth-child(1), .endpoint-card:nth-child(1) { animation-delay: 0.05s; }
.feature-card:nth-child(2), .endpoint-card:nth-child(2) { animation-delay: 0.12s; }
.feature-card:nth-child(3), .endpoint-card:nth-child(3) { animation-delay: 0.19s; }
.feature-card:nth-child(4), .endpoint-card:nth-child(4) { animation-delay: 0.26s; }
@keyframes cardPop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.feature-card:hover,
.endpoint-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  color: inherit;
}
.feature-card .fc-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 0.65rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.95rem;
}
.feature-card .ec-title { margin-bottom: 0; }
.feature-card:not(:has(p)) {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 112px;
}
.ec-title { font-weight: 700; margin-bottom: 0.35rem; }
.ec-path {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.ec-cta { color: var(--accent); font-size: 0.85rem; margin-top: 0.55rem; }

.m {
  display: inline-block;
  min-width: 3.2rem;
  text-align: center;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.m-get { background: rgba(147, 197, 253, 0.14); color: var(--sky); }
.m-post { background: rgba(240, 180, 90, 0.16); color: var(--accent-2); }

.steps {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}
.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(10px);
}
.step-num {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0b1220;
  background: linear-gradient(135deg, #93c5fd, var(--accent-2));
}
.step strong { display: block; margin-bottom: 0.15rem; }

.callout {
  margin: 1.25rem 0;
  padding: 0.95rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(240, 180, 90, 0.3);
  background: rgba(240, 180, 90, 0.08);
  color: rgba(255, 247, 237, 0.95);
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(8, 12, 22, 0.6);
  backdrop-filter: blur(10px);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}
th {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
}
td code, p code, li code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(91, 156, 255, 0.12);
  color: #bfdbfe;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
}
.status-chip.processing { background: rgba(251, 191, 36, 0.14); color: var(--warn); }
.status-chip.completed { background: rgba(74, 222, 128, 0.14); color: var(--ok); }
.status-chip.cancelled { background: rgba(248, 113, 113, 0.14); color: var(--rose); }

.pre-wrap {
  margin: 0.85rem 0 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(6, 10, 18, 0.88);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.pre-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pre-toolbar button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  font-size: 0.75rem;
}
.pre-toolbar button:hover { color: var(--ink); border-color: var(--border-strong); }
pre {
  margin: 0;
  padding: 0.95rem 1rem;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #e5e7eb;
}

.code-tabs { margin: 1rem 0 1.4rem; }
.lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.lang-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
}
.lang-tab.active {
  color: #0b1220;
  background: linear-gradient(135deg, #93c5fd, var(--accent-2));
  border-color: transparent;
  font-weight: 650;
}
.lang-pane { display: none; }
.lang-pane.active { display: block; }

.filter-row {
  display: flex;
  gap: 0.65rem;
  margin: 0.75rem 0 0.9rem;
}
.filter-row input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  outline: none;
}
.filter-row input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(91, 156, 255, 0.14);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  align-self: start;
  padding: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 50%),
    rgba(10, 14, 23, 0.58);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.toc strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.55rem;
}
.toc a {
  display: block;
  padding: 0.28rem 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.toc a.active,
.toc a:hover { color: var(--accent); }

.next-prev {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.next-prev span { display: block; color: var(--dim); font-size: 0.78rem; }
.doc-footer {
  margin-top: 1.5rem;
  color: var(--dim);
  font-size: 0.8rem;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 35;
}
.sidebar-backdrop.open { display: block; }

.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}
.cmd-overlay.open { display: grid; }
.cmd-modal {
  width: min(560px, calc(100vw - 2rem));
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: rgba(12, 18, 30, 0.96);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: riseIn 0.25s var(--ease);
}
.cmd-modal input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  padding: 1rem 1.1rem;
  font-size: 1rem;
  outline: none;
}
.cmd-results { max-height: 320px; overflow: auto; }
.cmd-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0.75rem 1.1rem;
  cursor: pointer;
  display: grid;
  gap: 0.15rem;
}
.cmd-item small { color: var(--dim); }
.cmd-item.active,
.cmd-item:hover { background: var(--accent-soft); }

.hide-sm { display: inline; }

.muted-line {
  color: var(--dim);
  font-size: 0.9rem;
  margin: 0.35rem 0 0.85rem;
}

.channel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.35rem;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.channel-badge.tele {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
}
.channel-badge.api {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.4);
}
.channel-badge.both {
  color: #fcd34d;
  background: rgba(240, 180, 90, 0.12);
  border-color: rgba(240, 180, 90, 0.4);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1rem 0.75rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(160deg, rgba(91, 156, 255, 0.1), transparent 45%),
    var(--glass);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: cardPop 0.55s var(--ease) both;
  animation-delay: var(--d, 0s);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.game-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--border-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}
.game-card.is-hidden { display: none; }

.game-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(147, 197, 253, 0.35), transparent 55%),
    linear-gradient(145deg, rgba(30, 58, 138, 0.55), rgba(15, 23, 42, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.game-emoji {
  font-size: 1.85rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  animation: emojiFloat 3.6s ease-in-out infinite;
}
.game-ring {
  position: absolute;
  inset: 6px;
  border-radius: 18px;
  border: 1px dashed rgba(91, 156, 255, 0.35);
  animation: spinSlow 10s linear infinite;
  pointer-events: none;
}
@keyframes emojiFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.06); }
}

.game-name {
  margin: 0;
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .main { grid-template-columns: 1fr; }
  .toc { display: none; }
}

@media (max-width: 860px) {
  .icon-btn { display: inline-grid; place-items: center; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--header-h);
    width: min(300px, 86vw);
    z-index: 36;
    transform: translateX(-105%);
    transition: transform 0.25s var(--ease);
  }
  .sidebar.open { transform: translateX(0); }
  .hero-grid,
  .status-panel,
  .feature-grid,
  .feature-grid--4 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .search-trigger { margin-left: 0; flex: 1; }
}
