:root {
  --bg: #0a0816;
  --bg-2: #120c22;
  --surface: #17122b;
  --surface-2: #211938;
  --line: #3d2f64;
  --text: #f3eeff;
  --muted: #b9acdd;
  --accent: #9a6bff;
  --accent-2: #7b50e5;
  --ok: #34d399;
  --danger: #fb7185;
}

body[data-theme="light"] {
  --bg: #eceff8;
  --bg-2: #dfe5f4;
  --surface: #f7f9ff;
  --surface-2: #ffffff;
  --line: #d4dbef;
  --text: #182037;
  --muted: #5a6788;
  --accent: #6b5af8;
  --accent-2: #5b48ee;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 15% 0%, rgba(140, 91, 255, 0.28) 0%, transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(52, 231, 215, 0.14) 0%, transparent 36%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
}

body.is-booting,
body.modal-open {
  overflow: hidden;
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

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

h1,
h2,
h3,
p,
small,
code,
pre {
  margin: 0;
}

code,
pre {
  font-family: "IBM Plex Mono", monospace;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(860px, calc(100% - 26px));
  margin: 28px auto 42px;
  display: grid;
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 18px 38px rgba(3, 5, 12, 0.4);
}

.top {
  display: grid;
  gap: 12px;
}

.brand-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.brand-line h1 {
  color: #8a7cff;
  font-size: 1.36rem;
  letter-spacing: 0.02em;
}

.brand-line p {
  font-size: 0.86rem;
  color: var(--muted);
}

.top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-link {
  color: #aeb8de;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.mini-link:hover {
  border-bottom-color: #aeb8de;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: #c8d4f8;
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ok);
}

.status[data-state="error"] i {
  background: var(--danger);
}

.top-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.search-box {
  display: grid;
  gap: 5px;
}

.search-box span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: #121a35;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 11px;
  outline: none;
}

body[data-theme="light"] .search-box input {
  background: #f0f3fc;
}

.search-box input:focus {
  border-color: var(--accent);
}

.about {
  display: grid;
  gap: 11px;
}

.about h2,
.stats h2,
.docs h2,
.license h2 {
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.hero-image {
  border-radius: 8px;
  border: 1px solid var(--line);
  max-height: 240px;
  width: 100%;
  object-fit: cover;
}

.about p,
.license p {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.45;
}

.cta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  color: #d9e0ff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 9px;
  background: #131b37;
  font-size: 0.82rem;
  font-weight: 600;
}

.action-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.action-btn:hover {
  border-color: var(--accent);
}

.action-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #ffffff;
}

.stats {
  display: grid;
  gap: 10px;
}

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

.metric {
  text-align: center;
}

.metric small {
  color: var(--muted);
  font-size: 0.74rem;
}

.metric strong {
  display: block;
  margin-top: 6px;
  color: #8b7dff;
  font-size: 1.2rem;
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  font-size: 0.77rem;
  color: var(--muted);
}

.meta-strip strong {
  color: var(--text);
}

.empty-filter {
  font-size: 0.86rem;
  color: var(--muted);
}

.docs {
  display: grid;
  gap: 10px;
}

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

.endpoint-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  background: #131a35;
  display: grid;
  gap: 7px;
  cursor: pointer;
}

body[data-theme="light"] .endpoint-card {
  background: #eff3fc;
}

.endpoint-card h3 {
  font-size: 0.96rem;
}

.endpoint-card p,
.endpoint-card code {
  color: var(--muted);
  font-size: 0.76rem;
}

.endpoint-card:hover {
  border-color: var(--accent);
}

.endpoint-card[data-endpoint-name="ytmp4"] {
  border-color: rgba(121, 143, 255, 0.45);
  background:
    linear-gradient(180deg, rgba(129, 98, 255, 0.08) 0%, rgba(19, 26, 53, 1) 72%);
}

body[data-theme="light"] .endpoint-card[data-endpoint-name="ytmp4"] {
  background:
    linear-gradient(180deg, rgba(129, 98, 255, 0.08) 0%, rgba(239, 243, 252, 1) 72%);
}

.endpoint-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.method-pill {
  font-size: 0.66rem;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
}

.endpoint-arrow {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  width: 26px;
  height: 24px;
  border-radius: 7px;
  cursor: pointer;
}

.endpoint-arrow:hover {
  border-color: var(--accent);
}

.license {
  display: grid;
  gap: 8px;
}

.footer {
  text-align: center;
  color: #7482b4;
  font-size: 0.75rem;
  padding: 8px;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(7, 10, 20, 0.88);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-box {
  min-width: min(86vw, 280px);
  padding: 20px;
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111932;
}

.loader-box strong {
  color: #8bffbf;
  letter-spacing: 0.08em;
}

.loader-box span {
  color: var(--muted);
  font-size: 0.86rem;
}

.loader-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6d5cff 0%, #8bffbf 100%);
  animation: pulse 1.2s ease-in-out infinite;
}

.button-primary,
.button-secondary {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 9px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.button-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: transparent;
  color: #fff;
}

.button-secondary {
  background: #141c38;
  color: var(--text);
}

body[data-theme="light"] .button-secondary {
  background: #f0f3fc;
}

.button-dark {
  background: transparent;
}

.compact {
  padding: 8px 10px;
  font-size: 0.82rem;
}

.theme-toggle-copy {
  display: grid;
  justify-items: start;
  text-align: left;
}

.theme-toggle-copy small {
  font-size: 0.64rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.theme-toggle-visual {
  width: 44px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  position: relative;
}

.theme-toggle-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 180ms ease;
}

body[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(22px);
}

.tester-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 10px;
}

.tester-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 8, 18, 0.72);
}

.tester-sheet {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #111932;
  padding: 14px;
  display: grid;
  gap: 10px;
}

body[data-theme="light"] .tester-sheet {
  background: #ffffff;
}

.tester-sheet-head,
.panel-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tester-description {
  color: var(--muted);
  font-size: 0.86rem;
}

.route-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.route-chip span,
.route-chip code {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 0.75rem;
}

