:root {
    --bg-color: #0f1115;
    --bg-sidebar: #16181d;
    --bg-code: #1c1e26;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #00d2ff;
    --primary-hover: #3a7bd5;
    --border-color: rgba(255, 255, 255, 0.1);
    --header-height: 60px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

/* Header */
header.navbar {
    height: var(--header-height);
    background-color: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar .logo {
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .logo span { color: var(--primary); }

.nav-links {
    margin-left: auto;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary); }

/* Main Layout */
.layout {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: transparent;
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.sidebar h3:first-child { margin-top: 0; }

.sidebar ul { list-style: none; }

.sidebar li { margin-bottom: 0.5rem; }

.sidebar a {
    display: block;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.sidebar a.active {
    background-color: rgba(0, 210, 255, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* Content */
.content {
    flex: 1;
    padding: 3rem 4rem;
    max-width: 850px;
}

.content h1 { font-size: 2.5rem; margin-bottom: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.content h2 { font-size: 1.8rem; margin-top: 2.5rem; margin-bottom: 1rem; font-weight: 700; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.content h3 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: 0.8rem; font-weight: 600; }
.content p { margin-bottom: 1.2rem; color: #d1d5db; }

/* Code Blocks */
pre {
    background-color: var(--bg-code);
    padding: 1.2rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #e5e7eb;
}

p code, li code {
    background-color: var(--bg-code);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--primary);
    font-size: 0.85em;
    border: 1px solid var(--border-color);
}

/* Alerts / Notes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
    background-color: rgba(0, 210, 255, 0.05);
}

.alert-title { font-weight: 600; margin-bottom: 0.25rem; display: flex; align-items: center; gap: 0.5rem; }

/* Table of contents (Right Sidebar) */
.toc {
    width: 220px;
    padding: 2rem 1rem;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    display: none;
}

@media (min-width: 1200px) { .toc { display: block; } }

.toc h4 { font-size: 0.85rem; text-transform: uppercase; color: var(--text-main); margin-bottom: 1rem; }
.toc ul { list-style: none; }
.toc a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; padding: 0.25rem 0; border-left: 2px solid transparent; padding-left: 0.75rem; transition: all 0.2s; }
.toc a:hover { color: var(--text-main); border-left-color: var(--border-color); }
