/* ═══ API Documentation Page Styles ═══ */

/* ── Layout ── */
.api-docs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.api-docs-hero {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.api-docs-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.api-docs-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.2);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  animation: slideUpFade 0.6s ease both;
}

.api-docs-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;        
  background: linear-gradient(135deg, #ffffff, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: slideUpFade 0.6s ease 0.1s both;
}

.api-docs-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
  animation: slideUpFade 0.6s ease 0.2s both;
}

/* ── Table of Contents ── */
.api-toc {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 48px;
  animation: slideUpFade 0.6s ease 0.3s both;
}

.api-toc h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 700;
}

.api-toc__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.api-toc__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.api-toc__link:hover {
  background: rgba(108,99,255,0.1);
  border-color: rgba(108,99,255,0.3);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ── Sections ── */
.api-section {
  margin-bottom: 48px;
  animation: slideUpFade 0.5s ease both;
}

.api-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.api-section__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108,99,255,0.1);
  border-radius: 10px;
  color: var(--primary);
}

.api-section h2 {
  font-size: 1.3rem;
  font-weight: 800;
}

.api-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ── Endpoint Cards ── */
.endpoint-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.endpoint-card:hover {
  border-color: rgba(108,99,255,0.3);
  box-shadow: 0 4px 24px rgba(108,99,255,0.08);
}

.endpoint-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}

.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 52px;
  text-align: center;
}

.method-badge--get {
  background: rgba(74,222,128,0.12);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.25);
}

.method-badge--post {
  background: rgba(96,165,250,0.12);
  color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.25);
}

.method-badge--delete {
  background: rgba(248,113,113,0.12);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.25);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.endpoint-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

.endpoint-card__body {
  padding: 20px;
}

/* ── Code Blocks ── */
.code-block {
  position: relative;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-block__lang {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.code-block__copy {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.code-block__copy:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
}

.code-block code {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  color: #e6edf3;
}

/* ── Syntax Highlighting ── */
.hl-keyword { color: #ff7b72; }
.hl-string { color: #a5d6ff; }
.hl-number { color: #79c0ff; }
.hl-comment { color: #8b949e; font-style: italic; }
.hl-func { color: #d2a8ff; }
.hl-prop { color: #79c0ff; }
.hl-const { color: #ffa657; }
.hl-type { color: #ff7b72; }

/* ── Response Blocks ── */
.response-block {
  margin-top: 12px;
}

.response-block__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.response-block__label--success {
  color: #4ade80;
}

.response-block__label--error {
  color: #f87171;
}

/* ── Auth Info Box ── */
.auth-info {
  background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(96,165,250,0.05));
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}

.auth-info h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-info ol {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.9;
}

.auth-info ol li strong {
  color: var(--text-primary);
}

/* ── Warning Box ── */
.api-warning {
  background: rgba(250,204,21,0.06);
  border: 1px solid rgba(250,204,21,0.2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(250,204,21,0.9);
}

/* ── Rate Limit Info ── */
.rate-limit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.rate-limit-card {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.rate-limit-card__value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
}

.rate-limit-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Tabs ── */
.code-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
}

.code-tab {
  padding: 8px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-tab:hover { color: var(--text-primary); }

.code-tab.active {
  background: #0d1117;
  color: var(--primary);
  border-color: rgba(108,99,255,0.3);
}

.code-tab-content {
  display: none;
}

.code-tab-content.active {
  display: block;
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .api-docs-hero h1 { font-size: 2rem; }
  .endpoint-card__header { flex-wrap: wrap; gap: 8px; }
  .endpoint-desc { margin-left: 0; width: 100%; }
  .rate-limit-grid { grid-template-columns: 1fr; }
}
