/* Documentation Page Styles - Deep Space Theme */

:root {
    --bg: #030712;
    /* Deep Navy/Black */
    --bg-alt: #0b1120;
    /* Darker Slate */
    --bg-muted: #1e293b;
    /* Slate 800 */
    --bg-code: #0f172a;
    /* Slate 900 */

    --text: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --text-light: #64748b;
    /* Slate 500 */

    --border: #1e293b;
    /* Slate 800 */
    --border-hover: #334155;
    /* Slate 700 */

    --accent: #06b6d4;
    /* Cyan 500 */
    --accent-light: #22d3ee;
    /* Cyan 400 */
    --accent-glow: rgba(6, 182, 212, 0.2);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Header */
.docs-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.9;
}

.logo img {
    height: 32px;
    border-radius: 6px;
}

.logo span {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--accent-light);
}

.btn {
    display: inline-flex;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-light);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.btn-primary:hover {
    background: rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
}

/* Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--border);
    background: rgba(3, 7, 18, 0.5);
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
}

.nav-section a {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.nav-section a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.nav-section a.active {
    color: var(--accent-light);
    background: rgba(6, 182, 212, 0.05);
    border-left-color: var(--accent);
}

/* Main Content */
.docs-main {
    padding: 3rem 5rem;
    max-width: 1000px;
}

.docs-main section {
    padding-bottom: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.docs-main section:last-child {
    border-bottom: none;
}

.docs-main h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.docs-main h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
}

.docs-main h2::before {
    content: '#';
    color: var(--accent);
    margin-right: 0.5rem;
    opacity: 0.5;
    font-size: 1.25rem;
}

.docs-main h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.docs-main p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.docs-main ul,
.docs-main ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.docs-main li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.docs-main a {
    color: var(--accent-light);
    text-decoration: none;
    border-bottom: 1px dashed rgba(34, 211, 238, 0.4);
    transition: all 0.2s;
}

.docs-main a:hover {
    color: var(--accent);
    border-bottom-style: solid;
}

/* Boxes */
.info-box,
.warning-box {
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    border: 1px solid transparent;
}

.info-box {
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.1);
}

.warning-box {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.1);
}

.info-box strong {
    color: var(--accent-light);
    display: block;
    margin-bottom: 0.75rem;
}

.warning-box strong {
    color: var(--warning);
    display: block;
    margin-bottom: 0.75rem;
}

.info-box ul {
    margin: 0;
    padding-left: 1.25rem;
}

.info-box li {
    color: var(--text-muted);
}

.warning-box p {
    color: var(--text-muted);
    margin: 0;
}

/* Code Blocks */
.code-block {
    margin: 1.5rem 0 2rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.code-header span {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.copy-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: var(--text);
    border-color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

.code-block pre {
    padding: 1.25rem;
    overflow-x: auto;
    background: var(--bg-alt);
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: #e2e8f0;
    line-height: 1.7;
}

/* Inline Code */
p code,
li code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--accent-light);
}

/* Endpoints */
.endpoint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

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

.method {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
    text-transform: uppercase;
}

.method.get {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.method.post {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.method.put {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.endpoint code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9375rem;
    color: var(--text);
    background: transparent;
    padding: 0;
}

.endpoint p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Table */
.docs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.docs-table th,
.docs-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.docs-table th {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 0.875rem;
}

.docs-table tr:last-child td {
    border-bottom: none;
}

.docs-table td {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Footer */
.docs-footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    color: var(--text-muted);
}

.docs-footer a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 1rem;
}

.docs-footer a:hover {
    color: var(--accent-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        display: none;
        /* Consider hamburger for mobile */
    }

    .docs-main {
        padding: 2rem;
    }
}