/* API Reference page — extends style.css, keeps the homepage untouched */

.nav-links a.active {
    color: var(--accent-secondary);
}

.docs-hero {
    padding-top: calc(var(--nav-height) + 3rem);
    padding-bottom: 2rem;
    text-align: center;
}

.docs-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.docs-hero p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 650px;
    margin: 0 auto;
}

.docs-layout {
    display: flex;
    gap: 3rem;
    padding: 2rem 0 6rem;
    align-items: flex-start;
}

.docs-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.docs-sidebar a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
    color: var(--accent-secondary);
}

.docs-content {
    flex: 1;
    min-width: 0;
}

.docs-content section {
    margin-bottom: 1rem;
}

.docs-content h2 {
    font-size: 1.9rem;
    padding-top: 2.5rem;
    margin-bottom: 1rem;
    border-top: 1px solid var(--border-color);
}

.docs-content section:first-child h2 {
    border-top: none;
    padding-top: 0;
}

.docs-content h3 {
    font-size: 1.15rem;
    margin: 1.75rem 0 0.75rem;
    color: var(--accent-secondary);
    font-family: 'Outfit', sans-serif;
}

.docs-content p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1rem;
}

.docs-content code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88em;
    color: var(--accent-secondary);
}

.endpoint {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1rem;
}

.endpoint code {
    font-size: 1rem;
    color: var(--text-color);
}

.method {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    letter-spacing: 0.04em;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.method.get { background: rgba(0, 229, 255, 0.15); color: #00e5ff; }
.method.post { background: rgba(124, 77, 255, 0.2); color: #b388ff; }
.method.put { background: rgba(255, 189, 46, 0.18); color: #ffbd2e; }
.method.delete { background: rgba(255, 95, 86, 0.18); color: #ff8a80; }

.code-block {
    margin: 1rem 0 1.5rem;
    overflow: hidden;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.code-lang {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
}

.code-block pre {
    padding: 1.25rem;
    overflow-x: auto;
}

.code-block code {
    background: none;
    padding: 0;
    color: #00ff00;
    font-size: 0.85rem;
    white-space: pre;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 2rem;
    font-size: 0.9rem;
}

.docs-table th,
.docs-table td {
    text-align: left;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.docs-table th {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.docs-table td {
    color: rgba(255, 255, 255, 0.8);
}

.callout {
    border-left: 4px solid var(--accent-secondary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(0, 229, 255, 0.05);
    border-radius: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.85);
}

.callout.warn {
    border-left-color: #ffbd2e;
    background: rgba(255, 189, 46, 0.06);
}

@media (max-width: 900px) {
    .docs-layout {
        flex-direction: column;
    }

    .docs-sidebar {
        position: static;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }
}
