/* Mia API docs — alineado con amoled.css / style.css */
.api-page {
  --api-bg: var(--mia-bg-card, #111111);
  --api-bg-hover: var(--mia-bg-card-hover, #161616);
  --api-border: var(--mia-border, #1a1a1a);
  --api-border-soft: var(--mia-border-soft, #222222);
  --api-text: var(--mia-text, #f5f5f5);
  --api-muted: var(--mia-text-muted, #a3a3a3);
  --api-accent: var(--mia-accent, #00bfff);
  --api-accent-2: var(--mia-accent-2, #1e90ff);
  --api-gold: #fde047;
  --api-gold-dim: rgba(253, 224, 71, 0.14);
  --api-radius: 1rem;
  --api-radius-sm: 0.65rem;
  --api-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ── Hero ── */
.api-hero {
  max-width: 52rem;
  margin: 0 auto 1.75rem;
  padding: 0 0.5rem;
}

.api-hero-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 1.75rem 1.5rem 1.35rem;
  border-radius: calc(var(--api-radius) + 0.25rem);
  background:
    radial-gradient(
      ellipse 80% 60% at 50% -20%,
      rgba(0, 191, 255, 0.12),
      transparent 55%
    ),
    radial-gradient(
      ellipse 50% 40% at 100% 100%,
      rgba(30, 144, 255, 0.08),
      transparent 50%
    ),
    var(--api-bg);
  border: 1px solid var(--api-border-soft);
  box-shadow: var(--api-shadow);
}

.api-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(0, 191, 255, 0.35),
    rgba(30, 144, 255, 0.08) 40%,
    rgba(253, 224, 71, 0.15)
  );
  -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;
  pointer-events: none;
}

.api-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--api-accent);
  margin-bottom: 0.65rem;
}

.api-hero-kicker::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--api-accent);
  box-shadow: 0 0 10px var(--api-accent);
}

.api-hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.45rem;
  line-height: 1.15;
}

.api-hero-lead {
  color: var(--api-muted);
  font-size: 0.92rem;
  max-width: 32rem;
  margin: 0 auto 1.1rem;
  line-height: 1.55;
}

.api-hero-url {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 191, 255, 0.22);
  border-radius: 999px;
  padding: 0.45rem 0.45rem 0.45rem 1rem;
  margin-bottom: 1rem;
}

.api-hero-url code {
  font-family: "Courier New", Consolas, monospace;
  font-size: 0.82rem;
  color: var(--api-accent);
}

.api-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--api-border-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--api-muted);
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.api-icon-btn:hover {
  color: var(--api-gold);
  border-color: rgba(253, 224, 71, 0.35);
  background: var(--api-gold-dim);
}

.api-icon-btn.copied {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.35);
}

.api-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.api-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(0, 0, 0, 0.35)
  );
  border: 1px solid var(--api-border-soft);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.76rem;
  color: var(--api-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.api-stat strong {
  color: var(--api-gold);
  font-weight: 700;
}

.api-stat-muted {
  border-style: dashed;
  opacity: 0.85;
}

/* ── Layout ── */
.api-docs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 0.75rem 4rem;
}

@media (min-width: 1024px) {
  .api-docs-layout {
    grid-template-columns: 252px minmax(0, 1fr);
    align-items: start;
  }
}

.api-docs-reference {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--api-border);
}

.api-docs-endpoints {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.api-endpoints-head {
  margin-bottom: 0.35rem;
}

.api-endpoints-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f5f5f5;
  margin: 0 0 0.35rem;
}

