/* 1. Reset Mechanics and Theme Constants */
:root {
    --sidebar-bg: #f3f4f6;
    --sidebar-border: #e5e7eb;
    --content-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --code-bg: #f8fafc;
    --code-border: #cbd5e1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--content-bg);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 2. DevDocs Layout Sidebar System */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

#search-bar {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--sidebar-border);
    font-size: 0.9rem;
    outline: none;
    background-color: white;
}

#search-bar:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.sidebar-menu {
    overflow-y: auto;
    padding: 1rem 0;
    flex-grow: 1;
}

.menu-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0.75rem 1rem 0.25rem 1rem;
    letter-spacing: 0.05em;
}

.menu-list {
    list-style: none;
}

.menu-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.menu-link:hover {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

.menu-link.active {
    background-color: var(--accent-light);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

/* 3. Main Document Viewport System */
.content-panel {
    flex-grow: 1;
    overflow-y: auto;
    padding: 3rem 4rem;
}

.doc-section {
    display: none;
    max-width: 800px;
}

.doc-section.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.content-panel h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--sidebar-border);
    padding-bottom: 0.5rem;
}

.content-panel > p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* 4. Method Cards Design */
.method-card {
    background-color: white;
    border: 1px solid var(--sidebar-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.method-card h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

.method-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* 5. Typography Code Block Rendering */
pre {
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
}

code {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    color: #0f172a;
}

/* 6. Animations and Utility Utilities */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Structural Breakpoints */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 220px;
        border-right: none;
        border-bottom: 1px solid var(--sidebar-border);
    }
    .content-panel {
        padding: 1.5rem;
    }
}
