:root {
    --bg-base: #060608;
    --bg-surface: #101014;
    --bg-glass: rgba(18, 18, 22, 0.7);
    --border-dim: rgba(255, 255, 255, 0.06);
    --text-main: #e2e2e6;
    --text-muted: #9a9aa2;
    --accent: #7c4dff;
    --accent-glow: rgba(124, 77, 255, 0.4);
    --gradient-brand: linear-gradient(135deg, #7c4dff 0%, #aa00ff 100%);
    --gradient-surface: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #9e79ff;
    text-decoration: underline;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 300px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-dim);
    position: fixed;
    height: 100vh;
    padding: 3rem 0;
    z-index: 100;
}

.brand {
    padding: 0 2.5rem 2.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-stack {
    position: relative;
    width: 32px;
    height: 32px;
}

.logo-box {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    transform: rotate(45deg);
    z-index: 2;
}

.logo-box.blur {
    border-color: var(--accent-glow);
    filter: blur(8px);
    z-index: 1;
}

.brand h1 {
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

nav {
    display: flex;
    flex-direction: column;
}

.nav-link {
    padding: 0.8rem 2.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.02);
}

.nav-link.active {
    color: #fff;
    border-left-color: var(--accent);
    background-color: rgba(124, 77, 255, 0.08);
    font-weight: 600;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: 300px;
    padding: 6rem 8% 0 8%;
    max-width: 1100px;
}

.section {
    margin-bottom: 8rem;
    scroll-margin-top: 6rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header p {
    font-size: 1.2rem;
    max-width: 700px;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background-color: rgba(124, 77, 255, 0.1);
    border: 1px solid var(--accent-glow);
    border-radius: 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 2rem;
    font-weight: 700;
}

.badge.inverse {
    background-color: #fff;
    color: var(--bg-base);
    border: none;
}

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 4rem;
    letter-spacing: -0.04em;
    font-weight: 800;
    margin-bottom: 2rem;
}

.text-accent {
    color: var(--accent);
}

.lead {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 2rem;
    font-weight: 500;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border-dim);
    margin-bottom: 8rem;
}

/* Grids & Cards */
.comparison-grid, .architecture-grid, .use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.comp-card, .module-card, .use-case {
    padding: 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.comp-card.highlight {
    background: var(--gradient-brand);
    border: none;
}

.comp-card.highlight h4, .comp-card.highlight li, .comp-card.highlight .check {
    color: #fff;
}

.comp-card h4 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.comp-card ul {
    list-style: none;
}

.comp-card li {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.check {
    color: var(--accent);
    margin-right: 8px;
    font-weight: bold;
}

.module-label {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    border-radius: 16px;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* API List */
.api-list {
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: 20px;
    padding: 3rem;
}

.api-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-dim);
}

.api-item:last-child {
    border-bottom: none;
}

.api-item h4 {
    font-size: 1.2rem;
}

/* Steps */
.steps-v2 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border-dim);
}

.step-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    background: var(--accent);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: bold;
}

/* Code & Buttons */
.code-box-wrapper {
    margin-top: 3rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-dim);
}

.code-box-header {
    background: #111;
    padding: 0.8rem 1.2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-dim);
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #9cb3e1;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 1rem;
    cursor: pointer;
    text-decoration: none !important;
}

.btn-primary {
    background: var(--gradient-brand);
    color: #fff !important;
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-dim);
    color: #fff !important;
}

.highlight-bg {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.05) 0%, rgba(0,0,0,0) 100%);
    padding: 4rem;
    border-radius: 30px;
    margin-left: -2rem;
    margin-right: -2rem;
}

/* Footer */
.footer {
    padding: 6rem 0 3rem 0;
    border-top: 1px solid var(--border-dim);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.footer-links a {
    margin-left: 2rem;
    color: var(--text-muted);
}

.footer-bottom {
    font-size: 0.8rem;
    color: #444;
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar { width: 100%; height: auto; position: relative; padding: 1.5rem 0; }
    .content { margin-left: 0; padding: 2rem 5%; }
    .gradient-text { font-size: 2.8rem; }
}
