:root {
    --bg-main: #0b0f19;
    --bg-sidebar: #0e1526;
    --bg-card: rgba(18, 26, 43, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-purple: #a855f7;
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    --code-bg: #1e293b;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Background animated mesh */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -1;
    pointer-events: none;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2.5rem;
    text-decoration: none;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.35rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(99, 102, 241, 0.15);
    color: #ffffff;
    border-left: 3px solid var(--accent-indigo);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 3rem 4rem;
    max-width: 1000px;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 span {
    background: linear-gradient(135deg, #818cf8 0%, #38bdf8 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.75rem 0 0.75rem;
    color: #e2e8f0;
}

p {
    margin-bottom: 1.25rem;
    color: #cbd5e1;
    font-size: 1rem;
}

/* Cards & Components */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.4);
}

.card-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Code blocks */
pre {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: #38bdf8;
    overflow-x: auto;
    margin: 1.25rem 0;
    line-height: 1.5;
}

code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    color: #38bdf8;
}

pre code {
    background: transparent;
    padding: 0;
}

.tool-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .sidebar { width: 220px; }
    .main-content { margin-left: 220px; padding: 2rem; }
}

@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-content { margin-left: 0; padding: 1.5rem; }
}
