.docs-container {
    display: flex;
    padding-top: 80px;
    min-height: 100vh;
}

.docs-sidebar {
    position: sticky;
    top: 80px;
    width: 280px;
    height: calc(100vh - 80px);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

details {
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

summary {
    cursor: pointer;
    padding: 1rem;
    background: var(--bg-card);
    font-weight: 600;
    color: var(--primary);
    transition: background 0.3s;
    position: relative;
}

summary::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    transition: transform 0.3s;
}

details[open] > summary::after {
    transform: rotate(180deg);
}

summary:hover {
    background: rgba(0, 212, 255, 0.1);
}

details[open] > summary {
    border-bottom: 1px solid var(--border);
}

details pre {
    margin: 0;
    border: none;
    border-radius: 0;
    border-top: none;
}

details summary {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

details summary:hover {
    color: var(--primary);
}

details summary::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.3s;
    font-size: 0.8rem;
}

details[open] summary::before {
    transform: rotate(90deg);
}

details.group {
    margin-bottom: 2rem;
    border: none;
}

details.group > summary {
    font-size: 1.5rem;
    background: var(--bg-darker);
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

details.group[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid var(--border);
}

details.group > .recipes {
    background: var(--bg-card);
    padding: 2rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border: 1px solid var(--border);
    border-top: none;
}

/* "Pro Tip" boxes */
.pro-tip {
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid var(--secondary);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.pro-tip::before {
    content: '💡 Pro Tip: ';
    font-weight: 700;
    color: var(--secondary);
}

/* "Common Mistake" boxes */
.common-mistake {
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid #ff9800;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.common-mistake::before {
    content: '⚠️ Common Mistake: ';
    font-weight: 700;
    color: #ff9800;
}

.search-box {
    margin-bottom: 2rem;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Search highlighting */
.search-highlight {
    background: rgba(0, 212, 255, 0.2) !important;
    border-left: 3px solid var(--primary);
}

#searchInput {
    transition: all 0.3s ease;
}

#searchInput:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

/* Smooth transitions for search results */
.nav-section,
.nav-section a {
    transition: opacity 0.2s ease, display 0.2s ease;
}

/* No results message styling */
#search-no-results {
    padding: 1.5rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    margin-top: 1rem;
}

/* Global search results */
.global-search-results {
    margin-top: 1rem;
    background: var(--bg-darker);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.search-results-header {
    padding: 0.6rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--primary);
}

.search-result-item {
    display: block;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(0, 212, 255, 0.05);
    padding-left: 1.5rem;
}

.search-result-title {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.search-result-title mark {
    background: rgba(0, 212, 255, 0.3);
    color: var(--primary);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.search-result-section {
    font-size: 0.85rem;
    color: var(--text-muted);
}

#search-no-results {
    margin-top: 1rem;
    background: var(--bg-darker);
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 1rem;
}

#search-no-results > div {
    padding: 0.5rem !important;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin-bottom: 0.3rem;
}

.nav-section a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.nav-section h3 a {
    display: block;
    padding: 0;
    margin-left: 0;
    font-size: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
}

.nav-section a:hover {
    color: var(--text);
    background: rgba(0, 212, 255, 0.05);
}

.nav-section a.active {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
    font-weight: 600;
}

.sub-section {
    margin-bottom: 0.5rem;
}

.sub-section > a {
    color: var(--text-muted);
}

.sub-items {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
    margin-left: 0.5rem;
}

.sub-items li {
    margin-bottom: 0.3rem;
}

.sub-items a {
    color: var(--text-muted);
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
}

.sub-items a:hover {
    color: var(--text);
    background: rgba(0, 212, 255, 0.05);
}

.sub-items a.active {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

.docs-content {
    flex: 1;
    padding: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.doc-article {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.doc-article h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.doc-article h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.doc-article h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.lead {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.doc-article p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.doc-article ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.doc-article li {
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.feature-list li {
    padding-left: 0.5rem;
}

.doc-article pre {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: 0 0 0 1px rgba(0,212,255,0.05), 0 10px 30px rgba(0,0,0,0.4);
}

.doc-article code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #e6edf3;
    letter-spacing: -0.2px;
}

.doc-article p code {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    color: #7dd3fc;
    font-size: 0.85rem;
}

.doc-article > .info-box:first-of-type {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(139, 92, 246, 0.15));
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
}

.info-box,
.warning-box,
.success-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid;
}

.info-box {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary);
}

.warning-box {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.success-box {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
}

.info-icon,
.warning-icon,
.success-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-box h4,
.warning-box h4,
.success-box h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-box p,
.warning-box p,
.success-box p {
    margin: 0;
}

.code-example-box {
    background: var(--bg-darker);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border);
}

.code-example-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.code-example-box pre {
    margin-bottom: 1rem;
}

.code-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

.code-wrapper {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary);
}

pre {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-card);
}

pre::-webkit-scrollbar {
    height: 6px;
}

pre::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 3px;
}

