:root {
    --primary-color: #1a6eb3;
    --sidebar-width: 280px;
    --header-height: 60px;
    --border-color: #e1e4e8;
    --text-color: #24292e;
    --sidebar-bg: #f6f8fa;
    --code-bg: #f6f8fa;
    --hover-color: #e1e4e8;
    --background-color: #fff;
    --header-bg: #1a6eb3;
    /* Changed to blue */
    --header-text: #ffffff;
    /* Changed to white */
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Light Theme (Default) */
[data-theme="light"] {
    --primary-color: #1a6eb3;
    --border-color: #e1e4e8;
    --text-color: #24292e;
    --sidebar-bg: #f6f8fa;
    --code-bg: #f6f8fa;
    --hover-color: #e1e4e8;
    --background-color: #fff;
    --header-bg: linear-gradient(135deg, #1a6eb3 0%, #0d4d8c 100%);
    /* Blue gradient */
    --header-text: #ffffff;
    /* White text */
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #58a6ff;
    --border-color: #30363d;
    --text-color: #f0f6fc;
    --sidebar-bg: #0d1117;
    --code-bg: #161b22;
    --hover-color: #21262d;
    --background-color: #0d1117;
    --header-bg: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    --header-text: #f0f6fc;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Green Theme */
[data-theme="green"] {
    --primary-color: #2ea44f;
    --border-color: #d1e7dd;
    --text-color: #1a2f23;
    --sidebar-bg: #f8f9fa;
    --code-bg: #f1f9f4;
    --hover-color: #d1e7dd;
    --background-color: #ffffff;
    --header-bg: linear-gradient(135deg, #2ea44f 0%, #22863a 100%);
    --header-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.5;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    box-shadow: var(--box-shadow);
    transition: background 0.3s, border-color 0.3s;
}

.logo {
    font-weight: bold;
    font-size: 20px;
    color: var(--header-text);
    margin-right: 30px;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    transition: background-color 0.3s, border-color 0.3s;
}

[data-theme="dark"] .search-box input {
    background-color: rgba(22, 27, 34, 0.9);
}

[data-theme="green"] .search-box input {
    background-color: rgba(255, 255, 255, 0.9);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a737d;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--header-text);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links a.active {
    color: var(--header-text);
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    position: fixed;
    right: 0 !important;
    color: var(--header-text);
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.theme-toggle i {
    font-size: 16px;
}

.theme-text {
    font-size: 14px;
}

.theme-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--box-shadow);
    z-index: 101;
    min-width: 140px;
    overflow: hidden;
}

.theme-dropdown.active {
    display: block;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--header-text);
}

.theme-option:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .theme-option:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.theme-option.active {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .theme-option.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.theme-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.theme-color.light {
    background: linear-gradient(135deg, #1a6eb3 0%, #0d4d8c 100%);
}

.theme-color.dark {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
}

.theme-color.green {
    background: linear-gradient(135deg, #2ea44f 0%, #22863a 100%);
}

/* Main container */
.container {
    display: flex;
    margin-top: var(--header-height);
    flex: 1;
}

/* Sidebar (Left) */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 20px 0;
    border-right: 1px solid var(--border-color);
    transition: transform 0.3s ease, background-color 0.3s, border-color 0.3s;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    margin-bottom: 8px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-links {
    list-style: none;
}

.sidebar-links li {
    margin-bottom: 2px;
}

.sidebar-links a {
    display: block;
    padding: 8px 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-links a:hover {
    background-color: var(--hover-color);
}

.sidebar-links a.active {
    background-color: rgba(26, 110, 179, 0.1);
    border-left: 3px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Right Sidebar (Table of Contents) */
.right-sidebar {
    width: 255px;
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    padding: 30px 20px 20px 20px;
    overflow-y: auto;
    z-index: 50;
    display: block;
    background-color: var(--sidebar-bg);
    border-left: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.right-sidebar .sidebar-section h3 {
    margin-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    padding-left: 0;
    padding-right: 0;
}

.right-sidebar .sidebar-links a {
    padding: 4px 0;
    font-size: 13px;
    border-left: none;
    color: var(--text-color);
}

/* Indent for nested properties and methods */
.right-sidebar .sidebar-links a:not([href*='section']) {
    padding-left: 15px;
}

.right-sidebar .sidebar-links a.active {
    background-color: transparent;
    color: var(--primary-color);
    font-weight: 600;
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    max-width: calc(100% - var(--sidebar-width) - 250px);
    padding: 30px;
    background-color: var(--background-color);
    transition: background-color 0.3s;
}

.breadcrumb {
    font-size: 14px;
    color: #586069;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 5px;
}

.class-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.class-name {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.class-description {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.class-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    flex-wrap: wrap;
}

.class-info div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.method,
.property {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.method-header,
.property-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.method-name,
.property-name {
    font-weight: 600;
    font-size: 18px;
    color: var(--primary-color);
}

.method-signature,
.property-type {
    font-family: 'Courier New', monospace;
    background-color: var(--code-bg);
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.method-description,
.property-description {
    margin-bottom: 10px;
    line-height: 1.6;
}

.params-table,
.returns-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
    box-shadow: var(--box-shadow);
}

.params-table th,
.returns-table th {
    text-align: left;
    padding: 12px 15px;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    font-weight: 600;
}

.params-table td,
.returns-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
}

.param-name,
.returns-type {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.code-example {
    background-color: var(--code-bg);
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    line-height: 1.5;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-right: 15px;
    color: var(--header-text);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        max-width: calc(100% - var(--sidebar-width));
    }

    .right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 90;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 20px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
    }

    .class-name {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .theme-text {
        display: none;
    }
}

/* Footer */
footer {
    background-color: var(--sidebar-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.note-block {
    background-color: var(--sidebar-bg);
    border-left: 5px solid #ffc107;
    padding: 10px;
    margin: 15px 0;
    color: var(--text-color);
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.params-table th,
.params-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.params-table th {
    background-color: var(--secondary-color);
    font-weight: bold;
}

.param-name {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}
 .property-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
        }

        .property-table th, .property-table td {
            padding: 0.8rem;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
        }

        .property-table th {
            background-color: var(--secondary-color);
            font-weight: bold;
        }
.property {
            background-color: var(--header-bg);
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            border: 1px solid var(--border-color);
        }

        .property-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .property-name {
            font-size: 1.2rem;
            font-weight: bold;
            color: var(--primary-color);
        }

        .property-type {
            font-family: 'Courier New', monospace;
            background-color: var(--code-bg);
            padding: 0.3rem 0.6rem;
            border-radius: 4px;
            font-size: 0.9rem;
        }

        .property-description {
            margin-top: 0.5rem;
        }


         /* Additional styles for introduction page */
        .hero-section {
            background: linear-gradient(135deg, var(--primary-color) 0%, #6d28d9 100%);
            color: white;
            padding: 60px 20px;
            text-align: center;
            margin: -20px -20px 40px -20px;
            border-radius: 0 0 10px 10px;
        }

        .hero-title {
            font-size: 3em;
            margin-bottom: 20px;
            font-weight: 700;
        }

        .hero-subtitle {
            font-size: 1.4em;
            margin-bottom: 30px;
            opacity: 0.9;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
            line-height: 1.5;
        }

        .cta-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 30px;
        }

        .cta-button {
            padding: 12px 30px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            text-decoration: none;
            border-radius: 25px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
            font-weight: 600;
            backdrop-filter: blur(10px);
        }

        .cta-button:hover {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 0.5);
            transform: translateY(-2px);
        }

        .cta-button.primary {
            background: #fff;
            color: var(--primary-color);
            border-color: #fff;
        }

        .cta-button.primary:hover {
            background: #f8f9fa;
            transform: translateY(-2px);
        }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin: 40px 0;
        }

        .feature-card {
            background: var(--bg-secondary);
            border-radius: 10px;
            padding: 30px;
            box-shadow: 0 5px 15px var(--shadow-color);
            border-left: 4px solid var(--primary-color);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px var(--shadow-color);
        }

        .feature-icon {
            font-size: 2.5em;
            color: var(--primary-color);
            margin-bottom: 20px;
        }

        .feature-title {
            font-size: 1.3em;
            font-weight: 600;
            margin-bottom: 15px;
            color: var(--text-primary);
        }

        .feature-description {
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .quick-start {
            background: var(--bg-secondary);
            border-radius: 10px;
            padding: 40px;
            margin: 50px 0;
            border-left: 4px solid var(--success-color);
        }

        .quick-start-title {
            font-size: 1.8em;
            margin-bottom: 25px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .quick-start-title i {
            color: var(--success-color);
        }

        .step {
            display: flex;
            align-items: flex-start;
            margin-bottom: 25px;
            gap: 20px;
        }

        .step-number {
            background: var(--primary-color);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            flex-shrink: 0;
        }

        .step-content {
            flex: 1;
        }

        .step-title {
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-primary);
        }

        .step-description {
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .code-example {
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 20px;
            margin-top: 15px;
            font-family: 'Courier New', monospace;
            font-size: 0.9em;
            color: var(--text-primary);
            overflow-x: auto;
        }

        .api-overview {
            margin: 50px 0;
        }

        .module-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 30px;
        }

        .module-card {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 25px;
            transition: all 0.3s ease;
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .module-card:hover {
            border-color: var(--primary-color);
            box-shadow: 0 5px 15px rgba(74, 108, 247, 0.1);
            transform: translateY(-3px);
            text-decoration: none;
            color: inherit;
        }

        .module-icon {
            font-size: 2em;
            color: var(--primary-color);
            margin-bottom: 15px;
        }

        .module-name {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--text-primary);
        }

        .module-description {
            color: var(--text-secondary);
            font-size: 0.9em;
            line-height: 1.5;
        }

        .resources-section {
            background: var(--bg-secondary);
            border-radius: 10px;
            padding: 40px;
            margin: 50px 0;
        }

        .resources-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 25px;
            margin-top: 30px;
        }

        .resource-card {
            background: var(--bg-secondary);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            box-shadow: 0 3px 10px var(--shadow-color);
            transition: transform 0.3s ease;
        }

        .resource-card:hover {
            transform: translateY(-5px);
        }

        .resource-icon {
            font-size: 2.5em;
            color: var(--primary-color);
            margin-bottom: 15px;
        }

        .resource-title {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--text-primary);
        }

        .resource-description {
            color: var(--text-secondary);
            font-size: 0.9em;
            margin-bottom: 20px;
        }

        .resource-link {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .resource-link:hover {
            text-decoration: underline;
        }

    

        .sidebar {
            background: var(--bg-secondary);
            box-shadow: 2px 0 10px var(--shadow-color);
        }

        .sidebar-section h3 {
            color: var(--text-primary);
        }

        .sidebar-links a {
            color: var(--text-secondary);
        }

        .sidebar-links a:hover, .sidebar-links a.active {
            color: var(--primary-color);
        }

        .right-sidebar {
            background: var(--bg-secondary);
            box-shadow: -2px 0 10px var(--shadow-color);
        }

        .section-title {
            color: var(--text-primary);
        }

        .class-description {
            color: var(--text-secondary);
        }

        @media (max-width: 768px) {
            .hero-title {
                font-size: 2.2em;
            }

            .hero-subtitle {
                font-size: 1.1em;
            }

            .cta-buttons {
                flex-direction: column;
                align-items: center;
            }

            .feature-grid {
                grid-template-columns: 1fr;
            }

            .quick-start {
                padding: 25px;
            }
        }