.api-endpoints-lead {
  margin: 0;
  color: var(--api-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ── Mode blocks (BR / STW / Cuenta) ── */
.api-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.api-mode-tab {
  border: 1px solid var(--api-border-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--api-muted);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.api-mode-tab:hover {
  color: var(--api-text);
  border-color: rgba(255, 255, 255, 0.12);
}

.api-mode-tab.active {
  color: var(--api-text);
  border-color: rgba(0, 191, 255, 0.45);
  background: rgba(0, 191, 255, 0.1);
}

.api-mode-tab[data-mode="cuenta"].active {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.12);
  color: #e9d5ff;
}

.api-mode-tab[data-mode="br"].active {
  border-color: rgba(0, 191, 255, 0.45);
  background: rgba(0, 191, 255, 0.12);
  color: #bae6fd;
}

.api-mode-tab[data-mode="stw"].active {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
}

.api-mode-block {
  border: 1px solid var(--api-border-soft);
  border-radius: calc(var(--api-radius) + 0.15rem);
  background: rgba(0, 0, 0, 0.22);
  padding: 0.65rem;
  margin-bottom: 1.25rem;
}

.api-mode-block.hidden-by-mode,
.api-mode-block.hidden-by-search {
  display: none;
}

.api-mode-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.65rem;
  border-radius: var(--api-radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--api-border);
}

.api-mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  flex-shrink: 0;
  font-size: 1.05rem;
}

.api-mode-icon-cuenta {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.api-mode-icon-br {
  background: rgba(0, 191, 255, 0.12);
  color: var(--api-accent);
  border: 1px solid rgba(0, 191, 255, 0.25);
}

.api-mode-icon-stw {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.api-mode-head-text {
  flex: 1;
  min-width: 0;
}

.api-mode-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.api-mode-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--api-muted);
  line-height: 1.45;
}

.api-mode-desc code {
  font-size: 0.78rem;
  color: #d4d4d4;
}

.api-mode-count {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--api-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--api-border-soft);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
}

.api-mode-cuenta {
  border-color: rgba(168, 85, 247, 0.18);
}

.api-mode-br {
  border-color: rgba(0, 191, 255, 0.18);
}

.api-mode-stw {
  border-color: rgba(16, 185, 129, 0.18);
}

.api-section-nested {
  margin-bottom: 0;
}

.api-section-nested .api-section-details {
  border-radius: var(--api-radius-sm);
}

.api-nav-sub-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #525252;
  margin: 0.55rem 0 0.2rem 0.65rem;
}

.api-nav-sub-label:first-child {
  margin-top: 0.15rem;
}

.api-nav-divider {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--api-border);
}

.api-nav-divider .api-nav-group-label {
  color: #a3a3a3;
}

/* ── Sidebar ── */
.api-sidebar {
  position: sticky;
  top: 5.25rem;
  align-self: start;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--api-border);
  border-radius: var(--api-radius);
  padding: 1.1rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--api-shadow);
}

.api-sidebar-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--api-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--api-border);
}

.api-nav-group {
  margin-bottom: 0.85rem;
}

.api-nav-group-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #737373;
  margin-bottom: 0.35rem;
  padding-left: 0.65rem;
}

.api-sidebar nav a {
  display: block;
  padding: 0.5rem 0.7rem;
  margin-bottom: 0.15rem;
  border-radius: var(--api-radius-sm);
  border-left: 2px solid transparent;
  color: #d4d4d4;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.api-sidebar nav a:hover {
  background: rgba(0, 191, 255, 0.08);
  color: var(--api-accent);
  border-left-color: rgba(0, 191, 255, 0.4);
}

.api-sidebar nav a.active {
  background: var(--api-gold-dim);
  color: var(--api-gold);
  border-left-color: var(--api-gold);
  font-weight: 600;
}

.api-sidebar-sub {
  padding-left: 0.55rem;
  margin: 0.15rem 0 0.35rem 0.35rem;
  border-left: 1px solid var(--api-border);
}

.api-sidebar-sub a {
  font-size: 0.8rem;
  color: var(--api-muted);
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

/* ── Search ── */
.api-search-wrap {
  position: sticky;
  top: 4.5rem;
  z-index: 25;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.92) 65%, transparent);
  padding: 0.35rem 0 0.85rem;
  margin-bottom: 0.35rem;
}