.tester-form,
.tester-fields,
.tester-data {
  display: grid;
  gap: 9px;
}

.tester-field {
  display: grid;
  gap: 5px;
}

.field-block {
  display: grid;
  gap: 6px;
}

.field-block > span {
  font-size: 0.79rem;
  color: var(--muted);
}

.tester-field input,
.tester-field select,
.field-block input,
.field-block select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #111a35;
  color: var(--text);
}

body[data-theme="light"] .tester-field input,
body[data-theme="light"] .tester-field select,
body[data-theme="light"] .field-block input,
body[data-theme="light"] .field-block select {
  background: #f0f3fc;
}

.field-block select[name="quality"] {
  border-color: rgba(122, 146, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(122, 146, 255, 0.2);
}

.tester-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tester-data pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #101832;
  color: #cfd8fb;
  font-size: 0.76rem;
}

body[data-theme="light"] .tester-data pre {
  background: #f0f3fc;
  color: #1e2741;
}

.link-button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 760px) {
  .top-actions {
    grid-template-columns: 1fr;
  }

  .cta-row,
  .endpoint-grid,
  .stats-grid,
  .meta-strip {
    grid-template-columns: 1fr;
  }

  .docs-page .plan-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.docs-page .container {
  width: min(700px, calc(100% - 22px));
  margin: 20px auto 30px;
  gap: 11px;
}

.compact-pro .container {
  width: min(700px, calc(100% - 16px));
  margin: 12px auto 20px;
  gap: 8px;
}

.compact-pro .card {
  padding: 9px;
  border-radius: 10px;
}

.compact-pro .panel-row-head h2,
.compact-pro .panel-row-head h3 {
  font-size: 0.9rem;
}

.compact-pro .helper,
.compact-pro .auth-gate-head p {
  font-size: 0.78rem;
}

.compact-pro .endpoint-card {
  padding: 8px;
}

.compact-pro .endpoint-card h3 {
  font-size: 0.8rem;
}

.compact-pro .endpoint-card p,
.compact-pro .endpoint-card code {
  font-size: 0.7rem;
}

.docs-page .card {
  border-radius: 11px;
  padding: 11px;
}

.docs-page .brand-line h1 {
  font-size: 1.15rem;
  background: linear-gradient(90deg, #8d7fff 0%, #67d0ff 45%, #7dffb6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.docs-page .brand-line p,
.docs-page .search-box input,
.docs-page .endpoint-card p,
.docs-page .endpoint-card code {
  font-size: 0.74rem;
}

.docs-page .top-actions {
  gap: 8px;
}

.docs-page .stats-grid,
.docs-page .cta-row,
.docs-page .endpoint-grid {
  gap: 7px;
}

.docs-page .endpoint-card {
  padding: 9px;
  border-radius: 8px;
}

.docs-page .endpoint-card h3 {
  font-size: 0.84rem;
}

.docs-page .meta-strip {
  font-size: 0.72rem;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-group {
  border-radius: 10px;
}

.category-toggle {
  width: 100%;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(119, 108, 255, 0.15) 0%, rgba(255, 255, 255, 0.03) 100%);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.category-title {
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(90deg, #d0cbff 0%, #8dc5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.category-title::before {
  content: "";
  width: 12px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(180deg, #8d7fff 0%, #67d0ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.category-toggle small {
  color: var(--muted);
  font-size: 0.72rem;
}

.category-group:nth-child(2) .category-toggle {
  background: linear-gradient(180deg, rgba(92, 196, 255, 0.15) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.category-group:nth-child(3) .category-toggle {
  background: linear-gradient(180deg, rgba(115, 255, 199, 0.14) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.category-group:nth-child(4) .category-toggle {
  background: linear-gradient(180deg, rgba(255, 203, 122, 0.14) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.category-toggle::after {
  content: "▾";
  margin-left: 8px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.category-toggle.is-open::after {
  transform: rotate(180deg);
}

.category-content {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .docs-page .container {
    width: min(700px, calc(100% - 14px));
    margin: 12px auto 20px;
  }

  .docs-page .top-actions {
    grid-template-columns: 1fr;
  }
}

body.auth-locked {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 20px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 12%, rgba(83, 166, 255, 0.24) 0, rgba(83, 166, 255, 0) 33%),
    radial-gradient(circle at 85% 85%, rgba(159, 119, 255, 0.22) 0, rgba(159, 119, 255, 0) 32%),
    rgba(4, 8, 21, 0.78);
  backdrop-filter: blur(10px);
}

.auth-gate-card {
  position: relative;
  overflow: hidden;
  width: min(1020px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  border-radius: 22px;
  border: 1px solid rgba(137, 176, 255, 0.45);
  background:
    linear-gradient(155deg, rgba(16, 25, 50, 0.97) 0%, rgba(12, 19, 39, 0.98) 58%, rgba(9, 14, 30, 0.98) 100%);
  box-shadow: 0 24px 65px rgba(2, 5, 14, 0.65);
  padding: 20px;
  animation: gateFloatIn 260ms ease;
}

.auth-gate-card::before,
.auth-gate-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-gate-card::before {
  width: 260px;
  height: 260px;
  right: -110px;
  top: -115px;
  background: radial-gradient(circle, rgba(97, 149, 255, 0.32) 0, rgba(97, 149, 255, 0) 68%);
}

.auth-gate-card::after {
  width: 220px;
  height: 220px;
  left: -95px;
  bottom: -95px;
  background: radial-gradient(circle, rgba(174, 121, 255, 0.26) 0, rgba(174, 121, 255, 0) 70%);
}

.auth-gate-media {
  position: relative;
  margin: 0;
  min-height: 440px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(160, 118, 255, 0.56);
  box-shadow:
    0 0 0 1px rgba(152, 112, 255, 0.24),
    0 18px 35px rgba(6, 3, 18, 0.58);
  background: linear-gradient(170deg, rgba(18, 12, 38, 0.94), rgba(8, 8, 20, 0.94));
}

.auth-gate-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 18%, rgba(175, 125, 255, 0.32) 0%, rgba(175, 125, 255, 0) 42%),
    radial-gradient(circle at 78% 82%, rgba(108, 222, 255, 0.25) 0%, rgba(108, 222, 255, 0) 40%),
    linear-gradient(180deg, rgba(8, 10, 25, 0) 0%, rgba(6, 7, 18, 0.42) 100%);
}

.auth-gate-media::after {
  content: "";
  position: absolute;
  top: -35%;
  left: -55%;
  width: 58%;
  height: 175%;
  z-index: 2;
  pointer-events: none;
  transform: rotate(14deg);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: authShineSweep 6.8s ease-in-out infinite;
}

.auth-register-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.04);
  animation: authImagePulse 7.2s ease-in-out infinite;
}

.auth-gate-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 4px 2px 2px;
}

.auth-gate-head {
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.auth-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.67rem;
  color: #a5dfff;
  font-weight: 700;
}

.auth-gate-head h2 {
  font-size: clamp(1.32rem, 2.7vw, 1.9rem);
  line-height: 1.02;
  color: #f6f9ff;
  text-shadow: 0 5px 18px rgba(104, 72, 206, 0.36);
}

.auth-gate-head p {
  color: #b7c6e6;
  font-size: 0.87rem;
  max-width: 48ch;
}

.auth-gate-head small {
  color: #9fcfff;
  font-weight: 600;
}

.auth-neon-hero {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(156, 116, 255, 0.55);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(38, 24, 72, 0.9) 0%, rgba(20, 16, 36, 0.95) 100%);
  box-shadow: 0 0 0 1px rgba(93, 232, 216, 0.16), 0 16px 28px rgba(9, 6, 20, 0.58);
}

.auth-neon-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(93, 232, 216, 0.12) 0%, rgba(154, 107, 255, 0.16) 70%, transparent 100%);
}

.auth-neon-hero img {
  width: 100%;
  max-height: 122px;
  object-fit: cover;
  border-bottom: 1px solid rgba(156, 116, 255, 0.45);
}

.auth-neon-copy {
  padding: 9px 11px;
  display: grid;
  gap: 3px;
}

.auth-neon-copy strong {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #efe8ff;
}

.auth-neon-copy span {
  font-size: 0.74rem;
  color: #c5b9ea;
}

.auth-hints {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-hints span {
  border: 1px solid rgba(161, 208, 255, 0.34);
  background: rgba(28, 45, 88, 0.55);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.71rem;
  color: #dbf1ff;
  font-weight: 600;
}

.auth-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-tabs [data-auth-view] {
  border: 1px solid rgba(136, 166, 235, 0.32);
  border-radius: 11px;
  background: rgba(18, 28, 54, 0.63);
  color: #c5d0e8;
  font-weight: 600;
  min-height: 42px;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 140ms ease;
}

.auth-tabs [data-auth-view]:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 198, 255, 0.5);
}

.auth-tabs [data-auth-view].is-active {
  border-color: rgba(159, 129, 255, 0.86);
  color: #fff;
  background: linear-gradient(180deg, rgba(145, 122, 255, 0.48) 0%, rgba(98, 80, 228, 0.29) 100%);
  box-shadow:
    0 0 0 1px rgba(224, 216, 255, 0.16) inset,
    0 8px 20px rgba(74, 59, 175, 0.32);
}

.auth-oauth-row {
  display: grid;
  gap: 6px;
}

.auth-oauth-button {
  width: 100%;
  min-height: 42px;
  border-radius: 11px;
  border-color: rgba(150, 174, 238, 0.5);
  background: linear-gradient(180deg, rgba(17, 27, 56, 0.95), rgba(12, 19, 42, 0.92));
  font-weight: 700;
}

.auth-oauth-button.is-disabled {
  opacity: 0.62;
}

.github-mark {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.github-mark svg {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-oauth-note {
  font-size: 0.7rem;
  color: #9eb2d8;
}

body[data-theme="light"] .auth-oauth-button {
  background: linear-gradient(180deg, #eaf0ff, #dde7ff);
  color: #16203d;
  border-color: #b7c8ee;
}

body[data-theme="light"] .auth-oauth-note {
  color: #556182;
}

@keyframes gateFloatIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authImagePulse {
  0%,
  100% {
    transform: scale(1.04) translateY(0);
  }
  50% {
    transform: scale(1.08) translateY(-4px);
  }
}

@keyframes authShineSweep {
  0%,
  30% {
    transform: translateX(-35%) rotate(14deg);
    opacity: 0;
  }
  45% {
    opacity: 0.72;
  }
  75% {
    transform: translateX(235%) rotate(14deg);
    opacity: 0;
  }
  100% {
    transform: translateX(235%) rotate(14deg);
    opacity: 0;
  }
}

.auth-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  border: 1px solid rgba(132, 157, 214, 0.24);
  background: linear-gradient(180deg, rgba(11, 18, 38, 0.72) 0%, rgba(10, 17, 35, 0.57) 100%);
  border-radius: 14px;
  padding: 12px;
  box-shadow:
    inset 0 1px 0 rgba(183, 209, 255, 0.08),
    0 12px 26px rgba(4, 8, 20, 0.36);
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  font-size: 0.7rem;
  color: #9eb1d3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-form input,
.auth-form textarea {
  width: 100%;
  border: 1px solid rgba(136, 157, 207, 0.36);
  background: rgba(11, 18, 37, 0.84);
  color: #f1f5ff;
  border-radius: 11px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

body[data-theme="light"] .auth-form input,
body[data-theme="light"] .auth-form textarea {
  background: #eff3ff;
  border-color: #c7d0e8;
  color: #182037;
}

.auth-form textarea {
  min-height: 74px;
  resize: vertical;
}

.auth-form input:focus,
.auth-form textarea:focus {
  border-color: #9e88ff;
  box-shadow: 0 0 0 3px rgba(151, 129, 255, 0.22);
  transform: translateY(-1px);
}

.auth-form .button-primary {
  margin-top: 2px;
  min-height: 42px;
  border-radius: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.auth-captcha-wrap {
  display: grid;
  gap: 6px;
}

.auth-captcha-slot {
  min-height: 65px;
}

.auth-captcha-wrap small {
  font-size: 0.67rem;
  color: #9eb2d8;
}

.auth-feedback {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: #b3c0dd;
  border-left: 2px solid rgba(157, 183, 243, 0.42);
  padding-left: 8px;
}

.auth-feedback.is-success {
  color: #76e5b7;
  border-left-color: rgba(76, 207, 153, 0.74);
}

.auth-feedback.is-error {
  color: #ff92a2;
  border-left-color: rgba(250, 113, 137, 0.84);
}

@media (max-width: 940px) {
  .auth-gate-card {
    width: min(680px, 100%);
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-gate-media {
    min-height: 250px;
  }
}

.account {
  display: grid;
  gap: 11px;
}

.auth-locked-note,
#account-guest {
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
}

#profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.profile-copy {
  display: grid;
  gap: 2px;
}

.profile-copy span,
.profile-copy small {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

#profile-username {
  color: #9bc9ff;
  font-weight: 600;
}

.profile-stats {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-stats article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.profile-stats small {
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-stats strong {
  font-size: 0.86rem;
}

.profile-form {
  margin-top: 10px;
}

.recovery-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.recovery-panel h3 {
  font-size: 0.85rem;
}

#recovery-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.recovery-key-card {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.recovery-key-card code {
  font-size: 0.78rem;
}

.api-key-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.api-key-summary div,
.policy-card-head {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 20, 39, 0.5);
}

.api-key-summary div {
  padding: 10px 12px;
  display: grid;
  gap: 5px;
}

.api-key-summary span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.api-key-summary strong {
  font-size: 0.92rem;
  word-break: break-word;
}

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

.policy-card-head {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.policy-card-head strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.policy-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.api-key-mode-grid {
  display: grid;
  gap: 8px;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.api-key-mode-grid label {
  display: grid;
  gap: 6px;
}

.api-key-mode-grid span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.api-key-mode-grid input,
.api-key-mode-grid select {
  width: 100%;
  border: 1px solid var(--line);
  background: #121a35;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 11px;
  outline: none;
}

.api-key-mode-grid input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.api-key-ips-field textarea {
  min-height: 110px;
  resize: vertical;
}

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

.leaderboard-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.leaderboard-list {
  display: grid;
  gap: 7px;
}

.leaderboard-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: center;
}

.leaderboard-rank {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}

.leaderboard-avatar {
  width: 28px;
  height: 28px;
}

.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.leaderboard-copy {
  display: grid;
  gap: 2px;
}

.leaderboard-copy strong {
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.leaderboard-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 31, 63, 0.6);
  color: #d9e8ff;
}

.leaderboard-badge.role-admin {
  border-color: rgba(255, 90, 90, 0.72);
  background: linear-gradient(180deg, rgba(123, 22, 31, 0.88) 0%, rgba(90, 15, 23, 0.9) 100%);
  color: #ffd7d7;
  box-shadow: 0 0 0 1px rgba(255, 141, 141, 0.2) inset;
}

.leaderboard-badge.role-vip {
  border-color: rgba(255, 191, 63, 0.66);
  background: linear-gradient(180deg, rgba(74, 52, 12, 0.9) 0%, rgba(53, 37, 8, 0.9) 100%);
  color: #ffe8b1;
}

.leaderboard-badge.role-lite {
  border-color: rgba(106, 180, 255, 0.66);
  background: linear-gradient(180deg, rgba(23, 56, 90, 0.9) 0%, rgba(17, 40, 66, 0.9) 100%);
  color: #d9edff;
}

.leaderboard-badge.role-plus {
  border-color: rgba(255, 191, 63, 0.66);
  background: linear-gradient(180deg, rgba(74, 52, 12, 0.9) 0%, rgba(53, 37, 8, 0.9) 100%);
  color: #ffe8b1;
}

.leaderboard-badge.role-pro {
  border-color: rgba(117, 236, 194, 0.66);
  background: linear-gradient(180deg, rgba(20, 76, 63, 0.92) 0%, rgba(12, 56, 46, 0.92) 100%);
  color: #c9ffe9;
}

.leaderboard-badge.role-free {
  border-color: rgba(106, 131, 184, 0.56);
  background: rgba(29, 43, 76, 0.76);
  color: #d4e0fa;
}

.leaderboard-item.is-admin {
  border-color: rgba(255, 108, 108, 0.5);
  background: linear-gradient(180deg, rgba(95, 19, 26, 0.36) 0%, rgba(28, 14, 30, 0.36) 100%);
}

.leaderboard-item.is-admin .leaderboard-rank {
  border-color: rgba(255, 102, 102, 0.76);
  color: #ffd3d3;
}

.leaderboard-item.is-vip {
  border-color: rgba(255, 202, 93, 0.5);
  background: linear-gradient(180deg, rgba(78, 57, 16, 0.35) 0%, rgba(28, 22, 17, 0.32) 100%);
}

.leaderboard-item.is-vip .leaderboard-rank {
  border-color: rgba(255, 193, 72, 0.72);
  color: #ffe6bb;
}

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

.leaderboard-copy code {
  font-size: 0.72rem;
  color: #b8ddff;
  word-break: break-all;
}

.admin-quota-input,
.admin-apikey-input,
.admin-password-input,
.admin-role-select,
.admin-vip-days-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #121a35;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 9px;
  outline: none;
}

.admin-role-select {
  cursor: pointer;
}

.admin-vip-days-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.admin-role-select:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.admin-user-card {
  border-radius: 12px;
  padding: 10px;
}

.admin-user-card .leaderboard-copy {
  gap: 5px;
}

.admin-section-title {
  margin-top: 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #b7caec;
  font-weight: 700;
}

.admin-locked-note {
  font-size: 0.72rem;
  color: #ffb3b3;
}

.admin-user-card .leaderboard-copy > span {
  line-height: 1.35;
}

.admin-access-row {
  grid-template-columns: minmax(120px, 1fr) minmax(130px, 1fr) auto;
  align-items: center;
}

.admin-user-card.role-admin {
  border-color: rgba(255, 111, 111, 0.5);
  background: linear-gradient(180deg, rgba(82, 15, 24, 0.35), rgba(25, 14, 27, 0.36));
}

.admin-user-card.role-vip {
  border-color: rgba(255, 207, 106, 0.48);
  background: linear-gradient(180deg, rgba(77, 53, 10, 0.34), rgba(30, 23, 14, 0.34));
}

.admin-user-card.role-lite {
  border-color: rgba(125, 185, 255, 0.46);
  background: linear-gradient(180deg, rgba(24, 55, 90, 0.35), rgba(16, 33, 57, 0.35));
}

.admin-user-card.role-plus {
  border-color: rgba(255, 207, 106, 0.48);
  background: linear-gradient(180deg, rgba(77, 53, 10, 0.34), rgba(30, 23, 14, 0.34));
}

.admin-user-card.role-pro {
  border-color: rgba(126, 235, 198, 0.5);
  background: linear-gradient(180deg, rgba(22, 74, 62, 0.35), rgba(14, 45, 39, 0.35));
}

@media (max-width: 760px) {
  .admin-access-row {
    grid-template-columns: 1fr;
  }
}

.admin-create-form {
  border-color: rgba(125, 170, 255, 0.42);
  background:
    linear-gradient(160deg, rgba(15, 26, 52, 0.9) 0%, rgba(13, 22, 45, 0.85) 100%),
    radial-gradient(circle at 100% 0%, rgba(124, 174, 255, 0.18), rgba(124, 174, 255, 0));
}

.admin-create-form .recovery-key-card {
  border-color: rgba(132, 182, 255, 0.44);
  background: rgba(20, 34, 70, 0.55);
}

.admin-create-form .recovery-key-card code {
  color: #d7ebff;
  letter-spacing: 0.06em;
}

body[data-theme="light"] .admin-quota-input,
body[data-theme="light"] .admin-apikey-input,
body[data-theme="light"] .admin-password-input,
body[data-theme="light"] .admin-role-select,
body[data-theme="light"] .admin-vip-days-input {
  background: #f0f3fc;
}

body[data-theme="light"] .admin-create-form {
  border-color: #b6c6e6;
  background: linear-gradient(160deg, #f7fbff 0%, #edf3ff 100%);
}

body[data-theme="light"] .admin-user-card.role-admin {
  border-color: #eab8b8;
  background: linear-gradient(180deg, #fff1f1 0%, #ffeaea 100%);
}

body[data-theme="light"] .admin-user-card.role-vip {
  border-color: #e9d5a6;
  background: linear-gradient(180deg, #fff9eb 0%, #fff5dd 100%);
}

body[data-theme="light"] .admin-user-card.role-lite {
  border-color: #b6d6f6;
  background: linear-gradient(180deg, #f0f8ff 0%, #e7f3ff 100%);
}

body[data-theme="light"] .admin-user-card.role-plus {
  border-color: #e9d5a6;
  background: linear-gradient(180deg, #fff9eb 0%, #fff5dd 100%);
}

body[data-theme="light"] .admin-user-card.role-pro {
  border-color: #b9e8da;
  background: linear-gradient(180deg, #ecfff8 0%, #e4f9f2 100%);
}

body[data-theme="light"] .admin-section-title {
  color: #47608f;
}

body[data-theme="light"] .admin-locked-note {
  color: #b73636;
}

body[data-theme="light"] .leaderboard-badge.role-admin {
  border-color: #e96262;
  background: linear-gradient(180deg, #ffe2e2 0%, #ffd4d4 100%);
  color: #8e1010;
}

body[data-theme="light"] .leaderboard-badge.role-vip {
  border-color: #d3ac40;
  background: linear-gradient(180deg, #fff3d7 0%, #ffeab9 100%);
  color: #7b5d14;
}

body[data-theme="light"] .leaderboard-badge.role-lite {
  border-color: #6ba9e1;
  background: linear-gradient(180deg, #e8f4ff 0%, #dff0ff 100%);
  color: #1b4f84;
}

body[data-theme="light"] .leaderboard-badge.role-plus {
  border-color: #d3ac40;
  background: linear-gradient(180deg, #fff3d7 0%, #ffeab9 100%);
  color: #7b5d14;
}

body[data-theme="light"] .leaderboard-badge.role-pro {
  border-color: #54b893;
  background: linear-gradient(180deg, #e6fff7 0%, #d9f8ec 100%);
  color: #0f5f47;
}

body[data-theme="light"] .leaderboard-badge.role-free {
  border-color: #96abd1;
  background: #edf3ff;
  color: #35527e;
}

body[data-theme="light"] .leaderboard-item.is-admin {
  border-color: #eab5b5;
  background: linear-gradient(180deg, #fff1f1 0%, #ffe8e8 100%);
}

body[data-theme="light"] .leaderboard-item.is-vip {
  border-color: #e8d3a1;
  background: linear-gradient(180deg, #fff9eb 0%, #fff4d8 100%);
}

.leaderboard-item.route-item {
  grid-template-columns: auto 1fr auto;
}

.leaderboard-metric {
  color: var(--muted);
  font-size: 0.74rem;
}

.leaderboard-empty {
  color: var(--muted);
  font-size: 0.78rem;
}

/* Unified dark-violet style for docs + admin pages */
.docs-page .card {
  border-color: #4c3b7a;
  background: linear-gradient(180deg, #17122b 0%, #211938 100%);
  box-shadow: 0 20px 42px rgba(4, 2, 12, 0.5);
}

.docs-page .brand-line h1 {
  background: linear-gradient(90deg, #cdb8ff 0%, #9f7cff 48%, #5de8d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.docs-page .mini-link {
  color: #d9ccff;
}

.docs-page .search-box input,
.docs-page .auth-form input,
.docs-page .auth-form textarea,
.docs-page .auth-form select,
.docs-page .admin-quota-input,
.docs-page .admin-apikey-input,
.docs-page .admin-password-input {
  background: #1a1430;
  border-color: #4c3b7a;
  color: #f4eeff;
}

.docs-page .search-box input::placeholder,
.docs-page .auth-form input::placeholder,
.docs-page .auth-form textarea::placeholder {
  color: #9d91bf;
}

.docs-page .button-primary {
  background: linear-gradient(180deg, #9a6bff 0%, #7b50e5 100%);
  box-shadow: 0 10px 22px rgba(123, 80, 229, 0.35);
}

.docs-page .button-secondary {
  background: #221a3d;
  border-color: #4c3b7a;
  color: #f0eaff;
}

.docs-page .button-secondary:hover,
.docs-page .button-primary:hover,
.docs-page .endpoint-card:hover,
.docs-page .category-toggle:hover {
  border-color: #5de8d8;
  box-shadow: 0 0 0 3px rgba(93, 232, 216, 0.16);
}

.docs-page .endpoint-card {
  background: linear-gradient(180deg, #21193a 0%, #18142b 100%);
  border-color: #4a3a77;
}

.docs-page .endpoint-card[data-endpoint-name="ytmp4"] {
  border-color: rgba(154, 107, 255, 0.7);
  background: linear-gradient(180deg, rgba(154, 107, 255, 0.17) 0%, #18142b 78%);
}

.docs-page .category-toggle {
  background: linear-gradient(180deg, rgba(154, 107, 255, 0.2) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: #4a3a77;
}

.docs-page .auth-hints span,
.docs-page .badge,
.docs-page .method-pill {
  border-color: #5d4a97;
  background: #231b3f;
  color: #dfd3ff;
}

@media (max-width: 760px) {
  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .profile-head {
    grid-template-columns: auto 1fr;
  }

  .profile-actions {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  #admin-panel-link,
  #logout-button {
    width: 100%;
  }

  .profile-stats,
  .leaderboard-grid {
    grid-template-columns: 1fr;
  }

  .auth-gate {
    padding: 10px;
    align-items: flex-start;
    overflow-y: auto;
  }
}

/* Dashboard Pro Layout Refresh */
body.docs-page {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 5%, rgba(36, 130, 255, 0.25), transparent 34%),
    radial-gradient(circle at 87% 0%, rgba(36, 228, 219, 0.19), transparent 36%),
    linear-gradient(180deg, #070d1f 0%, #0d1630 100%);
}

body.docs-page h1,
body.docs-page h2,
body.docs-page h3 {
  font-family: "Syne", "Space Grotesk", sans-serif;
  letter-spacing: 0.01em;
}

body.docs-page code,
body.docs-page pre {
  font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
}

body.docs-page.compact-pro {
  --accent: #33a7ff;
  --accent-2: #2478e5;
  --line: #2d4478;
  --surface: #111f3d;
  --surface-2: #0e1a32;
  --text: #eaf2ff;
  --muted: #a8bddf;
}

body.docs-page.compact-pro[data-theme="light"] {
  --bg: #eaf1ff;
  --bg-2: #dde7ff;
  --surface: #f6f9ff;
  --surface-2: #eaf1ff;
  --line: #bfd2f2;
  --text: #13213f;
  --muted: #54688f;
}

.docs-page.compact-pro .container.dashboard-grid-pro {
  width: min(1420px, calc(100% - 26px));
  margin: 20px auto 32px;
  gap: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  grid-template-areas:
    "top top"
    "account stats"
    "account analytics"
    "docs examples"
    "docs support"
    "footer footer";
  align-items: start;
}

.dashboard-grid-pro > .top {
  grid-area: top;
}

.dashboard-grid-pro > .account {
  grid-area: account;
}

.dashboard-grid-pro > .stats-panel {
  grid-area: stats;
}

.dashboard-grid-pro > .command-analytics {
  grid-area: analytics;
}

.dashboard-grid-pro > .docs {
  grid-area: docs;
}

.dashboard-grid-pro > .bot-examples {
  grid-area: examples;
}

.dashboard-grid-pro > .compact-support {
  grid-area: support;
}

.dashboard-grid-pro > .footer {
  grid-area: footer;
}

.dashboard-grid-pro > #empty-filter-state {
  grid-column: 1 / -1;
}

.docs-page .top {
  position: relative;
  overflow: hidden;
  gap: 13px;
}

.docs-page .top::before {
  content: "";
  position: absolute;
  inset: -45% auto auto -10%;
  width: 50%;
  height: 160%;
  transform: rotate(18deg);
  pointer-events: none;
  background: linear-gradient(90deg, rgba(56, 177, 255, 0.17), rgba(56, 177, 255, 0));
}

.docs-page .brand-line {
  gap: 12px;
}

.docs-page .brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(129, 174, 247, 0.62);
  box-shadow: 0 14px 28px rgba(8, 20, 45, 0.42);
}

.docs-page .brand-line h1 {
  font-size: clamp(1.24rem, 2.2vw, 1.72rem);
}

.docs-page .brand-line p {
  max-width: 68ch;
  font-size: 0.85rem;
  line-height: 1.45;
}

.docs-page .top-actions {
  grid-template-columns: auto minmax(0, 1fr);
}

.docs-page .top-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.docs-page .top-kpis span {
  border: 1px solid rgba(120, 161, 231, 0.42);
  background: rgba(20, 39, 78, 0.5);
  color: #dce9ff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.docs-page .account,
.docs-page .stats-panel,
.docs-page .command-analytics,
.docs-page .docs,
.docs-page .bot-examples,
.docs-page .compact-support {
  position: relative;
  overflow: hidden;
}

.docs-page .account::before,
.docs-page .docs::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(93, 180, 255, 0.4), rgba(93, 180, 255, 0));
}

.docs-page .panel-row-head {
  align-items: center;
}

.docs-page .panel-row-head h2 {
  font-size: 1rem;
}

.docs-page .helper {
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.45;
}

.docs-page .profile-head {
  gap: 11px;
  padding: 10px;
  border: 1px solid rgba(126, 167, 235, 0.35);
  border-radius: 12px;
  background: rgba(17, 31, 63, 0.52);
}

.docs-page #profile-avatar {
  width: 66px;
  height: 66px;
  border-radius: 14px;
}

.docs-page .profile-stats {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-top: 12px;
}

.docs-page .profile-stats article {
  border-radius: 11px;
  background: rgba(13, 26, 54, 0.58);
}

.docs-page .recovery-key-card {
  flex-wrap: wrap;
  gap: 10px;
  border-radius: 11px;
  padding: 10px;
}

.docs-page .recovery-key-card .cta-row {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.docs-page .recovery-panel {
  border-radius: 11px;
  background: rgba(12, 23, 49, 0.45);
}

.docs-page .leaderboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.docs-page .leaderboard-panel {
  border-radius: 11px;
  background: rgba(12, 24, 49, 0.55);
}

.docs-page .leaderboard-item {
  border-radius: 10px;
  background: rgba(15, 29, 58, 0.55);
}

.docs-page .stats-panel {
  gap: 12px;
}

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

.docs-page .stats-grid .metric {
  border-radius: 11px;
  background: rgba(17, 32, 64, 0.56);
  border-color: rgba(120, 162, 234, 0.34);
}

.docs-page .stats-grid .metric strong {
  font-size: 1.12rem;
  color: #66c9ff;
}

.docs-page .meta-strip {
  border-radius: 11px;
  background: rgba(16, 30, 58, 0.5);
  border-color: rgba(118, 156, 227, 0.33);
}

.docs-page .command-analytics .route-chart {
  display: grid;
  gap: 8px;
}

.docs-page .route-chart .chart-row {
  display: grid;
  gap: 4px;
}

.docs-page .route-chart .chart-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(110, 140, 197, 0.28);
  overflow: hidden;
}

.docs-page .route-chart .chart-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3bb3ff 0%, #35e4cc 100%);
}

.docs-page .route-chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.75rem;
}

.docs-page .docs-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.docs-page .docs-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.docs-page .docs-hero p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.docs-page .docs-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.docs-page .docs-chip {
  border: 1px solid rgba(127, 165, 233, 0.42);
  background: rgba(18, 36, 71, 0.54);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #dbe9ff;
}

.docs-page .panel-soft {
  border: 1px solid rgba(109, 148, 218, 0.34);
  background: rgba(11, 23, 50, 0.32);
  border-radius: 11px;
  padding: 8px;
}

.docs-page .category-toggle {
  border-radius: 10px;
}

.docs-page .category-title {
  color: #e8f2ff;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

.docs-page .endpoint-grid-docs {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.docs-page .bot-examples .examples-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr;
}

.docs-page .plan-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.shop-page .shop-section {
  overflow: hidden;
}

.shop-page .shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.shop-page .shop-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(123, 162, 232, 0.32);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.96) 0%, rgba(234, 239, 251, 0.9) 100%);
  box-shadow: 0 18px 40px rgba(35, 45, 70, 0.12);
  display: grid;
  gap: 12px;
  padding: 14px;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.shop-page .shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(35, 45, 70, 0.18);
  border-color: rgba(89, 124, 210, 0.45);
}

.shop-page .shop-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
}

.shop-page .shop-copy {
  display: grid;
  gap: 8px;
}

.shop-page .shop-tag {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(74, 115, 232, 0.1);
  color: #3350b7;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.shop-page .shop-copy h3 {
  font-size: 1.3rem;
  margin: 0;
  color: #182238;
}

.shop-page .shop-copy p {
  margin: 0;
  color: #48556f;
  line-height: 1.45;
}

.shop-page .shop-copy ul {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  display: grid;
  gap: 4px;
}

.shop-page .shop-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop-page .shop-bottom strong {
  font-size: 1.25rem;
  color: #16233d;
}

.shop-page .shop-buy-btn {
  text-decoration: none;
}

.shop-page .shop-free {
  background: linear-gradient(180deg, rgba(239, 245, 255, 0.98) 0%, rgba(227, 236, 252, 0.93) 100%);
}

.shop-page .shop-lite {
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.98) 0%, rgba(250, 236, 213, 0.94) 100%);
}

.shop-page .shop-plus {
  background: linear-gradient(180deg, rgba(238, 248, 243, 0.98) 0%, rgba(219, 240, 230, 0.94) 100%);
}

.shop-page .shop-pro {
  background: linear-gradient(180deg, rgba(245, 238, 255, 0.98) 0%, rgba(228, 218, 247, 0.94) 100%);
}

.docs-page .plan-card {
  border: 1px solid rgba(123, 162, 232, 0.35);
  border-radius: 10px;
  padding: 10px;
  background: rgba(13, 26, 54, 0.56);
  display: grid;
  gap: 7px;
}

.docs-page .plan-card img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(129, 167, 235, 0.36);
}

.docs-page .plan-card h3 {
  font-size: 0.92rem;
}

.docs-page .plan-card strong {
  font-size: 1rem;
  color: #8fddff;
}

.docs-page .plan-card p {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}

.docs-page .plan-card.plan-free {
  border-color: rgba(136, 166, 216, 0.45);
}

.docs-page .plan-card.plan-lite {
  border-color: rgba(106, 180, 255, 0.5);
}

.docs-page .plan-card.plan-plus {
  border-color: rgba(255, 196, 90, 0.5);
}

.docs-page .plan-card.plan-pro {
  border-color: rgba(117, 236, 194, 0.5);
}

.docs-page .bot-examples .tester-data {
  border: 1px solid rgba(123, 162, 232, 0.35);
  border-radius: 10px;
  padding: 9px;
  background: rgba(13, 26, 54, 0.56);
}

.docs-page .bot-examples pre {
  margin: 0;
  font-size: 0.74rem;
}

.docs-page .compact-support .cta-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.docs-page .compact-support .action-btn {
  background: rgba(17, 34, 68, 0.6);
  border-color: rgba(132, 172, 243, 0.4);
}

.docs-page .footer {
  border: 1px solid rgba(113, 152, 224, 0.28);
  border-radius: 12px;
  background: rgba(8, 18, 40, 0.45);
  color: #aac0e6;
}

@media (max-width: 1080px) {
  .docs-page.compact-pro .container.dashboard-grid-pro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "top"
      "account"
      "stats"
      "analytics"
      "docs"
      "examples"
      "support"
      "footer";
    width: min(920px, calc(100% - 18px));
    margin: 12px auto 24px;
  }

  .docs-page .compact-support .cta-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .docs-page .top-actions {
    grid-template-columns: 1fr;
  }

  .docs-page .top-kpis {
    gap: 6px;
  }

  .docs-page .top-kpis span {
    font-size: 0.66rem;
    padding: 4px 8px;
  }

  .docs-page .profile-head {
    grid-template-columns: auto 1fr;
  }

  .docs-page .profile-actions {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .docs-page .stats-grid,
  .docs-page .leaderboard-grid,
  .docs-page .meta-strip,
  .docs-page .endpoint-grid-docs {
    grid-template-columns: 1fr;
  }

  .docs-page .docs-hero {
    flex-direction: column;
  }
}

/* ===== Admin V2 ===== */
body.admin-v2 {
  margin: 0;
  color: #edf2ff;
  font-family: "Sora", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 0% -10%, rgba(20, 184, 166, 0.18), transparent 60%),
    radial-gradient(1000px 420px at 100% 0%, rgba(56, 189, 248, 0.2), transparent 56%),
    linear-gradient(180deg, #071226 0%, #0b1832 100%);
}

.admin-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 22px auto 40px;
  display: grid;
  gap: 16px;
}

.admin-hero,
.admin-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  background: rgba(9, 18, 39, 0.76);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(2, 8, 20, 0.36);
}

.admin-hero {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #67e8f9;
  font-weight: 700;
}

.admin-hero h1 {
  margin: 0;
  font-size: 1.45rem;
}

.admin-hero-copy {
  margin: 8px 0 0;
  color: #9fb2cf;
  font-size: 0.9rem;
}

.admin-hero-actions {
  display: flex;
  gap: 10px;
}

.admin-link {
  text-decoration: none;
  color: #c7d2fe;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 600;
}

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

.admin-card {
  padding: 16px;
}

.admin-card h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.admin-form {
  display: grid;
  gap: 10px;
}

.admin-form label {
  display: grid;
  gap: 6px;
}

.admin-form label span {
  font-size: 0.8rem;
  color: #9fb2cf;
}

.admin-form input,
.admin-form select {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #eef2ff;
  border-radius: 10px;
  padding: 10px 11px;
  outline: none;
}

.admin-form input:focus,
.admin-form select:focus {
  border-color: #22d3ee;
}

.admin-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-row-full {
  grid-column: 1 / -1;
}

.admin-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 9px 11px;
  font-weight: 600;
  cursor: pointer;
}

.admin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  border-color: transparent;
  color: #071225;
}

.admin-feedback {
  margin: 8px 0 0;
  color: #9fb2cf;
  font-size: 0.88rem;
}

.admin-feedback.ok {
  color: #34d399;
}

.admin-feedback.error {
  color: #fb7185;
}

.admin-muted {
  color: #8ea3c2;
  font-size: 0.84rem;
}

.admin-stat-list {
  display: grid;
  gap: 8px;
}

.admin-stat-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(8, 16, 32, 0.55);
}

.admin-stat-list span {
  color: #9fb2cf;
  font-size: 0.85rem;
}

.admin-stat-list strong {
  color: #f8fafc;
  font-size: 0.86rem;
}

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

.admin-recovery {
  margin-top: 10px;
  border: 1px dashed rgba(34, 211, 238, 0.5);
  border-radius: 10px;
  background: rgba(8, 20, 40, 0.55);
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-recovery code {
  font-family: "JetBrains Mono", monospace;
  color: #67e8f9;
}

.admin-users-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.admin-users-header small {
  color: #93c5fd;
}

.admin-users-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.admin-empty {
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  padding: 14px;
  color: #93a8c6;
  text-align: center;
}

.admin-user-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(7, 15, 30, 0.75);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.admin-user-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.admin-user-card h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-user-card header p {
  margin: 3px 0 0;
  color: #8ea3c2;
  font-size: 0.82rem;
}

.role-badge {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 9px;
  border: 1px solid transparent;
}

.role-badge.free {
  color: #c7d2fe;
  border-color: rgba(199, 210, 254, 0.5);
  background: rgba(30, 41, 59, 0.45);
}

.role-badge.vip {
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(120, 53, 15, 0.4);
}

.role-badge.lite {
  color: #d9eeff;
  border-color: rgba(101, 176, 255, 0.55);
  background: rgba(23, 54, 90, 0.45);
}

.role-badge.plus {
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(120, 53, 15, 0.4);
}

.role-badge.pro {
  color: #d1ffe8;
  border-color: rgba(80, 198, 157, 0.58);
  background: rgba(17, 84, 63, 0.45);
}

.role-badge.admin {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(127, 29, 29, 0.45);
}

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

.user-meta span,
.vip-line {
  color: #9fb2cf;
  font-size: 0.82rem;
}

.api-key-line {
  display: block;
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: #67e8f9;
}

.control-group {
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
  padding-top: 9px;
  display: grid;
  gap: 7px;
}

.control-group h4 {
  margin: 0;
  font-size: 0.82rem;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.control-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.control-row input,
.control-row select {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #eef2ff;
  border-radius: 10px;
  padding: 9px 10px;
}

.locked-note {
  color: #fda4af;
  font-size: 0.78rem;
}

@media (max-width: 960px) {
  .admin-grid-top,
  .admin-create-grid,
  .user-meta,
  .control-row {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    flex-direction: column;
  }

  .admin-hero-actions {
    width: 100%;
  }
}
