/* Documentation Layout */
.docs-layout {
    display: flex;
    min-height: calc(100vh - 140px);
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.docs-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #0d111a;
    border-right: 1px solid #1b2130;
    padding: 20px 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.docs-search {
    padding: 0 16px 16px;
    border-bottom: 1px solid #1b2130;
    margin-bottom: 12px;
}

.docs-search input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #273042;
    background: #131826;
    color: #fff;
    font-size: 0.95em;
    box-sizing: border-box;
}

.docs-search input::placeholder { color: #5c6370; }
.docs-search input:focus { outline: none; border-color: #ff7a1a; }

.sidebar-section { margin-bottom: 8px; }

.sidebar-section-title {
    padding: 10px 20px;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5c6370;
    font-weight: 600;
}

.sidebar-link {
    display: block;
    padding: 8px 20px 8px 28px;
    color: #aab2c0;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover { color: #fff; background: rgba(255, 122, 26, 0.1); }
.sidebar-link.active { color: #ff7a1a; background: rgba(255, 122, 26, 0.1); border-left-color: #ff7a1a; }

/* Main content */
.docs-content {
    flex: 1;
    padding: 30px 40px;
    max-width: 900px;
    overflow-x: hidden;
}

.docs-content h1 {
    font-size: 2.2em;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #1b2130;
}

.docs-content h2 {
    font-size: 1.5em;
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1b2130;
    color: #ff7a1a;
}

.docs-content h3 { font-size: 1.2em; margin: 28px 0 12px; color: #fff; }
.docs-content h4 { font-size: 1.05em; margin: 20px 0 8px; color: #cbd3e4; }

.docs-section { display: none; }
.docs-section.active { display: block; }

/* Method cards */
.method-grid { display: grid; gap: 12px; margin: 16px 0; }

.method-card {
    background: #131826;
    border: 1px solid #1b2130;
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.2s ease;
}

.method-card:hover { border-color: #ff7a1a; }
.method-card.hidden { display: none; }

.method-name {
    font-family: 'Fira Code', 'Consolas', monospace;
    color: #ff7a1a;
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 4px;
}

.method-desc { color: #aab2c0; font-size: 0.9em; margin-bottom: 8px; }

.method-example {
    background: #0d111a;
    border: 1px solid #1b2130;
    border-radius: 6px;
    padding: 8px 10px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.82em;
    color: #cbd3e4;
    overflow-x: auto;
}

.method-example .comment { color: #5c6370; }
.method-example .string { color: #98c379; }
.method-example .num { color: #61afef; }

/* Category pills */
.category-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }

.category-pill {
    padding: 6px 14px;
    border-radius: 20px;
    background: #131826;
    border: 1px solid #1b2130;
    color: #aab2c0;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.15s ease;
}

.category-pill:hover { border-color: #ff7a1a; color: #fff; }
.category-pill.active { background: #ff7a1a; border-color: #ff7a1a; color: #0f1115; }

/* Code blocks */
.code-block {
    background: #0d111a;
    border: 1px solid #1b2130;
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

.code-keyword { color: #ff7a1a; font-weight: 600; }
.code-string { color: #98c379; }
.code-comment { color: #5c6370; font-style: italic; }
.code-number { color: #61afef; }

/* Info boxes */
.info-box {
    background: #131826;
    border-left: 4px solid #ff7a1a;
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 20px 0;
}

.info-box.tip { border-left-color: #98c379; }
.info-box.warning { border-left-color: #e5c07b; }
.info-box-title { font-weight: 600; margin-bottom: 6px; color: #fff; }

/* Tables */
.docs-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.docs-table th, .docs-table td { padding: 12px 16px; border: 1px solid #1b2130; text-align: left; }
.docs-table th { background: #131826; color: #ff7a1a; font-weight: 600; }
.docs-table tr:hover td { background: rgba(255, 122, 26, 0.05); }

/* Type badges */
.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

.type-badge.string { background: #1e3a2f; color: #98c379; }
.type-badge.list { background: #1e2d3a; color: #61afef; }
.type-badge.dict { background: #3a2e1e; color: #e5c07b; }

/* Mobile sidebar toggle */
.docs-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ff7a1a;
    border: none;
    color: #0f1115;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: center;
}

.docs-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

@media (max-width: 900px) {
    .docs-sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
    }
    .docs-sidebar.open { left: 0; }
    .docs-sidebar-toggle { display: flex; }
    .docs-content { padding: 20px; }
    .docs-overlay.open { display: block; }
}

/* No results */
.no-results { text-align: center; padding: 40px; color: #5c6370; }
.no-results-icon { font-size: 3em; margin-bottom: 16px; }

/* Search highlight */
.search-highlight { background: rgba(255, 122, 26, 0.3); padding: 1px 2px; border-radius: 2px; }