pre::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: darken(var(--primary), 10%);
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.example-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.example-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.15);
}

.example-card h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.example-card p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.example-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s;
}

.example-link:hover {
    gap: 0.5rem;
}

.docs-footer {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    margin-top: 4rem;
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.footer-nav-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.footer-nav-link:hover {
    text-decoration: underline;
    color: var(--text);
}

.docs-footer p {
    text-align: center;
    color: var(--text-muted);
}

.docs-footer a {
    color: var(--primary);
    text-decoration: none;
}

.docs-footer a:hover {
    text-decoration: underline;
}

/* Mobile Sidebar Toggle Button */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 56px;
    height: 56px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
    transition: all 0.3s;
    opacity: 0.85;
}

.mobile-sidebar-toggle:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.4);
}

.mobile-sidebar-toggle::before {
    content: '☰';
    color: #0a0e1a;
    font-size: 1.5rem;
    font-weight: bold;
}

.mobile-sidebar-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.mobile-sidebar-toggle.sidebar-open {
    display: none;
    visibility: hidden;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
}

@media (max-width: 1024px) {
    /* Hide desktop sidebar by default */
    .docs-sidebar {
        position: fixed;
        top: 80px;
        left: 0;
        width: 280px;
        height: calc(100vh - 80px);
        transform: translateX(-100%);
        z-index: 999;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
    }

    /* Show sidebar when active */
    .docs-sidebar.active {
        transform: translateX(0);
    }

    /* Show mobile sidebar toggle button */
    .mobile-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Show overlay when sidebar is active */
    .sidebar-overlay {
        display: block;
    }

    .docs-content {
        max-width: 100%;
        width: 100%;
    }

    /* Navbar mobile styles */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-card);
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 998;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    /* Animate hamburger menu */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .docs-content {
        padding: 2rem 1rem;
    }

    .docs-sidebar {
        width: 260px;
    }

    .mobile-sidebar-toggle {
        bottom: 1rem;
        left: 1rem;
        width: 52px;
        height: 52px;
    }

    .mobile-sidebar-toggle::before {
        font-size: 1.4rem;
    }

    .doc-article h1 {
        font-size: 2rem;
    }

    .doc-article h2 {
        font-size: 1.5rem;
    }

    .example-grid {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .docs-sidebar {
        width: 85vw;
        max-width: 280px;
    }

    .nav-brand .logo {
        font-size: 1.2rem;
    }

    .mobile-sidebar-toggle {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        left: 1rem;
    }

    .mobile-sidebar-toggle::before {
        font-size: 1.3rem;
    }
}
/* API Reference Tables */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0 2rem;
    font-size: 0.9rem;
}

.api-table th {
    background: rgba(0, 212, 255, 0.08);
    color: var(--primary);
    text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 2px solid var(--border);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    vertical-align: top;
}

.api-table td:first-child {
    color: var(--text);
    white-space: nowrap;
}

.api-table td code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary);
}

.api-table tr:last-child td {
    border-bottom: none;
}

.api-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Feature list */
ul.feature-list {
    list-style: none;
    padding: 0;
}

ul.feature-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

ul.feature-list li:last-child {
    border-bottom: none;
}

ul.feature-list li strong {
    color: var(--text);
}
