/* ====================================
   FOOTER
   ==================================== */

.landing-footer {
    background: #020202;
    padding: 3rem 0;
    margin-top: auto;
    border-top: 1px solid #1f1f22;
    width: 100%;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-brand.flex.flex-row {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    height: 28px;
    width: auto;
    display: block;
}

.brand-name {
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
}

.footer-brand p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    text-align: center;
}

.copyright {
    color: #52525b;
    font-size: 0.85rem;
}

.brand-link {
    color: inherit;
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-container {
        padding: 0 16px;
    }

    .footer-links {
        justify-content: center;
        row-gap: 12px;
        column-gap: 16px;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
}

/* ====================================
   DOCUMENTATION PAGE
   ==================================== */

.docs-container {
    min-height: 100vh;
    background: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    scroll-padding-top: 80px;
}

.docs-container .nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(10px);
}

.docs-layout {
    display: flex;
    flex: 1;
    width: 100%;
    position: relative;
}

/* Mobile Toggle Button */
.docs-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    align-items: center;
    gap: 8px;
}


.docs-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.docs-sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

/* Close button inside sidebar */
.docs-sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    z-index: 10;
}

.docs-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* Documentation Sidebar */
.docs-sidebar {
    width: 280px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 32px 0;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.docs-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.docs-toc {
    padding: 0 24px;
}

.toc-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 16px 0;
    font-weight: 600;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 4px;
}

.toc-list a {
    display: block;
    padding: 8px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.toc-list a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.toc-list ul {
    list-style: none;
    padding-left: 16px;
    margin: 4px 0;
}

.toc-list ul a {
    font-size: 0.875rem;
    padding: 6px 12px;
}

/* Documentation Content */
.docs-content {
    flex: 1;
    max-width: 950px;
    padding: 60px 40px;
    line-height: 1.7;
    margin: 0 auto;
}

.docs-content h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin: 0 0 48px 0;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
    letter-spacing: -0.02em;
}

.docs-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 56px 0 24px 0;
    color: var(--text-main);
    padding-top: 16px;
    scroll-margin-top: 80px;
}

.docs-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 40px 0 16px 0;
    color: var(--text-main);
    scroll-margin-top: 80px;
}

.docs-content p {
    margin: 16px 0;
    font-size: 1.05rem;
}

.docs-content ul,
.docs-content ol {
    margin: 16px 0;
    padding-left: 32px;
}

.docs-content li {
    margin: 8px 0;
    line-height: 1.7;
}

.docs-content code {
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: #e4e4e7;
    border: 1px solid var(--border);
}

.docs-content pre {
    background: #000;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin: 24px 0;
    max-width: 100%;
}

.docs-content pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.95rem;
}

.docs-content section {
    margin-bottom: 48px;
    scroll-margin-top: 80px;
}

.docs-content strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Ensure all content respects container width */
.docs-content img,
.docs-content video,
.docs-content iframe {
    max-width: 100%;
    height: auto;
}

.docs-content table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

/* Special callout boxes */
.docs-content .note,
.docs-content .tip,
.docs-content .warning {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 24px 0;
    border-left: 4px solid;
}

.docs-content .note {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.docs-content .tip {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.docs-content .warning {
    background: rgba(234, 179, 8, 0.1);
    border-color: #eab308;
}

.docs-footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
}

.docs-footer a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.docs-footer a:hover {
    color: #3b82f6;
}

/* Mobile Responsive for Docs */
@media (max-width: 968px) {
    .docs-container {
        overflow-x: hidden;
    }

    .docs-layout {
        flex-direction: column;
        overflow-x: hidden;
    }

    /* Show toggle button on mobile */
    .docs-sidebar-toggle {
        display: flex !important;
        visibility: visible;
        opacity: 1;
    }

    /* Hide sidebar by default on mobile */
    .docs-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 999;
        border-right: 1px solid var(--border);
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
        transition: left 0.3s ease-in-out;
        padding-top: 60px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }

    .docs-sidebar::-webkit-scrollbar {
        width: 6px;
    }

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

    .docs-sidebar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

    .docs-sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    /* Show sidebar when open */
    .docs-sidebar.open {
        left: 0;
    }

    /* Show close button on mobile */
    .docs-sidebar-close {
        display: block;
    }

    /* Add overlay backdrop when sidebar is open */
    .docs-sidebar.open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        animation: fadeIn 0.3s;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    .docs-content {
        padding: 32px 20px;
        max-width: 100%;
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .docs-content h1 {
        font-size: 2rem;
        margin-bottom: 32px;
    }

    .docs-content h2 {
        font-size: 1.5rem;
    }

    .docs-content h3 {
        font-size: 1.25rem;
    }

    .docs-content p,
    .docs-content li {
        font-size: 1rem;
    }

    .docs-content ul,
    .docs-content ol {
        padding-left: 24px;
    }

    .docs-content pre {
        padding: 16px;
        margin: 16px -4px;
    }

    .docs-content pre code {
        word-break: break-word;
        white-space: pre-wrap;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .docs-sidebar-toggle {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .docs-sidebar {
        width: 90%;
    }

    .docs-content {
        padding: 24px 16px;
    }

    .docs-content h1 {
        font-size: 1.75rem;
    }

    .docs-content h2 {
        font-size: 1.35rem;
    }

    .docs-content h3 {
        font-size: 1.15rem;
    }

    .docs-content .note,
    .docs-content .tip,
    .docs-content .warning {
        padding: 12px 16px;
        margin: 16px 0;
    }
}

/* Markdown Preview */
.markdown-body {
    padding: 30px;
    overflow-y: auto;
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
}
