/* CSS Variables */
:root {
    --primary: #0073aa;
    --primary-dark: #005a87;
    --primary-light: #e5f3ff;
    --secondary: #23282d;
    --success: #46b450;
    --warning: #ffb900;
    --danger: #dc3232;
    --text: #1e1e1e;
    --text-light: #646970;
    --text-muted: #8c8f94;
    --bg: #ffffff;
    --bg-light: #f6f7f7;
    --bg-dark: #f0f0f1;
    --border: #dcdcde;
    --sidebar-width: 280px;
    --header-height: 60px;
    --pro-color: #9b59b6;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 1rem;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.logo i {
    color: var(--primary);
    font-size: 1.25rem;
}

.version {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section h3 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-section ul {
    list-style: none;
}

.nav-section a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-section a:hover {
    background: var(--bg-light);
    color: var(--text);
}

.nav-section a.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

.nav-section a i {
    width: 1rem;
    text-align: center;
    font-size: 0.85rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.sidebar-footer a:hover {
    color: var(--text);
}

.sidebar-footer .back-home {
    color: var(--primary);
    font-weight: 500;
}

.sidebar-footer .back-home:hover {
    color: var(--primary-dark);
}

/* Badge */
.badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    text-transform: uppercase;
}

.badge.pro {
    background: var(--pro-color);
    color: white;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* Content */
.content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.content .lead {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
}

.content p {
    margin-bottom: 1rem;
}

.content ul, .content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* Callout */
.callout {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.callout i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.callout strong {
    display: block;
    margin-bottom: 0.25rem;
}

.callout p {
    margin: 0;
    font-size: 0.9rem;
}

.callout.info {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
}

.callout.info i {
    color: var(--primary);
}

.callout.warning {
    background: #fff8e5;
    border-left: 4px solid var(--warning);
}

.callout.warning i {
    color: var(--warning);
}

.callout.success {
    background: #e8f5e9;
    border-left: 4px solid var(--success);
}

.callout.success i {
    color: var(--success);
}

.callout.danger {
    background: #fdecea;
    border-left: 4px solid var(--danger);
}

.callout.danger i {
    color: var(--danger);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.25rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.comparison-table th:not(:first-child),
.comparison-table td:not(:first-child) {
    text-align: center;
    width: 100px;
}

.text-success {
    color: var(--success);
}

.text-muted {
    color: var(--text-muted);
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all 0.2s;
}

.quick-link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.quick-link i {
    font-size: 1.25rem;
    color: var(--primary);
}

.quick-link.pro {
    background: linear-gradient(135deg, var(--pro-color), #8e44ad);
    border-color: transparent;
    color: white;
}

.quick-link.pro i {
    color: white;
}

.quick-link.pro:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Code */
code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: var(--bg-light);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: var(--danger);
}

pre {
    background: var(--secondary);
    color: #f8f8f2;
    padding: 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.85rem;
}

/* Footer */
.content-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 500;
}

.footer-nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Steps */
.steps {
    counter-reset: step;
    margin: 1.5rem 0;
}

.step {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 1.5rem;
    border-left: 2px solid var(--border);
    margin-left: 1rem;
}

.step:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: -1rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.step h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.step p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        padding: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding-top: var(--header-height);
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
    
    .content h1 {
        font-size: 1.75rem;
    }
    
    .content h2 {
        font-size: 1.25rem;
    }
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-overlay.show {
    display: block;
}

/* Search */
.search-box {
    padding: 0 1rem 1rem;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--bg-light);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg);
}

/* Tables */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.content th,
.content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
}

.content th {
    background: var(--bg-light);
    font-weight: 600;
}

/* Images */
.content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 1rem 0;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Accordion */
.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background: var(--bg-light);
}

.accordion-header i {
    transition: transform 0.2s;
}

.accordion-item.open .accordion-header i {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.accordion-item.open .accordion-body {
    display: block;
}

/* Copy button for code blocks */
.code-block {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    color: #888;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.copy-btn.copied {
    color: var(--success);
}
