/* ==========================================================================
   Camoo Hosting API — Modern Developer Reference Theme
   ========================================================================== */

/* Universal Hidden Rule */
[hidden],
[hidden] * {
    display: none !important;
}

:root,
html[data-theme="light"] {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-hover: #e2e8f0;
    --bg-code: #0f172a;
    --bg-code-header: #1e293b;

    --border-color: #e2e8f0;
    --border-subtle: #edf2f7;
    --border-focus: #3b82f6;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --brand-primary: #2563eb;
    --brand-hover: #1d4ed8;
    --brand-subtle: #eff6ff;

    --method-post-bg: #eff6ff;
    --method-post-text: #1d4ed8;
    --method-post-border: #bfdbfe;

    --method-get-bg: #ecfdf5;
    --method-get-text: #047857;
    --method-get-border: #a7f3d0;

    --method-put-bg: #fffbeb;
    --method-put-text: #b45309;
    --method-put-border: #fde68a;

    --method-del-bg: #fef2f2;
    --method-del-text: #b91c1c;
    --method-del-border: #fecaca;

    --method-guide-bg: #f5f3ff;
    --method-guide-text: #6d28d9;
    --method-guide-border: #ddd6fe;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
}

html[data-theme="dark"] {
    --bg-page: #0a0e17;
    --bg-surface: #111827;
    --bg-surface-elevated: #1a2333;
    --bg-subtle: #162032;
    --bg-hover: #223046;
    --bg-code: #0b111e;
    --bg-code-header: #141d2f;

    --border-color: #243247;
    --border-subtle: #1a2536;
    --border-focus: #3b82f6;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    --brand-primary: #3b82f6;
    --brand-hover: #60a5fa;
    --brand-subtle: rgba(59, 130, 246, 0.15);

    --method-post-bg: rgba(37, 99, 235, 0.2);
    --method-post-text: #93c5fd;
    --method-post-border: rgba(59, 130, 246, 0.4);

    --method-get-bg: rgba(16, 185, 129, 0.2);
    --method-get-text: #6ee7b7;
    --method-get-border: rgba(16, 185, 129, 0.4);

    --method-put-bg: rgba(245, 158, 11, 0.2);
    --method-put-text: #fcd34d;
    --method-put-border: rgba(245, 158, 11, 0.4);

    --method-del-bg: rgba(239, 68, 68, 0.2);
    --method-del-text: #fca5a5;
    --method-del-border: rgba(239, 68, 68, 0.4);

    --method-guide-bg: rgba(139, 92, 246, 0.2);
    --method-guide-text: #c4b5fd;
    --method-guide-border: rgba(139, 92, 246, 0.4);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Global Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
    height: 100%;
}

body.api-portal-body,
body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--brand-hover);
    text-decoration: underline;
}

code, pre, kbd {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, Menlo, monospace;
    font-size: 0.9em;
}