.api-search-panel {
  background: var(--api-bg);
  border: 1px solid var(--api-border-soft);
  border-radius: var(--api-radius);
  padding: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.api-search {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--api-border);
  border-radius: var(--api-radius-sm);
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: var(--api-text);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23737373'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-4.35-4.35M10.5 18a7.5 7.5 0 100-15 7.5 7.5 0 000 15z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.8rem center;
  background-size: 1rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.api-search:focus {
  outline: none;
  border-color: rgba(0, 191, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.12);
}

.api-search-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.api-search-count {
  font-size: 0.76rem;
  color: var(--api-muted);
  margin-right: auto;
  font-weight: 600;
}

.api-ghost-btn {
  background: transparent;
  border: 1px solid var(--api-border-soft);
  color: #d4d4d4;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.api-ghost-btn:hover {
  background: rgba(0, 191, 255, 0.1);
  border-color: rgba(0, 191, 255, 0.3);
  color: var(--api-accent);
}

.api-search-empty {
  text-align: center;
  color: var(--api-muted);
  font-size: 0.86rem;
  padding: 1.25rem;
  border: 1px dashed var(--api-border-soft);
  border-radius: var(--api-radius-sm);
  margin-bottom: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
}

.api-search-empty.hidden {
  display: none;
}

/* ── Mobile nav ── */
.api-mobile-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 0.65rem;
  scrollbar-width: none;
}

.api-mobile-nav::-webkit-scrollbar {
  display: none;
}

.api-mobile-nav a {
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--api-bg);
  border: 1px solid var(--api-border);
  color: var(--api-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.api-mobile-nav a:hover,
.api-mobile-nav a.active {
  background: rgba(0, 191, 255, 0.1);
  border-color: rgba(0, 191, 255, 0.35);
  color: var(--api-accent);
}

@media (min-width: 1024px) {
  .api-mobile-nav {
    display: none;
  }
  .api-sidebar {
    display: block;
  }
}

@media (max-width: 1023px) {
  .api-sidebar {
    display: none;
  }
}

/* ── Sections (themed accordions) ── */
.api-section {
  scroll-margin-top: 6rem;
  margin-bottom: 0.85rem;
}

.api-section.hidden-by-search {
  display: none;
}

.api-section-details {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.025) 0%,
      rgba(0, 0, 0, 0.15) 100%
    ),
    var(--api-bg);
  border: 1px solid var(--api-border-soft);
  border-radius: var(--api-radius);
  overflow: hidden;
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.2s;
}

.api-section-details[open] {
  box-shadow: var(--api-shadow);
  border-color: rgba(255, 255, 255, 0.12);
}

.api-section-details--auth {
  border-left: 3px solid var(--api-gold);
}
.api-section-details--auth[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(253, 224, 71, 0.08);
}
.api-section-details--locales {
  border-left: 3px solid #38bdf8;
}
.api-section-details--locales[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(56, 189, 248, 0.08);
}
.api-section-details--fortnite {
  border-left: 3px solid var(--api-accent);
}
.api-section-details--fortnite[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(0, 191, 255, 0.08);
}
.api-section-details--cuenta {
  border-left: 3px solid #a855f7;
}
.api-section-details--cuenta[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(168, 85, 247, 0.08);
}
.api-section-details--br {
  border-left: 3px solid var(--api-accent);
}
.api-section-details--br[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(0, 191, 255, 0.08);
}
.api-section-details--stw {
  border-left: 3px solid #10b981;
}
.api-section-details--stw[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(16, 185, 129, 0.08);
}
.api-section-details--stw-alertas {
  border-left: 3px solid #ea580c;
}
.api-section-details--stw-alertas[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(234, 88, 12, 0.08);
}
.api-section-details--stw-tienda {
  border-left: 3px solid #eab308;
}
.api-section-details--stw-tienda[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(234, 179, 8, 0.08);
}
.api-section-details--pricing {
  border-left: 3px solid #a855f7;
}
.api-section-details--pricing[open] {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(168, 85, 247, 0.08);
}

.api-section-static {
  margin-bottom: 0;
}

.api-section-static .api-section-header {
  margin-bottom: 0.85rem;
}

.api-section-static .api-panel {
  margin-bottom: 0;
}

.api-section-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s;
}

.api-section-summary-main {
  flex: 1;
  min-width: 0;
}

.api-section-summary-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.api-section-summary:hover {
  background: rgba(255, 255, 255, 0.025);
}

.api-section-summary::-webkit-details-marker {
  display: none;
}

.api-section-summary-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--api-text);
  line-height: 1.2;
}

