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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f0f5f9;
    min-height: 100vh;
    color: #1a365d;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #d0dce5;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c5282;
}

.nav {
    display: flex;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: #4a6fa5;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #1a365d;
}

/* Main */
.main {
    padding: 25px 0;
}

.doc-wrapper {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
}

/* Sidebar */
.doc-sidebar {
    background: #fff;
    padding: 20px;
    position: sticky;
    top: 70px;
    border: 1px solid #d0dce5;
}

.doc-sidebar h3 {
    color: #1a365d;
    margin-bottom: 12px;
    font-size: 1rem;
}

#toc {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-link {
    text-decoration: none;
    color: #4a6fa5;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: block;
}

.toc-link:hover {
    color: #1a365d;
}

.toc-level-1 {
    font-weight: 600;
    color: #2c5282;
}

.toc-level-2 {
    padding-left: 10px;
}

.toc-level-3 {
    padding-left: 20px;
    font-size: 0.8rem;
}

/* Content */
.doc-content {
    background: #fff;
    padding: 25px;
    border: 1px solid #d0dce5;
}

.doc-content h1 {
    font-size: 1.8rem;
    color: #2c5282;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #bee3f8;
}

.doc-content h2 {
    font-size: 1.4rem;
    color: #1a365d;
    margin-top: 30px;
    margin-bottom: 12px;
}

.doc-content h3 {
    font-size: 1.15rem;
    color: #2c5282;
    margin-top: 20px;
    margin-bottom: 10px;
}

.doc-content p {
    margin-bottom: 12px;
    color: #2d3748;
}

.doc-content ul,
.doc-content ol {
    margin-bottom: 12px;
    padding-left: 22px;
}

.doc-content li {
    margin-bottom: 6px;
    color: #2d3748;
}

.doc-content pre {
    background: #1a365d;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

.doc-content code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
}

.doc-content pre code {
    color: #90cdf4;
    line-height: 1.6;
}

.doc-content p code,
.doc-content li code {
    background: #ebf8ff;
    padding: 2px 5px;
    color: #2c5282;
    font-size: 0.8rem;
}

.doc-content a {
    color: #3182ce;
    text-decoration: none;
}

.doc-content a:hover {
    text-decoration: underline;
}

.doc-content blockquote {
    border-left: 3px solid #3182ce;
    padding-left: 15px;
    margin: 15px 0;
    color: #4a6fa5;
    font-style: italic;
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.doc-content th,
.doc-content td {
    border: 1px solid #d0dce5;
    padding: 10px;
    text-align: left;
}

.doc-content th {
    background: #ebf8ff;
    font-weight: 600;
    color: #1a365d;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #4a6fa5;
}

.error {
    color: #c53030;
    text-align: center;
    padding: 20px;
}

/* Footer */
.footer {
    background: #1a365d;
    color: #90cdf4;
    padding: 20px 0;
    text-align: center;
    margin-top: 25px;
}

.footer a {
    color: #bee3f8;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 800px) {
    .doc-wrapper {
        grid-template-columns: 1fr;
    }

    .doc-sidebar {
        position: static;
    }

    .doc-content {
        padding: 15px;
    }
}
