/* --- Docs Page Styles --- */

.docs-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 3rem;
    position: relative;
}

/* Sidebar Navigation */
.docs-sidebar {
    width: 260px;
    position: sticky;
    top: 80px; /* Header height + padding */
    height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 0.75rem;
    margin-top: 2rem;
    letter-spacing: 0.05em;
}

.nav-section-title:first-child { margin-top: 0; }

.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-bottom: 0.15rem;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-left-color: #3b82f6;
    font-weight: 500;
}

/* Main Content */
.docs-content {
    flex-grow: 1;
    padding-bottom: 6rem;
    min-width: 0; /* Fix flex text overflow */
    max-width: 900px;
}

.doc-section {
    margin-bottom: 5rem;
    scroll-margin-top: 100px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 3rem;
}
.doc-section:last-child { border-bottom: none; }

.doc-h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.doc-h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.doc-p {
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.doc-p code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2em 0.4em;
    border-radius: 0.3em;
    font-size: 0.9em;
    color: #93c5fd;
    font-family: 'Fira Code', monospace;
}

/* Interactive Console Styles */

.api-console {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    margin-top: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Console Tabs */
.console-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
}

.tab-btn.active {
    background: #0f172a;
    color: #3b82f6;
    border-top: 2px solid #3b82f6;
    margin-top: -1px; 
}

.console-content {
    padding: 1.5rem;
}

/* Inputs Grid */
.inputs-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
}

.api-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: white;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.api-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.05);
}

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

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.run-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.run-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.run-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Response Block */
.response-block {
    background: #020617;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.response-header {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 0.25rem;
}
.status-2xx { color: #4ade80; background: rgba(74, 222, 128, 0.1); }
.status-4xx { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.status-5xx { color: #f87171; background: rgba(248, 113, 113, 0.1); }

.response-body {
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #cbd5e1;
    white-space: pre;
}

/* Method Badges */
.method-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
}
.method-get { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.method-post { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.method-delete { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.endpoint-url {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: #e2e8f0;
}

/* Mobile */
@media (max-width: 1024px) {
    .docs-sidebar { display: none; }
    .docs-layout { display: block; }
    .inputs-grid { grid-template-columns: 1fr; }
}