:root {
    /* Colors */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #38bdf8;
    /* Sky blue */
    --secondary: #a855f7;
    /* Purple */
    --accent: #2dd4bf;
    /* Teal */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-glow: radial-gradient(circle at center, rgba(56, 189, 248, 0.15) 0%, transparent 70%);

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Mesh Gradient Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(168, 85, 247, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.08), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

header .container {
    height: 100%;
}

nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary);
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 90vh;
}

.hero-content {
    max-width: 600px;
}

.install-block {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Fira Code', monospace;
    margin-top: 2rem;
    max-width: 400px;
}

.install-cmd {
    flex: 1;
    color: var(--accent);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: var(--text-main);
}

/* Terminal Animation */
.terminal-window {
    background: #1e293b;
    border-radius: 0.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid var(--border-color);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.terminal-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #22c55e;
}

.terminal-body {
    padding: 1.5rem;
    color: #e2e8f0;
    min-height: 300px;
}

.command-line {
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.prompt {
    color: var(--secondary);
}

.cmd {
    color: var(--text-main);
}

.output {
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

/* Features Grid */
.features {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* MCP Section */
.mcp-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.05), transparent);
}

.mcp-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.code-block {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    overflow-x: auto;
}

.keyword {
    color: var(--secondary);
}

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

.property {
    color: var(--primary);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        margin: 0 auto;
    }

    .install-block {
        margin: 2rem auto;
    }

    .mcp-container {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    /* Simplified for mobile */
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Documentation Page Styles */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    padding-top: var(--header-height);
}

.docs-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.docs-nav-group {
    margin-bottom: 2rem;
}

.docs-nav-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 700;
}

.docs-nav-link {
    display: block;
    color: var(--text-main);
    text-decoration: none;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    margin-left: -1rem;
}

.docs-nav-link:hover,
.docs-nav-link.active {
    opacity: 1;
    color: var(--primary);
    border-left-color: var(--primary);
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.1), transparent);
}

.docs-content {
    grid-column: 2;
    padding: 4rem 6rem;
    max-width: 1000px;
}

/* Markdown Content Styles */
.markdown-body h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.markdown-body h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.markdown-body h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.markdown-body p {
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: #cbd5e1;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body code {
    background: rgba(30, 41, 59, 0.5);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--accent);
}

.markdown-body pre {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.markdown-body pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive Docs */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        display: none;
        /* TODO: Add mobile menu toggle */
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: auto;
        max-height: 50vh;
        border-bottom: 1px solid var(--border-color);
        z-index: 90;
    }

    .docs-content {
        grid-column: 1;
        padding: 2rem;
    }
}