/* Meta pills (Guía de acceso, 2 rutas, etc.) */
.api-section-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.api-section-meta i {
  font-size: 0.62rem;
  opacity: 0.9;
}

.api-section-meta--auth {
  color: #fde68a;
  background: linear-gradient(
    135deg,
    rgba(253, 224, 71, 0.16),
    rgba(202, 138, 4, 0.1)
  );
  border-color: rgba(253, 224, 71, 0.28);
}

.api-section-meta--locales {
  color: #7dd3fc;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.14),
    rgba(14, 165, 233, 0.08)
  );
  border-color: rgba(56, 189, 248, 0.28);
}

.api-section-meta--fortnite {
  color: #7dd3fc;
  background: linear-gradient(
    135deg,
    rgba(0, 191, 255, 0.14),
    rgba(30, 144, 255, 0.08)
  );
  border-color: rgba(0, 191, 255, 0.28);
}

.api-section-meta--cuenta {
  color: #d8b4fe;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.14),
    rgba(147, 51, 234, 0.08)
  );
  border-color: rgba(168, 85, 247, 0.28);
}

.api-section-meta--br {
  color: #7dd3fc;
  background: linear-gradient(
    135deg,
    rgba(0, 191, 255, 0.14),
    rgba(30, 144, 255, 0.08)
  );
  border-color: rgba(0, 191, 255, 0.28);
}

.api-section-meta--stw {
  color: #6ee7b7;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.14),
    rgba(5, 150, 105, 0.08)
  );
  border-color: rgba(16, 185, 129, 0.28);
}

.api-section-meta--stw-alertas {
  color: #fdba74;
  background: linear-gradient(
    135deg,
    rgba(234, 88, 12, 0.14),
    rgba(194, 65, 12, 0.08)
  );
  border-color: rgba(234, 88, 12, 0.28);
}

.api-section-meta--stw-tienda {
  color: #fde047;
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.14),
    rgba(202, 138, 4, 0.08)
  );
  border-color: rgba(234, 179, 8, 0.28);
}

.api-section-meta--pricing {
  color: #d8b4fe;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.14),
    rgba(147, 51, 234, 0.08)
  );
  border-color: rgba(168, 85, 247, 0.28);
}

.api-section-meta--default {
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--api-border-soft);
}

.api-chevron-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--api-border-soft);
  color: var(--api-muted);
  font-size: 0.62rem;
  transition:
    transform 0.25s ease,
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.api-section-summary:hover .api-chevron-wrap,
.api-meta-summary:hover .api-chevron-wrap,
.api-endpoint-summary:hover .api-chevron-wrap {
  border-color: rgba(0, 191, 255, 0.25);
  color: var(--api-accent);
}

.api-section-body {
  padding: 0 0.85rem 0.85rem;
}

.api-section-details[open] > .api-section-summary {
  border-bottom: 1px solid var(--api-border);
  background: rgba(0, 0, 0, 0.22);
}

.api-section-details[open] > .api-section-summary .api-chevron-wrap {
  transform: rotate(180deg);
  background: rgba(0, 191, 255, 0.1);
  border-color: rgba(0, 191, 255, 0.25);
  color: var(--api-accent);
}

.api-section-icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.api-icon-auth {
  background: var(--api-gold-dim);
  color: var(--api-gold);
}
.api-icon-locales {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
}
.api-icon-fortnite {
  background: rgba(0, 191, 255, 0.12);
  color: var(--api-accent);
}
.api-icon-cuenta {
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
}
.api-icon-br {
  background: rgba(0, 191, 255, 0.12);
  color: var(--api-accent);
}
.api-icon-stw {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}
.api-icon-stw-alertas {
  background: rgba(234, 88, 12, 0.12);
  color: #fdba74;
}
.api-icon-stw-tienda {
  background: rgba(234, 179, 8, 0.12);
  color: #fde047;
}
.api-icon-pricing {
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
}

/* ── Meta / overview collapsibles ── */
.api-overview-details {
  margin-bottom: 0.85rem;
}

.api-meta-details {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--api-border-soft);
  border-radius: var(--api-radius-sm);
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.api-meta-details--overview {
  border-color: rgba(0, 191, 255, 0.2);
  background: linear-gradient(
    135deg,
    rgba(0, 191, 255, 0.05),
    rgba(0, 0, 0, 0.35)
  );
}