:not(pre) > code {
    background: var(--bg-subtle);
    color: var(--brand-primary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.88em;
    border: 1px solid var(--border-color);
}

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(17, 24, 39, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

html[data-theme="light"] #header {
    background: rgba(255, 255, 255, 0.92);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: var(--text-primary) !important;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 19px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.brand strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.brand small {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.version-badge,
.spec-badge {
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.version-badge {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.spec-badge {
    background: var(--brand-subtle);
    color: var(--brand-primary);
    border: 1px solid var(--border-color);
}

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

/* Search Trigger in Header */
.search-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 13px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 220px;
}

.search-trigger:hover {
    background: var(--bg-hover);
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.search-placeholder {
    flex: 1;
    text-align: left;
}

.search-kbd {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* View Switcher */
.view-switch-group {
    display: flex;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2px;
}

.btn-view-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted) !important;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.btn-view-toggle:hover {
    color: var(--text-primary) !important;
}

.btn-view-toggle.is-active {
    background: var(--bg-surface);
    color: var(--brand-primary) !important;
    box-shadow: var(--shadow-sm);
}

/* Buttons in Header */
.dropdown-container {
    position: relative;
}

.btn-openapi-download,
.btn-token-config,
.btn-private-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-openapi-download:hover,
.btn-token-config:hover,
.btn-private-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-private-toggle.is-active {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.private-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
}

.private-status-dot.dot-active {
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

.dropdown-group-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 6px 10px 2px;
}

.item-ext.ext-private {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.item-ext.ext-postman {
    background: rgba(255, 108, 55, 0.15);
    color: #ff6c37;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 200;
}

.dropdown-menu.is-active,
.dropdown-menu:not([hidden]) {
    display: flex;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-primary) !important;
    font-size: 12px;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--bg-subtle);
}

.item-ext {
    font-size: 10px;
    font-weight: 700;
    background: var(--brand-subtle);
    color: var(--brand-primary);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

html[data-theme="dark"] .sun-icon {
    display: block;
}
html[data-theme="dark"] .moon-icon {
    display: none;
}
html[data-theme="light"] .sun-icon {
    display: none;
}
html[data-theme="light"] .moon-icon {
    display: block;
}

.menu-toggle {
    display: none;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 7px;
    color: var(--text-primary);
    cursor: pointer;
}

/* Layout */
#portal-container {
    display: flex;
    min-height: calc(100vh - 64px);
    margin-top: 64px;
}

/* Sidebar */
#sidebar {
    width: 290px;
    min-width: 290px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    padding: 18px 14px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 8px;
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none !important;
}

.sidebar-logo-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-search-box {
    position: relative;
    padding: 0 4px;
}

.sidebar-search-box .search-symbol {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
}

.sidebar-search-box input {
    width: 100%;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    padding: 8px 12px 8px 32px;
    outline: none;
    transition: border-color 0.2s ease;
}

.sidebar-search-box input:focus {
    border-color: var(--brand-primary);
}

.sidebar-group,
.sidebar-module-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav-heading {
    margin: 12px 0 4px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.sidebar-nav-heading a {
    color: inherit;
    text-decoration: none !important;
}

.sidebar-nav-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.sidebar-nav-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary) !important;
}

.sidebar-nav-item.is-active {
    background: var(--brand-subtle);
    color: var(--brand-primary) !important;
    font-weight: 600;
}

.nav-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Method Pills in Sidebar */
.nav-method-pill,
.method-tag,
.method-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    display: inline-block;
}

.pill-post,
.method-tag-post,
.method-pill-post {
    background: var(--method-post-bg);
    color: var(--method-post-text);
    border: 1px solid var(--method-post-border);
}

.pill-get,
.method-tag-get,
.method-pill-get {
    background: var(--method-get-bg);
    color: var(--method-get-text);
    border: 1px solid var(--method-get-border);
}

.pill-guide {
    background: var(--method-guide-bg);
    color: var(--method-guide-text);
    border: 1px solid var(--method-guide-border);
}

.pill-private,
.method-pill-private,
.nav-private-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.sidebar-nav-item.is-private {
    border-left: 2px solid rgba(239, 68, 68, 0.6);
}

/* Private Alert Callout Box */
.private-alert-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 4px solid #ef4444;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 12px 0;
}

.private-alert-icon {
    font-size: 18px;
    line-height: 1.2;
}

.private-alert-content strong {
    display: block;
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.private-alert-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 8px 0;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted) !important;
    text-decoration: none !important;
}

.footer-link:hover {
    color: var(--text-primary) !important;
}

/* Content Area */
#content {
    margin-left: 290px;
    flex: 1;
    max-width: calc(100vw - 290px);
    position: relative;
    z-index: 10;
}

/* Method Groups & Sections */
.method-group {
    border-bottom: 1px solid var(--border-color);
}

.method {
    padding: 40px 0;
}

.method-area {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 36px;
    padding: 0 40px;
    max-width: 1720px;
    margin: 0 auto;
}

/* Method Copy (Left Column) */
.method-copy {
    min-width: 0;
}

.method-copy-padding {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-primary);
}

.portal-main-heading {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--text-primary);
}

.lead-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.endpoint-badge-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    width: fit-content;
}

.endpoint-url {
    font-size: 13px;
    color: var(--text-primary);
    background: transparent;
    user-select: all;
}

.btn-copy-url {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.btn-copy-url:hover {
    background: var(--bg-subtle);
    color: var(--brand-primary);
}

.endpoint-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0;
}

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

/* Contract Cards in Introduction */
.contract-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 12px 0;
}

.contract-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-icon {
    font-size: 18px;
}

