:root {
    --red: #ef3b2d;
    --dark-red: #bf2d23;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen', Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #fff;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-700);
}

/* Layout */
.docs-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - 73px);
}

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

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

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

.sidebar-section ul {
    list-style: none;
}

.sidebar-section a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-section a:hover {
    color: var(--red);
    background-color: rgba(239, 59, 45, 0.05);
}

.sidebar-section a.active {
    color: var(--red);
    font-weight: 600;
    background-color: rgba(239, 59, 45, 0.05);
    border-left: 3px solid var(--red);
}

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

.main-content h1 {
    font-size: 2.5rem;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.main-content h2 {
    font-size: 1.875rem;
    color: var(--gray-900);
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.main-content h2:first-child {
    margin-top: 0;
}

.main-content h3 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.main-content h4 {
    font-size: 1.25rem;
    color: var(--gray-900);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.main-content p {
    margin-bottom: 1.25rem;
    color: var(--gray-700);
    font-size: 1rem;
}

.main-content ul,
.main-content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
    color: var(--gray-700);
}

.main-content li {
    margin-bottom: 0.5rem;
}

.main-content a {
    color: var(--red);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.main-content a:hover {
    border-bottom-color: var(--red);
}

/* Callouts */
.callout {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.375rem;
    border-left: 4px solid;
}

.callout p:last-child {
    margin-bottom: 0;
}

.callout-info {
    background-color: #e7f3ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.callout-warning {
    background-color: #fff3cd;
    border-color: #f59e0b;
    color: #92400e;
}

.callout-danger {
    background-color: #fee;
    border-color: #ef4444;
    color: #991b1b;
}

.callout-success {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

code {
    background-color: var(--gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--red);
}

/* On This Page */
.table-of-contents {
    display: none;
    width: 240px;
    padding: 2rem 0 2rem 2rem;
    position: sticky;
    top: 73px;
    height: calc(100vh - 73px);
    overflow-y: auto;
}

.table-of-contents h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents a {
    display: block;
    padding: 0.25rem 0;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.table-of-contents a:hover {
    color: var(--red);
}

/* Responsive */
@media (max-width: 1200px) {
    .table-of-contents {
        display: none !important;
    }
}

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

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 73px;
        z-index: 99;
        transition: left 0.3s;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        background-color: #fff;
    }

    .sidebar.open {
        left: 0;
    }

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

    .main-content h1 {
        font-size: 2rem;
    }
}

/* Documentation Cards */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.doc-card {
    padding: 1.5rem;
    background-color: var(--gray-100);
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.doc-card:hover {
    border-color: var(--red);
    box-shadow: 0 4px 12px rgba(239, 59, 45, 0.1);
    transform: translateY(-2px);
}

.doc-card h3 {
    color: var(--red);
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
}

.doc-card p {
    margin: 0;
    color: var(--gray-700);
    font-size: 0.95rem;
}
