:root {
    --bg-dark: #05060a;
    --sidebar-bg: rgba(10, 12, 18, 0.85);
    --card-bg: rgba(18, 21, 28, 0.6);
    --card-border: rgba(137, 150, 180, 0.18);
    --primary: #9d52ff;
    --primary-glow: rgba(157, 82, 255, 0.45);
    --accent: #0ea5e9;
    --accent-soft: rgba(14, 165, 233, 0.18);
    --primary-color: #9d52ff;
    --warning-color: #fea500;
    --text-main: #eff2fb;
    --text-secondary: #bfcadf;
    --text-muted: #8b96a8;
    --text-dim: #a1a8ba;
    --code-bg: rgba(12, 15, 22, 0.55);
    --code-border: rgba(103, 111, 133, 0.35);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --font-family: 'Outfit', sans-serif;
    --glass-blur: blur(20px);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

.background-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    animation: float 30s infinite ease-in-out;
}

.orb-1 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--primary), transparent);
    top: -10%;
    right: -10%;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 20px); }
}

.docs-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--card-border);
    position: fixed;
    height: 100vh;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.sidebar-logo {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 0 8px rgba(157, 82, 255, 0.45));
    object-fit: contain;
    vertical-align: middle;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.nav-item.active {
    background: rgba(157, 82, 255, 0.1);
    color: var(--primary);
    box-shadow: 0 0 15px -3px var(--primary-glow);
}

.nav-group {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-left: 15px;
    margin-bottom: 5px;
    font-weight: 700;
    opacity: 0.7;
}

.return-home {
    margin-top: auto;
    border: 1px solid var(--card-border);
    justify-content: center;
}

.content {
    margin: 0 auto;
    padding: 60px 80px;
    width: min(1150px, calc(100% - 360px));
    max-width: 1150px;
}

.doc-section {
    position: relative;
    margin-bottom: 70px;
    scroll-margin-top: 42px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 14px 0;
}

.doc-section + .doc-section {
    margin-top: 24px;
}

.doc-section:last-child {
    border-bottom: none;
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -2px;
    line-height: 1;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.accent {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 30px;
    max-width: 800px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-transform: uppercase;
    font-weight: 800;
}

h2 i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
    margin: 30px 0 15px 0;
    color: var(--text-main);
    font-weight: 700;
}

.doc-note {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 45, 0.7), rgba(33, 41, 64, 0.5));
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--accent);
    color: var(--text-secondary);
    padding: 12px 14px;
    margin: 18px 0 18px 0;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}

p {
    margin-bottom: 20px;
    color: var(--text-dim);
}

code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary-color);
    font-family: monospace;
    font-size: 0.9rem;
}

.code-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.code-tab {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-dim);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.8rem;
    border-radius: 2px;
}

.code-tab.active,
.code-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(139, 92, 246, 0.05);
}

.code-block-container {
    background: var(--code-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

.code-content {
    display: none;
    padding: 24px;
}

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

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
}

.copy-btn:hover {
    background: rgba(157, 82, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.pre-code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.docs-footer {
    margin-top: 50px;
    border-top: 1px solid rgba(157, 82, 255, 0.55);
    padding: 14px 0 20px 0;
    color: var(--text-dim);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
}

.docs-footer p {
    margin: 0;
    text-align: center;
    width: 100%;
}

@media (max-width: 900px) {
    .docs-footer {
        flex-direction: column;
        align-items: center;
    }
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #fff;
}

@media (max-width: 1024px) {
    .docs-container { flex-direction: column; }
    .sidebar { position: fixed; height: 100vh; width: 260px; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .content { margin-left: 0; padding: 42px 18px; }
    .menu-toggle { display: inline-flex; position: fixed; top: 12px; left: 12px; z-index: 120; }
}

@media (max-width: 640px) {
    body { background-size: 40px 40px; }
    .content { padding: 24px 16px; }
    .doc-section { padding: 20px; }
    .main-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
    .sidebar { width: 100%; max-width: 320px; }
}


.json-block {
    background: var(--code-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 20px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #a5b3ce;
    white-space: pre-wrap;
    overflow-x: auto;
}

.json-key {
    color: #f97316;
}

.json-string {
    color: #10b981;
}

.json-number {
    color: #3b82f6;
}

.json-boolean {
    color: #d946ef;
}

.endpoint-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    font-family: monospace;
}

.method {
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

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

.method.post {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.url {
    color: var(--text-main);
    word-break: break-all;
    font-weight: 500;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: var(--card-bg);
    border-radius: 4px;
    overflow: hidden;
}

.doc-table th,
.doc-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}

.doc-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 60px 20px;
    }

    .main-title {
        font-size: 2.22rem;
        letter-spacing: -1px;
    }

    .lead-text {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.6rem;
    }
}