.card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.card-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-value code {
    background: var(--bg-subtle);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.quickstart-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.quickstart-box h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.quickstart-steps {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Note / Callout Box */
.note-box {
    background: var(--bg-surface);
    border-left: 4px solid var(--brand-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 14px 16px;
    margin: 12px 0;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.note-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-primary);
    margin-bottom: 6px;
}

.note-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Parameter Tables */
.parameters-section {
    margin-top: 16px;
}

.parameters-section h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.apitable {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.apitable thead th {
    background: var(--bg-subtle);
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.apitable tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
    color: var(--text-secondary);
}

.apitable tbody tr:last-child td {
    border-bottom: none;
}

.param-name code {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-subtle);
    padding: 2px 6px;
    border-radius: 4px;
}

.type-pill {
    display: inline-block;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-subtle);
    color: var(--text-muted);
}

.type-string { color: #0284c7; }
.type-integer, .type-int { color: #7c3aed; }
.type-number, .type-float { color: #d97706; }
.type-boolean, .type-bool { color: #059669; }

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-required {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-optional {
    background: var(--bg-subtle);
    color: var(--text-muted);
}

.desc-text {
    line-height: 1.5;
}

/* Method Example (Right Column / Code Cards) */
.method-example {
    min-width: 0;
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-self: start;
}

/* Code Snippet Card */
.snippet-card,
.response-card,
.try-output {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    color: #e2e8f0;
}

.snippet-header,
.response-header {
    background: var(--bg-code-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.snippet-title {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
}

.lang-tabs,
.response-status-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-tab,
.status-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-tab:hover,
.status-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.lang-tab.is-active,
.status-tab.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.btn-copy-code,
.btn-copy-response {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-copy-code:hover,
.btn-copy-response:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dot-200 { background: #10b981; box-shadow: 0 0 6px #10b981; }
.dot-400 { background: #f59e0b; }
.dot-401 { background: #ef4444; }

.snippet-body,
.response-body,
.try-output-body {
    padding: 16px;
    overflow-x: auto;
    max-height: 440px;
    font-size: 13px;
    line-height: 1.5;
    color: #e2e8f0;
}

.snippet-body pre,
.response-body pre,
.try-output-body pre,
.snippet-body code,
.response-body code,
.try-output-body code,
code[class*="language-"],
pre[class*="language-"] {
    margin: 0;
    background: transparent;
    padding: 0;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, Menlo, monospace;
}

.lang-panel,
.response-panel {
    display: none;
}

.lang-panel.is-active,
.response-panel.is-active {
    display: block;
}

/* Tokens for Code Highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #64748b;
    font-style: italic;
}
.token.punctuation {
    color: #94a3b8;
}
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f43f5e;
}
.token.boolean,
.token.number {
    color: #f59e0b;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #34d399;
}
.token.operator,
.token.entity,
.token.url,
.token.variable {
    color: #38bdf8;
}
.token.atrule,
.token.attr-value,
.token.function {
    color: #fbbf24;
}
.token.keyword {
    color: #c084fc;
    font-weight: 600;
}
.token.json-key {
    color: #60a5fa;
    font-weight: 600;
}
.token.json-string {
    color: #34d399;
}
.token.json-number {
    color: #f59e0b;
}
.token.json-boolean {
    color: #f43f5e;
    font-weight: 600;
}
.token.json-null {
    color: #94a3b8;
    font-style: italic;
}

/* Interactive Try-It Console */
.try-console {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.try-console summary {
    list-style: none;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: var(--bg-subtle);
    border-bottom: 1px solid transparent;
    user-select: none;
    transition: background 0.15s ease;
}

.try-console summary::-webkit-details-marker {
    display: none;
}

.try-console[open] summary {
    border-bottom-color: var(--border-color);
}

.try-summary-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
}

.try-summary-left small {
    color: var(--text-muted);
    font-weight: 500;
}

.try-arrow {
    font-size: 18px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.try-console[open] .try-arrow {
    transform: rotate(90deg);
}

.try-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.try-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.try-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.try-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.try-field .req {
    color: #ef4444;
}

.try-field input {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    padding: 7px 10px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.try-field input:focus {
    border-color: var(--brand-primary);
}

.try-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.btn-try-send {
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-try-send:hover {
    background: var(--brand-hover);
}

.btn-try-curl {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.try-output {
    margin-top: 10px;
    border-radius: var(--radius-md);
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.try-output-meta {
    background: var(--bg-code-header);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
}

.try-status-badge {
    padding: 2px 6px;
    border-radius: 4px;
}

.try-status-200 { background: #064e3b; color: #6ee7b7; }
.try-status-error { background: #7f1d1d; color: #fca5a5; }

.try-duration {
    color: #94a3b8;
}

.try-output-body {
    padding: 12px;
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
    font-size: 12px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 16px;
}

.modal-backdrop.is-active {
    display: flex !important;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    animation: modalSlideIn 0.18s ease-out;
}

.modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-field label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.modal-field input {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.modal-field input:focus {
    border-color: var(--brand-primary);
}

.modal-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    cursor: pointer;
}

/* Command Palette Search Modal (Cmd+K) */
.search-modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 640px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    animation: modalSlideIn 0.18s ease-out;
}

.search-modal-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.search-modal-icon {
    color: var(--text-muted);
}

.search-modal-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    font-family: inherit;
}

.modal-esc-kbd {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 2px 6px;
}

.search-modal-results {
    overflow-y: auto;
    max-height: 420px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.12s ease;
}

.search-result-item:hover,
.search-result-item.is-selected {
    background: var(--bg-subtle);
}

.search-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.search-result-path {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.search-result-tag {
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.search-modal-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
}

.search-modal-footer kbd {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 10px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    border: 1px solid #334155;
    z-index: 1000;
    display: none;
    animation: toastIn 0.2s ease-out;
}

.toast.is-active {
    display: block !important;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.97) translateY(-6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .method-area {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .method-example {
        position: static;
        top: 0;
    }
}

@media (max-width: 900px) {
    #sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    body.nav-open #sidebar {
        transform: translateX(0);
    }
    #content {
        margin-left: 0;
        max-width: 100vw;
    }
    .method-area {
        padding: 0 20px;
    }
    .menu-toggle {
        display: block;
    }
    .search-trigger {
        min-width: unset;
    }
    .search-placeholder {
        display: none;
    }
}