.api-meta-details--stw {
  border-color: rgba(16, 185, 129, 0.22);
}

.api-meta-details--stw-alertas {
  border-color: rgba(234, 88, 12, 0.22);
}

.api-meta-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.95rem;
  cursor: pointer;
  list-style: none;
  color: #e5e5e5;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.2s;
}

.api-meta-summary-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
}

.api-meta-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.api-meta-summary-title i {
  color: var(--api-accent);
  font-size: 0.82rem;
}

.api-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.api-meta-tag i {
  font-size: 0.6rem;
}

.api-meta-tag--overview {
  color: #7dd3fc;
  background: rgba(0, 191, 255, 0.1);
  border-color: rgba(0, 191, 255, 0.22);
}

.api-meta-tag--stw {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.22);
}

.api-meta-tag--stw-alertas {
  color: #fdba74;
  background: rgba(234, 88, 12, 0.1);
  border-color: rgba(234, 88, 12, 0.22);
}

.api-meta-summary:hover {
  background: rgba(255, 255, 255, 0.02);
}
.api-meta-summary::-webkit-details-marker {
  display: none;
}

.api-meta-details[open] > .api-meta-summary .api-chevron-wrap {
  transform: rotate(180deg);
  background: rgba(0, 191, 255, 0.1);
  border-color: rgba(0, 191, 255, 0.25);
  color: var(--api-accent);
}

.api-meta-hint {
  color: var(--api-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.api-meta-details--stw .api-meta-summary-title i {
  color: #6ee7b7;
}

.api-meta-details--stw-alertas .api-meta-summary-title i {
  color: #fdba74;
}

@media (max-width: 520px) {
  .api-section-summary {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .api-section-summary-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .api-meta-summary {
    flex-wrap: wrap;
  }

  .api-meta-summary-actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
    padding-top: 0.35rem;
  }
}

.api-meta-body {
  padding: 0 0.65rem 0.65rem;
}

/* ── Endpoints ── */
.api-endpoint {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%),
    rgba(0, 0, 0, 0.35);
  border: 1px solid var(--api-border-soft);
  border-radius: var(--api-radius-sm);
  margin-bottom: 0.5rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  scroll-margin-top: 6rem;
}

.api-endpoint-collapsible:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.api-endpoint-details[open] {
  border-color: rgba(0, 191, 255, 0.3);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(0, 191, 255, 0.06);
}

.api-endpoint-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s;
}

.api-endpoint-summary:hover {
  background: rgba(255, 255, 255, 0.025);
}
.api-endpoint-summary::-webkit-details-marker {
  display: none;
}

.api-endpoint-summary .api-chevron-wrap {
  margin-left: auto;
}

.api-endpoint-details[open] > .api-endpoint-summary {
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--api-border);
}

.api-endpoint-details[open] > .api-endpoint-summary .api-chevron-wrap {
  transform: rotate(180deg);
  background: rgba(0, 191, 255, 0.1);
  border-color: rgba(0, 191, 255, 0.25);
  color: var(--api-accent);
}

.api-endpoint-collapsible {
  padding: 0;
  overflow: hidden;
}

.api-endpoint-summary-title {
  font-weight: 700;
  color: var(--api-text);
  font-size: 0.9rem;
}

.api-endpoint-summary-path {
  color: var(--api-accent);
  font-size: 0.76rem;
  background: rgba(0, 191, 255, 0.08);
  border: 1px solid rgba(0, 191, 255, 0.15);
  padding: 0.12rem 0.45rem;
  border-radius: 0.35rem;
  font-family: "Courier New", Consolas, monospace;
}

.api-endpoint-body {
  padding: 0 0.9rem 0.9rem;
  border-top: 1px solid var(--api-border);
}

.api-endpoint.hidden-by-search {
  display: none;
}

.api-endpoint-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--api-gold);
  margin: 0 0 0.35rem;
}

.api-endpoint-desc {
  color: #d4d4d4;
  margin: 0 0 0.85rem;
  line-height: 1.55;
  font-size: 0.88rem;
}

