/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary-color: #06b6d4;
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-color: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: url('../img/bg.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

code {
    font-family: 'Fira Code', monospace;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 2rem 0;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    will-change: transform;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

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

.tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Navigation Menu */
.nav-menu {
    padding: 0 1rem;
}

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

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

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

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.nav-link:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateX(4px);
}

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

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 0.5rem;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: rgba(15, 23, 42, 0.92);
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 3rem 3rem;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0 2rem;
}

.hero-content {
    margin-bottom: 3rem;
}

.ascii-logo {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    line-height: 1.2;
    color: var(--primary-light);
    background: rgba(139, 92, 246, 0.1);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    margin-bottom: 2rem;
    display: inline-block;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sub-lead {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-light);
}

/* Documentation Sections */
.doc-section {
    margin-bottom: 4rem;
    scroll-margin-top: 2rem;
}

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

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

.doc-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.doc-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.doc-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

.lead {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.info-text {
    color: var(--text-muted);
    font-style: italic;
}

.usage-example {
    background: rgba(139, 92, 246, 0.1);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--primary-color);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Lists */
.doc-section ul,
.doc-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

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

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(139, 92, 246, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.5rem;
    font-size: 1.0625rem;
}

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

.feature-card {
    background: rgba(30, 41, 59, 0.8);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    will-change: transform;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.2);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.feature-card p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Feature List Detailed */
.feature-list-detailed {
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.feature-status {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-status.complete {
    color: var(--success);
}

.feature-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.feature-content p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.feature-content code {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Info Boxes */
.info-box {
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
    border: 1px solid;
}

.info-box h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.info-box p, .info-box ul, .info-box li {
    margin-bottom: 0.5rem;
}

.gradient-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--text-color);
}

.gradient-blue {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(14, 165, 233, 0.2) 100%);
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--text-color);
}

.gradient-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--text-color);
}

.success-box {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-left: 4px solid var(--success);
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.success-box strong {
    color: var(--success);
}

.warning-box {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-left: 4px solid var(--warning);
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.warning-box strong {
    color: var(--warning);
}

/* Code Blocks */
.code-block {
    position: relative;
    margin: 1.5rem 0;
    background: #1a1e2e;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
}

.code-block pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    color: #e2e8f0;
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Syntax Highlighting */
.code-block .keyword { color: #c792ea; font-weight: 500; }
.code-block .string { color: #c3e88d; }
.code-block .comment { color: #697098; font-style: italic; }
.code-block .function { color: #82aaff; }
.code-block .class-name { color: #ffcb6b; }
.code-block .number { color: #f78c6c; }
.code-block .operator { color: #89ddff; }
.code-block .annotation { color: #c792ea; }
.code-block .property { color: #f07178; }
.code-block .punctuation { color: #89ddff; }

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-light);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.copy-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--primary-color);
}

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Command Cards */
.command-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.command-card h3 {
    margin-top: 0;
    color: var(--primary-light);
}

.command-card code {
    background-color: rgba(139, 92, 246, 0.15);
    color: var(--primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9375rem;
}

.command-usage,
.command-example {
    margin-top: 1rem;
}

.command-usage strong,
.command-example strong {
    color: var(--text-color);
}

/* Tables */
.config-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.config-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.config-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.config-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.config-table code {
    background-color: rgba(139, 92, 246, 0.15);
    color: var(--primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.comparison-grid h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}

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

.support-card {
    background: rgba(30, 41, 59, 0.8);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    will-change: transform;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.2);
    border-color: var(--primary-color);
}

.support-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--primary-light);
}

.support-card ul {
    padding-left: 1.25rem;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-content p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.footer-content strong {
    color: var(--text-color);
}

.footer-copyright {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Links */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .container {
        padding: 5rem 1.5rem 2rem;
    }

    .doc-section h1 {
        font-size: 2rem;
    }

    .doc-section h2 {
        font-size: 1.5rem;
    }

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

    .ascii-logo {
        font-size: 0.5rem;
    }

    .feature-grid,
    .stats-grid,
    .support-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .config-table {
        font-size: 0.875rem;
    }

    .config-table th,
    .config-table td {
        padding: 0.75rem 0.5rem;
    }

    .hero-badges {
        flex-direction: column;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .sidebar,
    .mobile-toggle,
    .copy-btn,
    .footer {
        display: none;
    }

    .main-content {
        margin-left: 0;
        background: white;
    }
}

/* Animations - Removed for performance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation disabled for better performance */
/* .doc-section {
    animation: fadeInUp 0.6s ease-out;
} */
