@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-body: #0a0a0f;
    --bg-sidebar: #12121a;
    --bg-primary: #0a0a0f;
    --bg-secondary: #16161f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a26;
    --bg-code: #0e0e16;
    --text-primary: #e8e8ed;
    --text-secondary: rgba(232, 232, 237, 0.78);
    --text-muted: rgba(138, 138, 154, 0.85);
    --accent: #c9a227;
    --accent-light: #e8c547;
    --accent-glow: rgba(201, 162, 39, 0.22);
    --accent-soft: rgba(201, 162, 39, 0.1);
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.08);
    --red: #f87171;
    --red-soft: rgba(248, 113, 113, 0.08);
    --orange: #e8a317;
    --orange-soft: rgba(251, 191, 36, 0.08);
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --radius: 14px;
    --radius-sm: 10px;
    --font: 'Inter', -apple-system, system-ui, sans-serif;
    --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.28); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,162,39,0.5); }

a { color: var(--accent-light); text-decoration: none; transition: color 200ms; }
a:hover { color: var(--text-primary); }

/* ========================= LAYOUT ========================= */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-brand .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 6px;
}
.sidebar-brand .logo i { font-size: 16px; }
.sidebar-brand .title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}
.sidebar-brand .version {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-nav .nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 12px 6px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 180ms ease;
    margin-bottom: 2px;
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: 13px; opacity: 0.6; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.sidebar-nav a:hover i { opacity: 1; }
.sidebar-nav a.active {
    background: var(--accent-soft);
    color: var(--accent-light);
    font-weight: 600;
}
.sidebar-nav a.active i { opacity: 1; color: var(--accent-light); }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    transition: all 200ms;
}
.sidebar-footer a[href*="discord"]:hover { color: #7289da; }
.sidebar-footer a.site-link-local:hover { color: var(--accent-light); }
.sidebar-footer a i { font-size: 14px; }

/* Main */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-width: 0;
}

.page-header {
    padding: 48px 56px 32px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(201,162,39,0.04) 0%, transparent 100%);
}
.page-header .breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.page-header .breadcrumb a { color: var(--text-muted); }
.page-header .breadcrumb a:hover { color: var(--accent-light); }
.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.page-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 8px;
    max-width: 600px;
}

.page-content {
    padding: 40px 56px 80px;
    max-width: 860px;
}

/* ========================= COMPONENTS ========================= */

/* Section headings */
h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 40px 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    scroll-margin-top: 24px;
}
h2:first-child { margin-top: 0; }
h2 .ico {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    background: var(--accent-glow);
    color: var(--accent-light);
    font-size: 14px;
    flex-shrink: 0;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 28px 0 10px;
}

p { color: var(--text-secondary); font-size: 0.94rem; margin-bottom: 12px; }
ul, ol { padding-left: 20px; margin-bottom: 14px; }
li { color: var(--text-secondary); font-size: 0.93rem; margin-bottom: 5px; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    transition: border-color 200ms;
}
.card:hover { border-color: var(--border-light); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }

.feat {
    display: flex; gap: 14px; padding: 18px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); transition: all 180ms;
}
.feat:hover { border-color: rgba(201,162,39,0.2); background: var(--bg-card-hover); }
.feat-ico {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px; background: var(--accent-glow);
    color: var(--accent-light); font-size: 14px; flex-shrink: 0;
}
.feat h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 3px; color: var(--text-primary); }
.feat p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 0.87rem; }
thead th {
    text-align: left; padding: 11px 16px;
    background: var(--bg-secondary); color: var(--text-secondary);
    font-weight: 600; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
thead th:first-child { border-radius: 10px 0 0 0; }
thead th:last-child { border-radius: 0 10px 0 0; }
td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
tr:hover td { background: rgba(201,162,39,0.02); }

/* Code */
pre {
    background: var(--bg-code); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 18px 22px;
    overflow-x: auto; margin-bottom: 16px;
    font-size: 0.84rem; line-height: 1.7;
}
code { font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.84em; }
:not(pre) > code {
    background: rgba(201,162,39,0.1); color: var(--accent-light);
    padding: 2px 7px; border-radius: 5px; font-size: 0.82em;
}
.code-lang {
    display: inline-block; padding: 3px 10px;
    background: var(--accent-glow); color: var(--accent-light);
    font-size: 10px; font-weight: 700; border-radius: 6px 6px 0 0;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: -1px; position: relative; z-index: 1;
}

/* Steps */
.step { display: flex; gap: 18px; margin-bottom: 28px; }
.step-n {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--accent-glow);
    color: var(--accent-light); font-size: 13px; font-weight: 700;
    flex-shrink: 0; margin-top: 2px;
}
.step-body { flex: 1; }
.step-body h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }

