/* GitBook-style Documentation Theme */
:root {
    --docs-bg: #0f1115;
    --docs-sidebar-bg: #0b0d10;
    --docs-border: rgba(255, 255, 255, 0.1);
    --docs-text: #e0e0e0;
    --docs-text-muted: #9ca3af;
    --docs-primary: #e60012;
    --docs-hover: rgba(255, 255, 255, 0.05);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--docs-bg);
    color: var(--docs-text);
    height: 100vh;
    overflow: hidden;
}

.docs-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.docs-sidebar {
    width: 280px;
    background: var(--docs-sidebar-bg);
    border-right: 1px solid var(--docs-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.docs-brand {
    padding: 1.5rem;
    border-bottom: 1px solid var(--docs-border);
}

.docs-logo {
    text-decoration: none;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
}

.docs-search {
    padding: 1rem;
    border-bottom: 1px solid var(--docs-border);
}

.search-input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid var(--docs-border);
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    height: 36px;
    transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--docs-primary);
    background: rgba(255, 255, 255, 0.08);
}

.search-input-wrapper svg {
    color: var(--docs-text-muted);
    margin-right: 0.5rem;
}

.search-input-wrapper input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.search-shortcut {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
    color: var(--docs-text-muted);
}

.docs-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.nav-group {
    margin-bottom: 1.5rem;
}

.nav-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--docs-text-muted);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--docs-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-link:hover {
    background: var(--docs-hover);
}

.nav-link.active {
    background: rgba(230, 0, 18, 0.1);
    color: var(--docs-primary);
    font-weight: 500;
}

.nav-link svg {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    color: var(--docs-text-muted);
}

.nav-link.active svg {
    color: var(--docs-primary);
}

.docs-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--docs-border);
}

.sidebar-link {
    display: flex;
    align-items: center;
    color: var(--docs-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: var(--docs-hover);
    color: white;
}

.sidebar-link svg {
    margin-right: 0.5rem;
}

/* Main Content */
.docs-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.docs-header {
    height: 60px;
    border-bottom: 1px solid var(--docs-border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    flex-shrink: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--docs-text);
    cursor: pointer;
    display: none;
    padding: 0.5rem;
    margin-right: 1rem;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--docs-text-muted);
}

.docs-content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.docs-content {
    flex: 1;
    overflow-y: auto;
    padding: 3rem 4rem;
    max-width: 900px;
}

.docs-toc {
    width: 250px;
    padding: 3rem 1.5rem;
    border-left: 1px solid var(--docs-border);
    display: none;
    overflow-y: auto;
}

@media (min-width: 1200px) {
    .docs-toc {
        display: block;
    }
}

/* Typography */
.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.docs-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--docs-border);
}

.docs-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.docs-content p {
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: #d1d5db;
}

.docs-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #e60012;
}

.docs-content pre {
    background: #1a1d24;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--docs-border);
}

.docs-content pre code {
    background: transparent;
    padding: 0;
    color: #e0e0e0;
}

.docs-content blockquote {
    border-left: 4px solid var(--docs-primary);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(230, 0, 18, 0.05);
    border-radius: 0 4px 4px 0;
}

.docs-content ul, .docs-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.docs-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.docs-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid var(--docs-border);
}

/* Responsive */
@media (max-width: 768px) {
    .docs-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
    }

    .docs-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .docs-content {
        padding: 2rem 1.5rem;
    }

    .docs-header {
        padding: 0 1rem;
    }
}