.api-chevron {
  display: none;
}

/* ── Badges & methods ── */
.api-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.api-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.api-badge-auth {
  background: rgba(202, 138, 4, 0.18);
  color: #fcd34d;
  border-color: rgba(202, 138, 4, 0.35);
}

.api-badge-epic {
  background: rgba(124, 58, 237, 0.18);
  color: #c4b5fd;
  border-color: rgba(124, 58, 237, 0.35);
}

.api-badge-stw {
  background: rgba(5, 150, 105, 0.18);
  color: #6ee7b7;
  border-color: rgba(5, 150, 105, 0.35);
}

.api-badge-alert {
  background: rgba(234, 88, 12, 0.18);
  color: #fdba74;
  border-color: rgba(234, 88, 12, 0.35);
}

.api-badge-shop {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.35);
}

.api-badge-premium {
  background: rgba(168, 85, 247, 0.18);
  color: #e9d5ff;
  border-color: rgba(168, 85, 247, 0.35);
}

.api-subsection-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #6ee7b7;
}

.api-subsection-desc {
  margin: 0 0 1rem;
  color: #9ca3af;
  font-size: 0.88rem;
  line-height: 1.5;
}

.api-method {
  font-family: Inter, sans-serif;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.5rem;
  border-radius: 0.35rem;
  color: white;
  flex-shrink: 0;
}

.api-method-get {
  background: #15803d;
}
.api-method-post {
  background: #1d4ed8;
}

.api-method-multi {
  background: linear-gradient(90deg, #15803d, #1d4ed8);
  font-size: 0.62rem;
}

/* ── Params & routes ── */
.api-params {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--api-border);
  border-radius: var(--api-radius-sm);
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
}

.api-params-label {
  color: var(--api-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.api-params code {
  color: #86efac;
  font-size: 0.78rem;
}

.api-response-hint {
  color: var(--api-muted);
  font-size: 0.75rem;
  margin: -0.25rem 0 0.75rem;
}

.api-response-hint code {
  color: rgba(0, 191, 255, 0.85);
}

.api-response-block {
  margin-bottom: 0.75rem;
}

.api-response-json {
  margin: 0.35rem 0 0;
  padding: 0.75rem 0.85rem;
  background: #0a0a0a;
  border: 1px solid var(--api-border);
  border-radius: var(--api-radius-sm);
  overflow-x: auto;
}

.api-response-json code {
  display: block;
  color: #a5f3fc;
  font-family: "Courier New", Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.55;
  white-space: pre;
}

.api-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  background: #0a0a0a;
  border: 1px solid var(--api-border);
  border-radius: var(--api-radius-sm);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.75rem;
}

.api-route a {
  color: #7dd3fc;
  word-break: break-all;
  font-family: "Courier New", Consolas, monospace;
  font-size: 0.78rem;
  text-decoration: none;
}

.api-route a:hover {
  color: var(--api-accent);
  text-decoration: underline;
}

.api-method-block {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--api-border);
  border-radius: var(--api-radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.55rem;
}

.api-method-block-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e5e5e5;
  margin: 0 0 0.55rem;
}

/* ── Code examples ── */
.api-lang-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.api-lang-btn {
  border: 1px solid var(--api-border-soft);
  cursor: pointer;
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
}

.api-lang-btn:hover {
  border-color: rgba(0, 191, 255, 0.35);
  color: var(--api-accent);
  background: rgba(0, 191, 255, 0.08);
}

.api-code-panel {
  background: #050505;
  border: 1px solid var(--api-border-soft);
  border-left: 3px solid var(--api-accent);
  border-radius: var(--api-radius-sm);
  padding: 0.85rem;
  margin-top: 0.55rem;
}

.api-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--api-border);
}

.api-code-title {
  color: var(--api-accent);
  font-size: 0.78rem;
  font-weight: 600;
}

.api-copy-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--api-border);
  color: var(--api-muted);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  transition: all 0.2s;
}

.api-copy-btn:hover {
  color: var(--api-gold);
  border-color: rgba(253, 224, 71, 0.3);
}

.api-code-panel code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  color: #bbf7d0;
  font-size: 0.78rem;
  line-height: 1.5;
  font-family: "Courier New", Consolas, monospace;
}

