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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f8f9fa;
    --border-color: #e1e4e8;
    --code-bg: #282c34;
    --sidebar-width: 280px;
    --header-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--bg-light);
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-color);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    padding: 1rem 0;
    z-index: 100;
}

.sidebar-header {
    padding:1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.version {
    color: var(--text-light);
    font-size: 0.875rem;
}

.nav-menu ul {
    list-style: none;
    padding: 0 1rem;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 500;
}

.sidebar-footer {
    position: fixed;
    bottom: 0;
    width: var(--sidebar-width);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.github-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem 0;
}

.section {
    margin-bottom: 2rem;
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.section h2 {
    font-size: 2rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.section h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-color);
}

.section h4 {
    font-size: 1.25rem;
    margin: 1rem 0 0.75rem;
    color: var(--text-color);
}

.section p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.section ul, .section ol {
    margin: 1rem 0 1rem 2rem;
    color: var(--text-light);
}

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

.section code {
    background: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.section pre {
    background: var(--code-bg);
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.section pre code {
    background: transparent;
    padding: 0;
    color: #abb2bf;
    font-size: 0.9rem;
}

/* Method List */
.method-list {
    margin: 1.5rem 0;
}

.method-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.method-item code {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--primary-color);
    background: transparent;
    padding: 0;
}

.method-item p {
    margin: 0;
    color: var(--text-light);
}

/* Middleware Item */
.middleware-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.middleware-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Info Box */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.info-box strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #1976d2;
}

.info-box ul {
    margin: 0.5rem 0 0 1.5rem;
}

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

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
    }

    .section {
        padding: 1.5rem;
    }
}

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

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

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

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

/* Syntax Highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #5c6370;
}

.token.punctuation {
    color: #abb2bf;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #e06c75;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #98c379;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #56b6c2;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #c678dd;
}

.token.function,
.token.class-name {
    color: #61afef;
}

.token.regex,
.token.important,
.token.variable {
    color: #e06c75;
}

