:root {
    --bg-base: #0f1115;
    --bg-surface: #181a20;
    --bg-surface-hover: #22252e;
    --border-color: #2b303b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-color: #f59e0b;
    --accent-hover: #d97706;
    
    --caution-bg: rgba(239, 68, 68, 0.1);
    --caution-border: #ef4444;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --warning-border: #f59e0b;
    --important-bg: rgba(59, 130, 246, 0.1);
    --important-border: #3b82f6;
    --tip-bg: rgba(16, 185, 129, 0.1);
    --tip-border: #10b981;
    --note-bg: rgba(100, 116, 139, 0.1);
    --note-border: #64748b;
}

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

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

.layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-base);
    transition: transform 0.3s ease;
}

.sidebar-content h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.toc-list {
    list-style: none;
    font-size: 0.9rem;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    line-height: 1.4;
}

.toc-list a:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.toc-list a.active {
    color: var(--accent-color);
    background: rgba(245, 158, 11, 0.1);
}

.content {
    flex-grow: 1;
    padding: 3rem 2rem 5rem;
    max-width: 800px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    color: #ffffff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.25rem; margin-top: 0; }
h2 { font-size: 1.75rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
h3 { font-size: 1.25rem; }

p, ul, ol { margin-bottom: 1.5rem; }
li { margin-bottom: 0.5rem; }

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

hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 2.5rem 0;
}

/* Callouts */
.callout {
    border-left: 4px solid;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
    background: var(--bg-surface);
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.callout-content > *:last-child { margin-bottom: 0; }

.callout-caution { background: var(--caution-bg); border-color: var(--caution-border); }
.callout-caution .callout-header { color: var(--caution-border); }

.callout-warning { background: var(--warning-bg); border-color: var(--warning-border); }
.callout-warning .callout-header { color: var(--warning-border); }

.callout-important { background: var(--important-bg); border-color: var(--important-border); }
.callout-important .callout-header { color: var(--important-border); }

.callout-tip { background: var(--tip-bg); border-color: var(--tip-border); }
.callout-tip .callout-header { color: var(--tip-border); }

.callout-note { background: var(--note-bg); border-color: var(--note-border); }
.callout-note .callout-header { color: var(--note-border); }

/* Code Blocks */
code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
    background: var(--bg-surface-hover);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    color: #fbbf24;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.code-wrapper {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-wrapper pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 0.25rem;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

th {
    background: var(--bg-surface);
    font-weight: 600;
    color: #ffffff;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: rgba(255,255,255,0.02); }

/* Progress Dots */
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}
.status-red { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.status-purple { background: #a855f7; box-shadow: 0 0 8px rgba(168,85,247,0.5); }
.status-yellow { background: #eab308; box-shadow: 0 0 8px rgba(234,179,8,0.5); }
.status-green { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

@media (max-width: 860px) {
    .layout { flex-direction: column; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 40;
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    }
    .sidebar.open { transform: translateX(0); }
    .content { padding: 2rem 1.5rem 5rem; }
    .mobile-nav-toggle { display: flex; }
}
