/* Unhurried API Documentation Modern Theme */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111726;
  --bg-card: #151d30;
  --bg-card-hover: #1a253c;
  --bg-code: #070a10;
  --border-subtle: #1e2942;
  --border-strong: #2d3d63;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.2);
  --method-get: #38bdf8;
  --method-post: #34d399;
  --method-put: #fbbf24;
  --method-patch: #a78bfa;
  --method-delete: #f87171;
  --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: bold;
  letter-spacing: -0.02em;
}

.badge-docs {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Environment Switcher */
.env-selector-container {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.env-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.env-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.env-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-strong);
}

.env-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.env-dot.prod { background-color: #10b981; box-shadow: 0 0 8px #10b981; }
.env-dot.staging { background-color: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.env-dot.dev { background-color: #3b82f6; box-shadow: 0 0 8px #3b82f6; }

/* Search Bar */
.search-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.search-btn kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* App Container */
.app-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

/* Sidebar */
.sidebar {
  width: 290px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
  overflow-y: auto;
  padding: 20px 16px;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 8px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item {
  margin-bottom: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  font-weight: 600;
}

.method-badge-sm {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.method-badge-sm.get { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.method-badge-sm.post { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.method-badge-sm.put { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.method-badge-sm.patch { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }
.method-badge-sm.delete { background: rgba(248, 113, 113, 0.2); color: #f87171; }

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 40px 48px;
  max-width: 1100px;
}

/* Environment Info Banner */
.env-banner {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.env-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.env-banner-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.env-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.env-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.env-detail-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 16px;
}

.env-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.env-detail-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e2e8f0;
  word-break: break-all;
}

/* Service Section */
.service-section {
  margin-bottom: 60px;
}

.service-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.service-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: bold;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.service-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.service-meta-bar {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Endpoint Card */
.endpoint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

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

.endpoint-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}

.endpoint-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.method-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.method-tag.get { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.method-tag.post { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.3); }
.method-tag.put { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.method-tag.patch { background: rgba(167, 139, 250, 0.15); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.3); }
.method-tag.delete { background: rgba(248, 113, 113, 0.15); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); }

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

.endpoint-title-desc {
  padding: 16px 24px 8px;
}

.endpoint-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.endpoint-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Endpoint Body */
.endpoint-body {
  padding: 16px 24px 24px;
}

/* Tables */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 14px 0 20px;
}

.docs-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.docs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.docs-table td code {
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.req-badge {
  color: #f87171;
  font-size: 11px;
  font-weight: 600;
}

.opt-badge {
  color: var(--text-muted);
  font-size: 11px;
}

/* Code Snippet Tabs */
.code-box {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  margin-top: 16px;
  overflow: hidden;
}

.code-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.code-container {
  position: relative;
  padding: 16px;
}

.code-container pre {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e2e8f0;
  overflow-x: auto;
  line-height: 1.5;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Interactive API Console */
.try-out-toggle {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.try-out-toggle:hover {
  background: rgba(16, 185, 129, 0.22);
}

.console-panel {
  background: #090d16;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  margin-top: 16px;
  padding: 16px;
  display: none;
}

.console-panel.open {
  display: block;
}

.console-field {
  margin-bottom: 12px;
}

.console-field label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.console-input, .console-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
}

.console-textarea {
  min-height: 100px;
  resize: vertical;
}

.console-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.btn-run {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-run:hover {
  background: #059669;
}

.console-response {
  margin-top: 16px;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 12px;
}

.console-response-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-badge.s200 { background: #065f46; color: #34d399; }
.status-badge.s400 { background: #7f1d1d; color: #fca5a5; }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.modal-overlay.open {
  display: flex;
}

.search-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.search-modal-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 20px;
  font-size: 16px;
  color: #fff;
  outline: none;
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.search-result-item {
  padding: 10px 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text-secondary);
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 300;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { padding: 24px 16px; }
  .header-center { display: none; }
}
