/* ============================================
   LudoKingAPI.site — Global Stylesheet
   Dark developer-focused design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-primary: #070b14;
  --bg-secondary: #0d1424;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --bg-code: #0a0f1e;
  --bg-code-inline: #1e293b;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-glow: rgba(99, 102, 241, 0.3);
  --accent-secondary: #f59e0b;
  --accent-secondary-glow: rgba(245, 158, 11, 0.2);
  --accent-success: #10b981;
  --accent-error: #ef4444;

  --border-color: rgba(99, 102, 241, 0.15);
  --border-color-strong: rgba(99, 102, 241, 0.3);

  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px var(--accent-primary-glow);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #818cf8; }

/* ── Background Effects ── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 50%, rgba(245, 158, 11, 0.05), transparent),
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(99, 102, 241, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Grid Pattern Overlay ── */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--wide { max-width: 1400px; }
.container--narrow { max-width: 800px; }

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-base);
}

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

.navbar__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px var(--accent-primary-glow);
}

.navbar__logo span {
  background: linear-gradient(135deg, var(--text-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

.navbar__links a:hover {
  color: var(--text-primary);
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 1px;
  transition: var(--transition-base);
}

.navbar__links a:hover::after {
  width: 100%;
}

.navbar__cta {
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  box-shadow: 0 0 20px var(--accent-primary-glow);
  transition: var(--transition-base) !important;
}

.navbar__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px var(--accent-primary-glow);
}

.navbar__cta::after { display: none !important; }

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-color-strong);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #818cf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease both;
}

.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero__title .gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), #818cf8, var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 40px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero__stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-primary-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-primary-glow);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color-strong);
}

.btn--secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
}

.btn--whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.25);
}

.btn--whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 20px;
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ── Floating WhatsApp Button ── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition: var(--transition-base);
  animation: float-bounce 3s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.45);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

@keyframes float-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: var(--transition-base);
}

.card:hover {
  border-color: var(--border-color-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card-hover);
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #818cf8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 16px;
  transition: var(--transition-fast);
}

.card__link:hover {
  gap: 10px;
  color: var(--accent-primary);
}

/* ── Section Layouts ── */
.section {
  padding: 100px 0;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero__stats { gap: 24px; flex-wrap: wrap; }
  .navbar__links { display: none; }
  .section { padding: 60px 0; }
}

/* ── Feature List ── */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: '✓';
  width: 20px;
  height: 20px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Code Blocks ── */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 24px 0;
}

.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(99, 102, 241, 0.05);
}

.code-block__lang {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-block__copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-body);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.code-block__copy:hover {
  background: var(--bg-card);
  color: var(--text-secondary);
}

.code-block pre {
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin: 0;
}

.code-block code {
  font-family: var(--font-mono);
}

/* Syntax highlighting — minimalist */
.code-keyword { color: #c084fc; }
.code-string { color: #86efac; }
.code-comment { color: #475569; font-style: italic; }
.code-function { color: #60a5fa; }
.code-number { color: #fbbf24; }
.code-property { color: #94a3b8; }
.code-operator { color: #f472b6; }

/* Inline code */
code:not([class*="language-"]) {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 2px 8px;
  background: var(--bg-code-inline);
  border-radius: var(--radius-sm);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ── Page Content ── */
.page-content {
  padding-top: 120px;
  padding-bottom: 80px;
}

.page-header {
  text-align: center;
  margin-bottom: 60px;
}

.page-header__label {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-header__desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.content-section {
  margin-bottom: 48px;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.content-section h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 1.02rem;
}

.content-section ul, .content-section ol {
  color: var(--text-secondary);
  margin: 16px 0;
  padding-left: 24px;
}

.content-section li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.content-section a {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition-fast);
}

.content-section a:hover {
  border-bottom-color: var(--accent-primary);
}

/* ── FAQ Accordion ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-base);
}

.faq-item:hover {
  border-color: var(--border-color-strong);
}

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.faq-item__question:hover {
  color: #818cf8;
}

.faq-item__icon {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-color-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: var(--transition-base);
}

.faq-item.open .faq-item__icon {
  transform: rotate(180deg);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-item__answer {
  max-height: 500px;
}

.faq-item__answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ── Related Links ── */
.related-links {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 48px;
}

.related-links h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-links__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.related-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-base);
}

.related-link:hover {
  border-color: var(--accent-primary);
  color: #818cf8;
  background: rgba(99, 102, 241, 0.05);
  transform: translateX(4px);
}

.related-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 100px 0 32px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

.breadcrumb span {
  opacity: 0.5;
}

/* ── CTA Section ── */
.cta-section {
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.1rem;
}

.cta-section .btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 0 40px;
  position: relative;
  z-index: 1;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand {
  max-width: 320px;
}

.footer__brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.7;
}

.footer__col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer__col a:hover {
  color: var(--accent-primary);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer__bottom-links {
  display: flex;
  gap: 24px;
}

.footer__bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer__bottom-links a:hover {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer__brand { max-width: 100%; }
  .footer__bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease both;
}

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* ── Highlighted keyword in text ── */
.keyword-highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

/* ── Tag pills ── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #818cf8;
  text-decoration: none;
  transition: var(--transition-fast);
}

.tag:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

/* ── Table of Contents ── */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 32px;
}

.toc h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc a:hover {
  color: var(--accent-primary);
  padding-left: 4px;
}

.toc a::before {
  content: '›';
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color-strong), transparent);
  margin: 48px 0;
}

/* ── API endpoint display ── */
.api-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.api-endpoint__method {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.api-endpoint__method--get { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.api-endpoint__method--post { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.api-endpoint__method--put { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.api-endpoint__method--delete { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* ── Alert/Note boxes ── */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 0.9rem;
  border: 1px solid;
}

.alert--info {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.alert--warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.alert--success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.hero-small {
  padding: 60px 0 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.hero-small h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.15;
}

.hero-small .lead,
.hero-small p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.7;
  margin: 0;
}

.page-content {
  padding: 80px 0 60px;
}

.main-content {
  padding: 80px 0 60px;
}

.content-body {
  padding: 40px 0;
}

.content-body h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 16px;
}

.content-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px;
}

.content-body p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-body ul,
.content-body ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin: 12px 0;
}

.content-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.content-body a {
  color: var(--accent-primary);
  text-decoration: none;
}

.content-body a:hover {
  text-decoration: underline;
}

.content-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 2px 8px;
  background: var(--bg-code-inline);
  border-radius: var(--radius-sm);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.content-wrapper article {
  padding: 0 0 60px;
}

.content-wrapper section {
  margin-bottom: 48px;
}
.page-content {
  padding: 80px 0 60px;
}
.main-content {
  padding: 80px 0 60px;
}
.content-body {
  padding: 40px 0;
}
.content-body h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 16px;
}
.content-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px;
}
.content-body p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.content-body ul, .content-body ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin: 12px 0;
}
.content-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.content-body a {
  color: var(--accent-primary);
  text-decoration: none;
}
.content-body a:hover {
  text-decoration: underline;
}
.content-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 2px 8px;
  background: var(--bg-code-inline);
  border-radius: var(--radius-sm);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ── Content wrapper ── */
.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}
.content-wrapper article {
  padding: 0 0 60px;
}
.content-wrapper section {
  margin-bottom: 48px;
}
