:root {
    --primary-color: #0066ff;
    --surface-color: #ffffff;
    --background-color: #f8f9fc;
    --text-color: #4a5568;
    --heading-color: #1a202c;
    --border-color: #e2e8f0;
    --sidebar-width: 280px;
    --header-height: 60px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
    display: flex;
}

/* Sidebar Styles */
.docs-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.logo i {
    color: var(--primary-color);
}

.mobile-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.nav-section a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.nav-section a:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.nav-section a.active {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--background-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.github-link:hover {
    background: var(--heading-color);
    color: white;
}

.version-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.version-selector select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--surface-color);
    font-family: var(--font-sans);
}

/* Main Content Styles */
.docs-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
}

.mobile-header {
    display: none;
    align-items: center;
    padding: 1rem;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
}

.mobile-title {
    font-weight: 600;
    margin-left: 1rem;
}

.content-section {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.5rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    background: var(--primary-color);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.feature-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.feature-content p {
    margin: 0;
    line-height: 1.5;
}

/* Code Blocks */
.code-block {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #2d2d2d;
    color: #e1e1e1;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.copy-btn {
    background: none;
    border: none;
    color: #e1e1e1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* API Documentation */
.api-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.api-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.api-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.api-params table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.api-params th,
.api-params td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.api-params th {
    background: var(--background-color);
    font-weight: 600;
}

.required {
    color: #e53e3e;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Installation Tabs */
.installation-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Badges */
.badges {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.badges img {
    height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .docs-sidebar.active {
        transform: translateX(0);
    }

    .mobile-close {
        display: block;
    }

    .docs-content {
        margin-left: 0;
        padding: 1rem;
    }

    .mobile-header {
        display: flex;
    }

    .content-section {
        padding: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Print Styles */
@media print {
    .docs-sidebar,
    .mobile-header {
        display: none;
    }

    .docs-content {
        margin-left: 0;
    }

    .content-section {
        break-inside: avoid;
    }
}

.config-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.config-table th,
.config-table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.config-table th {
    background: var(--background-color);
    font-weight: 600;
}

.config-table td code {
    background: var(--background-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.info-box {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    display: flex;
    gap: 1rem;
}

.info-box i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.info-box h4 {
    margin: 0 0 0.5rem 0;
}

.info-box p {
    margin: 0;
    font-size: 0.925rem;
}


.back-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-home:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.back-home i {
    font-size: 0.75rem;
}


.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-home-mobile {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.875rem;
}

.back-home-mobile:hover {
    color: var(--primary-color);
}


.mobile-header {
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.mobile-title {
    margin-left: 0; 
}

/* Search Bar Styles */
.sidebar-search {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-color);
    opacity: 0.5;
}

#docsSearch {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--background-color);
    transition: all 0.2s ease;
}

#docsSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.search-shortcut {
    position: absolute;
    right: 0.75rem;
    background: var(--surface-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
}

/* Changelog Button Styles */
.changelog-wrapper {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.changelog-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.changelog-btn:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
}

.changelog-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: auto;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background: var(--surface-color);
    border-radius: 12px;
    max-width: 600px;
    margin: 2rem auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Changelog Entry Styles */
.changelog-entry {
    margin-bottom: 2rem;
}

.changelog-entry:last-child {
    margin-bottom: 0;
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.version-header h4 {
    margin: 0;
    color: var(--heading-color);
}

.date {
    color: var(--text-color);
    font-size: 0.875rem;
}

.changes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.change-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tag {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

.tag.feature {
    background: #e3f2fd;
    color: #1976d2;
}

.tag.fix {
    background: #fce4ec;
    color: #c2185b;
}

.tag.breaking {
    background: #ffebee;
    color: #c62828;
}

.tag.improvement {
    background: #e8f5e9;
    color: #2e7d32;
}

.change-item p {
    margin: 0;
    font-size: 0.875rem;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--heading-color);
}

.nav-brand i {
    color: var(--primary-color);
}

.sidebar-nav-top {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.back-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: var(--background-color);
    width: fit-content;
}

.back-home:hover {
    background: var(--border-color);
    color: var(--heading-color);
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

#docsSearch {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--background-color);
    transition: all 0.2s ease;
}

#docsSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}