/* ============================================================
   TenTags API Documentation Styling (api.css)
   ============================================================ */

.api-hero {
    padding: 150px 0 60px;
    text-align: center;
    position: relative;
}

.api-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(79, 140, 255, 0.1);
    border: 1px solid rgba(79, 140, 255, 0.3);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.api-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 30%, #4f8cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.api-hero p {
    color: var(--text2);
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.api-hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* API Page Main Grid */
.api-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    padding-bottom: 100px;
    align-items: start;
}

/* Sidebar Navigation */
.api-toc-sidebar {
    position: sticky;
    top: 100px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.toc-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text2);
    font-weight: 700;
    margin-bottom: 16px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text2);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.toc-link:hover, .toc-link.active {
    color: white;
    background: rgba(79, 140, 255, 0.12);
}

.method-tag {
    font-family: monospace;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.method-post {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.method-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.method-get {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

/* Section Cards */
.api-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 35px;
    scroll-margin-top: 100px;
}

.api-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.api-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.endpoint-url-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #090d16;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 18px;
    margin: 20px 0;
}

.endpoint-url-text {
    font-family: 'Fira Code', monospace;
    font-size: 1.05rem;
    color: white;
    font-weight: 600;
}

/* Tables */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.92rem;
}

.params-table th, .params-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.params-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text2);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

.params-table td {
    color: white;
}

.param-name {
    font-family: monospace;
    color: #60a5fa;
    font-weight: 700;
}

.param-type {
    font-family: monospace;
    color: #a7f3d0;
    font-size: 0.82rem;
}

.param-required {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
}

.param-optional {
    color: var(--text2);
    font-size: 0.75rem;
}

/* Code Tabs & Snippets */
.code-tab-bar {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;

}

.code-tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text2);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-tab-btn.active {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid var(--primary);
}

.code-pane {
    display: none;
}

.code-pane.active {
    display: block;
}

.code-block-container {
    position: relative;
    background: #090d16;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
}

.code-block-container pre {
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    background: transparent !important;
}

.btn-copy-snippet {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-snippet:hover {
    background: var(--primary);
}

/* Response status badges */
.status-code-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.85rem;
}

.status-200 { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-401 { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.status-403 { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status-429 { background: rgba(168, 85, 247, 0.2); color: #c084fc; }

/* Responsive */
@media (max-width: 900px) {
    .api-grid {
        grid-template-columns: 1fr;
    }
    .api-toc-sidebar {
        position: static;
    }
}