/* Alerts */
.alert {
    padding: 14px 18px; border-radius: var(--radius-sm);
    margin-bottom: 16px; font-size: 0.86rem;
    display: flex; align-items: flex-start; gap: 11px;
}
.alert i { margin-top: 2px; font-size: 15px; flex-shrink: 0; }
.alert-info { background: var(--accent-soft); border: 1px solid rgba(201,162,39,0.15); color: var(--accent-light); }
.alert-warn { background: var(--orange-soft); border: 1px solid rgba(251,191,36,0.15); color: var(--orange); }
.alert-ok { background: var(--green-soft); border: 1px solid rgba(52,211,153,0.15); color: var(--green); }

/* File tree */
.tree {
    background: var(--bg-code); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 20px 24px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.8rem; color: var(--text-secondary); line-height: 1.9;
    margin-bottom: 16px;
}
.tree .f { color: var(--accent-light); font-weight: 600; }
.tree .d { color: var(--text-muted); }
.tree .s { color: var(--green); }

/* Color swatches */
.swatch {
    display: inline-block; padding: 2px 10px;
    border-radius: 4px; font-family: 'JetBrains Mono', monospace;
    font-size: 0.78em; font-weight: 600;
}

/* Landing page hero */
.hero {
    text-align: center;
    padding: 70px 40px 50px;
    background: linear-gradient(180deg, rgba(201,162,39,0.06) 0%, transparent 70%);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.hero::before {
    content: ''; position: absolute;
    top: -180px; left: 50%; transform: translateX(-50%);
    width: 500px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle, rgba(201,162,39,0.1), transparent 70%);
    pointer-events: none;
}
.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 18px; background: var(--accent-soft);
    border: 1px solid rgba(201,162,39,0.2); border-radius: 24px;
    font-size: 11px; font-weight: 700; letter-spacing: 1.8px;
    text-transform: uppercase; color: var(--accent-light); margin-bottom: 24px;
}
.hero-tag i { font-size: 14px; }
.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900;
    letter-spacing: -1px; line-height: 1.15;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 14px;
}
.hero p { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto 28px; }
.badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.badge {
    padding: 5px 13px; border-radius: 18px;
    font-size: 11px; font-weight: 600;
    border: 1px solid var(--border-light);
    background: var(--bg-card); color: var(--text-secondary);
}
.badge.a { border-color: rgba(201,162,39,0.3); color: var(--accent-light); background: var(--accent-soft); }
.badge.g { border-color: rgba(52,211,153,0.3); color: var(--green); background: var(--green-soft); }

/* Landing quick links */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 40px 48px; }
.quick-card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 24px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); transition: all 200ms; text-decoration: none;
}
.quick-card:hover { border-color: rgba(201,162,39,0.25); background: var(--bg-card-hover); transform: translateY(-2px); }
.quick-card .qc-ico {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--accent-glow);
    color: var(--accent-light); font-size: 16px;
}
.quick-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.quick-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Footer */
.doc-footer {
    padding: 32px 48px; border-top: 1px solid var(--border);
    text-align: center;
    background: linear-gradient(0deg, rgba(201,162,39,0.03), transparent);
}
.doc-footer .fb { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.doc-footer .fd {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 20px; background: rgba(88,101,242,0.1);
    border: 1px solid rgba(88,101,242,0.2); border-radius: 9px;
    color: #7289da; font-size: 0.85rem; font-weight: 600;
    transition: all 200ms; margin: 12px 0;
}
.doc-footer .fd:hover { background: rgba(88,101,242,0.18); color: #99aef0; transform: translateY(-1px); }
.doc-footer .fd i { font-size: 16px; }
.doc-footer .fc { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }

/* Next/Prev navigation */
.page-nav {
    display: flex; gap: 14px; margin-top: 48px; padding-top: 28px;
    border-top: 1px solid var(--border);
}
.page-nav a {
    flex: 1; padding: 18px 22px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); transition: all 200ms;
    text-decoration: none;
}
.page-nav a:hover { border-color: rgba(201,162,39,0.25); background: var(--bg-card-hover); }
.page-nav a .pn-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.page-nav a .pn-title { font-size: 0.95rem; font-weight: 600; color: var(--accent-light); margin-top: 4px; }
.page-nav a.next { text-align: right; }

/* Responsive */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .page-header, .page-content { padding-left: 24px; padding-right: 24px; }
    .quick-grid { padding: 24px 20px; }
    .hero { padding: 40px 20px 30px; }
}
