:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --bg-light: #ecf0f1;
    --sidebar-width: 320px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    margin: 0;
    overflow: hidden;
}

.stats-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 0;
    transition: transform 0.3s ease;
}

    .stats-card:hover {
        transform: translateY(-5px);
    }

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.docs-container {
    display: flex;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.resizer {
    width: 5px;
    background: #ddd;
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
    transition: background 0.2s;
}

    .resizer:hover {
        background: var(--secondary-color);
    }

    .resizer:active {
        background: var(--primary-color);
    }

    .resizer::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: -2px;
        right: -2px;
    }

.sidebar {
    background: white;
    overflow-y: auto;
    height: 100vh;
    flex-shrink: 0;
    min-width: 200px;
    max-width:350px;
}

.sidebar-welcome {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    cursor: pointer;
    transition: opacity 0.2s;
    border-bottom: 1px solid #ddd;
}

    .sidebar-welcome:hover {
        opacity: 0.9;
    }

    .sidebar-welcome.active {
        opacity: 1;
        box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
    }

    .sidebar-welcome h4 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
    }

    .sidebar-welcome p {
        margin: 0.5rem 0 0 0;
        font-size: 0.875rem;
        opacity: 0.9;
    }

.search-box {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #ddd;
}

    .search-box input {
        width: 100%;
        padding: 0.5rem;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 0.875rem;
    }

        .search-box input:focus {
            outline: none;
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }

.sidebar-group.hidden, .sidebar-endpoint.hidden {
    display: none;
}

.no-results {
    padding: 1rem 1.5rem;
    text-align: center;
    color: #999;
    font-size: 0.875rem;
}

.sidebar-group {
    border-bottom: 1px solid #eee;
}

    .sidebar-group .sidebar-group {
        border-bottom: none;
    }

.sidebar-group-header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.sidebar-group .sidebar-group .sidebar-group-header {
    font-weight: 500;
    background: #fcfcfc;
    font-size: 0.95rem;
}

.sidebar-group-header:hover {
    background: #e9ecef;
}

.sidebar-group-header .badge {
    font-size: 0.7rem;
    background-color: transparent !important;
    color: #111;
}

.sidebar-endpoints {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .sidebar-endpoints.show {
        max-height: 3000px;
    }

.sidebar-endpoint {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .sidebar-endpoint:hover {
        background: #f8f9fa;
    }

    .sidebar-endpoint.active {
        background: #e7f3ff;
        border-left: 3px solid var(--secondary-color);
    }

    .sidebar-endpoint .http-method {
        flex: 0 0 60px; /* fixed width */
        text-align: center;
        font-size: 0.75rem;
        font-weight: 700;
        padding: 10px 0;
    }

    .sidebar-endpoint .endpoint-path {
        font-size: 0.85rem;
        color: #666;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.content-area {
    overflow-y: auto;
    background: var(--bg-light);
    flex: 1;
    min-width: 300px;
}

.try-it-panel {
    background: white;
    overflow-y: auto;
    height: 100vh;
    padding: 1.5rem;
    flex-shrink: 0;
    min-width: 250px;
}

    .try-it-panel h5 {
        color: var(--primary-color);
        margin-bottom: 1rem;
    }

.token-input-group {
    margin-bottom: 1.5rem;
}

    .token-input-group input {
        font-family: 'Courier New', monospace;
        font-size: 0.85rem;
    }

.request-section, .response-section {
    margin-bottom: 1.5rem;
}

.response-output {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    max-height: 400px;
    overflow-y: auto;
    word-break: break-all;
    text-align: left !important;
    padding-top: 50px;
}
    .response-output.success {
        border-left: 4px solid #49cc90;
    }

    .response-output.error {
        border-left: 4px solid #f93e3e;
    }

.try-it-panel.hidden {
    display: none;
}

.param-input {
    margin-bottom: 0.75rem;
}

    .param-input label {
        font-size: 0.875rem;
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
    }

    .param-input small {
        color: #666;
        font-size: 0.75rem;
    }

.welcome-message {
    background: white;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: none;
}

    .welcome-message.active {
        display: block;
    }

    .welcome-message h2 {
        color: var(--primary-color);
        margin-bottom: 1rem;
    }

.endpoint-detail {
    background: white;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: none;
}

    .endpoint-detail.active {
        display: block;
    }

.http-method {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.http-get {
    background-color: #61affe;
    color: white;
}

.http-post {
    background-color: #49cc90;
    color: white;
}

.http-put {
    background-color: #fca130;
    color: white;
}

.http-delete {
    background-color: #f93e3e;
    color: white;
}

.http-patch {
    background-color: #50e3c2;
    color: white;
}

.code-sample {
    background: #2d2d2d;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    position: relative;
    white-space:wrap !important;
}

.code-container {
    position: relative;
}

.code-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.code-container:hover .code-actions,
.code-sample:hover .code-actions {
    opacity: 1;
}

.code-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .code-action-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .code-action-btn.copied {
        background: rgba(34, 197, 94, 0.2);
        border-color: rgba(34, 197, 94, 0.4);
        color: #22c55e;
    }

.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    padding: 2rem;
}

    .fullscreen-modal.active {
        display: flex;
        flex-direction: column;
    }

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: #fff;
}

    .fullscreen-header h3 {
        margin: 0;
        color: #fff;
    }

.fullscreen-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

    .fullscreen-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.fullscreen-content {
    flex: 1;
    overflow: auto;
    background: #2d2d2d;
    border-radius: 8px;
    padding: 1.5rem;
}

    .fullscreen-content pre {
        margin: 0;
    }

    .fullscreen-content code {
        font-size: 1rem;
        line-height: 1.6;
    }

.nav-pills .nav-link {
    color: var(--primary-color);
}

    .nav-pills .nav-link.active {
        background-color: var(--secondary-color);
    }

.param-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #e8f4f8;
    border: 1px solid #b3dce6;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.param-required {
    background: #fff3cd;
    border-color: #ffc107;
}

.chevron {
    transition: transform 0.3s;
}

    .chevron.rotated {
        transform: rotate(180deg);
    }

.missing-docs-section {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

    .missing-docs-section h4 {
        color: #856404;
        margin-bottom: 1rem;
    }

.missing-doc-item {
    background: white;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

@@media (max-width: 992px) {
    .docs-container {
        flex-direction: column;
        height: auto;
    }

    .sidebar, .try-it-panel, .content-area {
        width: 100% !important;
        height: auto;
        position: relative;
        min-width: 100%;
    }

    .resizer {
        display: none;
    }

    .try-it-panel {
        border-left: none;
        border-top: 1px solid #ddd;
    }
}

.sidebar {
    background: white;
    overflow-y: auto;
    height: 100vh;
    flex-shrink: 0;
    min-width: 200px;
    position: relative;
}

/* Make the top elements sticky */
.sidebar-welcome,
.search-box {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Stack properly so the search stays below the header */
.sidebar-welcome {
    z-index: 20;
}

.search-box {
    top: 82px; /* roughly height of .sidebar-welcome */
    z-index: 15;
    background: white;
    border-bottom: 1px solid #ddd;
}
