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

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --code-bg: #f3f4f6;
    --sidebar-width: 280px;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.sidebar-toggle:hover {
    background: var(--primary-hover);
}

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

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

/* Header */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Layout */
.layout {
    display: flex;
    min-height: calc(100vh - 140px);
}

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

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.sidebar-section a {
    display: block;
    padding: 0.375rem 0;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.sidebar-section a:hover {
    color: var(--primary);
}

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

.content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.content p {
    margin-bottom: 1rem;
}

.content ul, .content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content li {
    margin-bottom: 0.375rem;
}

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

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

/* Tables */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

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

.content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.content tr:nth-child(even) {
    background: var(--bg-secondary);
}

/* Code */
.content code {
    background: var(--code-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

.content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.content pre code {
    background: none;
    padding: 0;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Quick Links */
.quick-links {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.quick-links a {
    display: inline-block;
    margin-right: 1rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.feature-card h4 {
    margin-top: 0;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        display: none;
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1001;
        border-right: none;
        border-bottom: none;
        overflow-y: auto;
        padding-top: 80px;
    }

    .sidebar.mobile-open {
        display: block;
    }

    .content {
        padding: 1.5rem;
        margin-top: 0;
    }

    .sidebar-toggle {
        display: block;
        z-index: 1002;
    }
}
