.api-sidebar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    top: 100px;
}

.api-nav .nav-title {
    color: var(--accent-gold);
    font-weight: bold;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.api-nav .nav-title:first-child {
    margin-top: 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.nav-list .nav-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0 0.5rem 1rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-list .nav-link:hover,
.nav-list .nav-link.active {
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.1);
}

.api-section {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.api-section:last-child {
    border-bottom: none;
}

.api-section h2 {
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.api-section h4 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.api-info-cards .info-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    height: 100%;
}

.info-card i {
    color: var(--accent-gold);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.info-card h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.info-card code {
    background: var(--bg-primary);
    color: var(--accent-gold);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.1);
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    border: none;
    overflow-x: auto;
}

.code-block code {
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.endpoint-info {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.http-method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.http-method.get {
    background: #28a745;
    color: white;
}

.http-method.post {
    background: #007bff;
    color: white;
}

.http-method.put {
    background: #ffc107;
    color: black;
}

.http-method.delete {
    background: #dc3545;
    color: white;
}

.endpoint-info code {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.rate-limits-table {
    margin: 1.5rem 0;
}

.rate-limits-table .table {
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.rate-limits-table .table th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.rate-limits-table .table td {
    color: var(--text-secondary);
    border-color: var(--border-color);
    background: #2d2d2d;
}

.error-codes {
    margin: 1.5rem 0;
}

.error-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.error-code {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    margin-right: 1rem;
    min-width: 60px;
    text-align: center;
}

.error-code.success {
    background: #28a745;
    color: white;
}

.error-code.client-error {
    background: #ffd700;
    color: black;
}

.error-code.server-error {
    background: #dc3545;
    color: white;
}

.error-info strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.error-info p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.api-tester {
    margin: 2rem 0;
}

.api-tester .card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.api-tester .card-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.test-output {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.4;
}

.test-output code {
    background: transparent;
    color: var(--text-primary);
    white-space: pre-wrap;
}

@media (max-width: 992px) {
    .api-sidebar {
        position: static !important;
        margin-bottom: 2rem;
    }

    .api-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .api-nav .nav-title {
        width: 100%;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    .api-nav .nav-title:first-child {
        margin-top: 0;
    }

    .nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 0;
    }

    .nav-list .nav-link {
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        padding: 0.5rem 1rem;
        border-left: none;
        font-size: 0.8rem;
    }
}

/* Prism.js theme customization */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: var(--text-muted);
}

.token.punctuation {
    color: var(--text-secondary);
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: var(--accent-gold);
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #28a745;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #007bff;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #6f42c1;
}

.token.function,
.token.class-name {
    color: #e83e8c;
}
