@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-primary: #0d0b14;
    --bg-secondary: #16141c;
    --bg-card: #1e1b27;
    --bg-code: #13111a;
    --border: #2d2a38;
    --border-hover: #3d3a4c;
    --text: #f0f0f5;
    --text-dim: #b4afcd;
    --text-muted: #7d7894;
    --accent-1: #75a4ce;
    --accent-2: #7bc9c9;
    --accent-3: #e08aaf;
    --gradient: linear-gradient(135deg, #75a4ce, #7bc9c9, #e08aaf);
    --gradient-subtle: linear-gradient(135deg, rgba(117,164,206,0.15), rgba(123,201,201,0.15), rgba(224,138,175,0.15));
    --success: #64c878;
    --warn: #e6b43c;
    --info: #50a0f0;
    --danger: #c83c3c;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ============ HEADER / NAV ============ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(13,11,20,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45,42,56,0.5);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13,11,20,0.95);
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    color: #0d0b14;
    letter-spacing: -1px;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.nav-version {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-2);
    background: rgba(123,201,201,0.12);
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.nav-links a.active {
    color: var(--accent-2);
    background: rgba(123,201,201,0.1);
}

.nav-cta {
    background: var(--gradient) !important;
    color: #0d0b14 !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
}

.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============ HERO ============ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 2rem 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(123,201,201,0.08) 0%, rgba(117,164,206,0.04) 40%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(123,201,201,0.1);
    border: 1px solid rgba(123,201,201,0.2);
    color: var(--accent-2);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.hero-badge::before {
    content: '✦';
    font-size: 0.7rem;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero h1 .gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 560px;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: #0d0b14;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(123,201,201,0.25); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent-2); color: var(--accent-2); transform: translateY(-2px); }

/* Code preview */
.hero-code {
    margin-top: 50px;
    width: min(680px, 90vw);
    text-align: left;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-code .code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}

.code-dots {
    display: flex; gap: 6px;
}

.code-dots span {
    width: 10px; height: 10px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-filename {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hero-code pre {
    padding: 20px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text-dim);
}

/* ============ FEATURES ============ */
.section {
    padding: 100px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.section h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.section .section-desc {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.feature-icon.glass { background: rgba(123,201,201,0.12); color: var(--accent-2); }
.feature-icon.theme { background: rgba(224,138,175,0.12); color: var(--accent-3); }
.feature-icon.perf { background: rgba(117,164,206,0.12); color: var(--accent-1); }
.feature-icon.secure { background: rgba(100,200,120,0.12); color: var(--success); }
.feature-icon.config { background: rgba(230,180,60,0.12); color: var(--warn); }
.feature-icon.icon { background: rgba(80,160,240,0.12); color: var(--info); }

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.55;
}

/* ============ DOCS / API ============ */
.docs-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
}

.docs-sidebar {
    position: sticky;
    top: 84px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.docs-sidebar h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    margin-top: 20px;
}

.docs-sidebar h4:first-child { margin-top: 0; }

.docs-sidebar a {
    display: block;
    padding: 6px 12px;
    font-size: 0.83rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--radius-xs);
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.docs-sidebar a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.03);
    border-left-color: var(--border-hover);
}

.docs-sidebar a.active {
    color: var(--accent-2);
    background: rgba(123,201,201,0.08);
    border-left-color: var(--accent-2);
}

.docs-content { min-width: 0; }

.api-block {
    margin-bottom: 40px;
    scroll-margin-top: 80px;
}

.api-block h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.api-block > p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-bottom: 16px;
}

.code-block pre {
    padding: 18px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.param-table th {
    text-align: left;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.param-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(45,42,56,0.4);
    color: var(--text-dim);
}

.param-table td:first-child {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-2);
}

.param-table td code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    background: rgba(123,201,201,0.08);
    color: var(--accent-2);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ============ THEMES ============ */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.theme-swatch {
    height: 80px;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.theme-swatch:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.theme-swatch .swatch-bar {
    height: 100%;
    border-radius: var(--radius-sm);
}

.theme-swatch .swatch-name {
    position: absolute;
    bottom: 8px; left: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ============ FOOTER ============ */
.footer {
    padding: 50px 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer .gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Syntax Highlighting */
.kw { color: #c792ea; }  /* keywords */
.fn { color: #82aaff; }  /* functions */
.st { color: #c3e88d; }  /* strings */
.cm { color: #546e7a; }  /* comments */
.nb { color: #f78c6c; }  /* numbers */
.op { color: #89ddff; }  /* operators */
.pr { color: #ffcb6b; }  /* properties */
.vr { color: #eeffff; }  /* variables */

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .docs-container {
        grid-template-columns: 1fr;
    }
    .docs-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .docs-sidebar h4 {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.2rem; }
    .section h2 { font-size: 1.8rem; }
    .features-grid { grid-template-columns: 1fr; }
}
