:root {
    --bg-dark: #0a0c10;
    --bg-card: rgba(22, 27, 34, 0.7);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --border: #30363d;
    --glass-border: rgba(255, 255, 255, 0.1);
    --code-bg: #161b22;
    --sidebar-width: 280px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ─── Background Glows ─── */
.glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.glow-top-right {
    top: -20%;
    right: -10%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

.glow-bottom-left {
    bottom: -20%;
    left: -10%;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

/* ─── Layout ─── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ─── */
aside {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

aside::-webkit-scrollbar {
    width: 4px;
}

aside::-webkit-scrollbar-track {
    background: transparent;
}

aside::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

aside::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 48px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.nav-section {
    margin-bottom: 32px;
}

.nav-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    padding-left: 12px;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

/* ─── Main Content ─── */
main {
    flex: 1;
    padding: 80px 10%;
    max-width: 1200px;
}

section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    margin-top: 3rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--accent);
}

p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* ─── API Endpoint Styling ─── */
.endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-family: monospace;
    font-size: 1rem;
}

.method {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
}

.method-post { background: #0e4429; color: #3fb950; }
.method-get { background: #1f6feb; color: white; }
.method-put { background: #9a6700; color: #f2cc60; }
.method-delete { background: #82071e; color: #ff7b72; }

.url {
    color: var(--text-primary);
    font-weight: 600;
}

/* ─── Code Blocks ─── */
pre {
    background: var(--code-bg);
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--border);
    margin: 20px 0;
    font-size: 0.9rem;
    position: relative;
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
}

/* ─── Parameter Tables ─── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}

th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.param-name {
    font-family: monospace;
    color: var(--accent);
    font-weight: 600;
}

.param-type {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-required { background: rgba(255, 123, 114, 0.1); color: #ff7b72; }
.badge-optional { background: rgba(139, 148, 158, 0.1); color: var(--text-secondary); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    aside {
        display: none;
    }
    main {
        padding: 60px 5%;
    }
}