/* ── Table ── */
.api-route-table-wrap {
  overflow-x: auto;
  border-radius: var(--api-radius-sm);
  border: 1px solid var(--api-border);
}

.api-route-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 520px;
}

.api-route-table th,
.api-route-table td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--api-border);
}

.api-route-table tbody tr:last-child td {
  border-bottom: none;
}

.api-route-table tbody tr:hover {
  background: rgba(0, 191, 255, 0.04);
}

.api-route-table-divider td {
  padding: 0.55rem 0.75rem 0.35rem;
  border-bottom: 1px solid var(--api-border);
  background: rgba(0, 0, 0, 0.25);
}

.api-route-table-divider:hover {
  background: rgba(0, 0, 0, 0.25);
}

.api-route-table-divider span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fdba74;
}

.api-route-table-divider--assets span {
  color: #6ee7b7;
}

.api-route-table th {
  color: var(--api-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.35);
}

.api-route-table code {
  color: #7dd3fc;
  font-size: 0.78rem;
}

.api-route-table a {
  color: inherit;
  text-decoration: none;
}

.api-route-table a:hover code {
  color: var(--api-accent);
}

/* ── Panels (auth / pricing) ── */
.api-panel {
  border-radius: var(--api-radius);
  padding: 1.25rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--api-border-soft);
}

.api-panel-auth {
  background:
    radial-gradient(
      ellipse at top right,
      rgba(253, 224, 71, 0.08),
      transparent 55%
    ),
    rgba(0, 0, 0, 0.25);
  border-color: rgba(253, 224, 71, 0.2);
}

.api-panel-pricing {
  background:
    radial-gradient(
      ellipse at top left,
      rgba(168, 85, 247, 0.1),
      transparent 50%
    ),
    rgba(0, 0, 0, 0.25);
  border-color: rgba(168, 85, 247, 0.22);
}

.api-panel-locales {
  background:
    radial-gradient(
      ellipse at top right,
      rgba(56, 189, 248, 0.08),
      transparent 55%
    ),
    rgba(0, 0, 0, 0.25);
  border-color: rgba(56, 189, 248, 0.22);
}

.api-hero-link {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.api-hero-link:hover {
  color: #bae6fd;
}

.api-locale-query,
.api-locale-footnote {
  color: #cbd5e1;
  font-size: 0.86rem;
  margin: 0.75rem 0 0;
}

.api-locale-query code,
.api-locale-footnote code {
  color: #e2e8f0;
}

.api-locale-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--api-radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.06);
}

.api-locale-card-head {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.api-locale-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.45;
}

.api-locale-card-link {
  align-self: flex-start;
  color: #7dd3fc;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.api-locale-card-link:hover {
  color: #bae6fd;
  text-decoration: underline;
}

.api-discord-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 191, 255, 0.2);
  border-radius: var(--api-radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

.api-discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, var(--api-accent), var(--api-accent-2));
  color: #000 !important;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  text-decoration: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.api-discord-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.api-locale-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0 0.85rem;
}

.api-locale-chip {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.api-locale-chip--default {
  border-color: rgba(253, 224, 71, 0.45);
  color: #fde68a;
  background: rgba(253, 224, 71, 0.08);
}

.api-locale-grid {
  margin-bottom: 0;
}

/* ── Pricing ── */
.api-pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .api-pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.api-pricing-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 45%),
    rgba(0, 0, 0, 0.35);
  border: 1px solid var(--api-border-soft);
  border-radius: var(--api-radius-sm);
  padding: 1.15rem;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.api-pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.api-pricing-card.featured {
  border-color: rgba(253, 224, 71, 0.35);
  background:
    radial-gradient(ellipse at top, rgba(253, 224, 71, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 45%),
    rgba(0, 0, 0, 0.4);
  position: relative;
}

.api-pricing-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #000;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 0 0.5rem 0 0.5rem;
  letter-spacing: 0.04em;
}

.api-premium-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #9333ea, #ec4899);
  color: white !important;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: 0.55rem;
  font-size: 0.88rem;
  text-decoration: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.25);
}

.api-premium-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
