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

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

:root {
    --bg: #050505;
    --bg-card: #0d0d0d;
    --bg-hover: #1a1a1a;
    --border: #1a1a1a;
    --text: #f5f5f5;
    --text-muted: #888;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Scrollbars */
html {
    scrollbar-width: thin;
    scrollbar-color: #333 #0d0d0d;
}

html::-webkit-scrollbar {
    width: 10px;
}

html::-webkit-scrollbar-track {
    background: #0d0d0d;
}

html::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid #0d0d0d;
}

html::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.docs-sidebar,
pre,
.content {
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.docs-sidebar::-webkit-scrollbar,
pre::-webkit-scrollbar,
.content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.docs-sidebar::-webkit-scrollbar-track,
pre::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb,
pre::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover,
pre::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95em;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-logo:hover {
    text-decoration: none;
    color: var(--primary);
}

/* Navigation */
.site-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav li a {
    display: block;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.85em;
    font-weight: 500;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.site-nav li a:hover {
    color: var(--text);
    background: var(--bg-hover);
    text-decoration: none;
}

.nav-download {
    margin-left: 8px;
    border: 1px solid var(--primary);
    color: var(--primary) !important;
    font-weight: 600;
}

.nav-download:hover {
    background: var(--primary);
    color: #fff !important;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    padding: 60px 24px 50px;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 4px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75em;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.hero h1 {
    font-size: 3.8em;
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    border: none;
    padding: 0;
    color: var(--text);
}

.hero h1 .highlight {
    background: var(--primary);
    color: #fff;
    padding: 1px 10px;
    display: inline-block;
}

.hero-description {
    font-size: 1em;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 28px;
    line-height: 1.7;
}

.hero-description code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
    background: none;
    padding: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    font-weight: 500;
    transition: transform 0.1s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    font-weight: 500;
    transition: border-color 0.15s, color 0.15s;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7em;
}

.hero-stat-value {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1px;
}

.hero-stat-label {
    color: var(--text-muted);
}

/* Code block */
.code-block {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1117;
}

.code-block-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #161b22;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72em;
    color: var(--text-muted);
    gap: 12px;
}

.code-block-dots {
    display: flex;
    gap: 6px;
}

.code-block-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-block-dots .dot.red { background: #ff5f57; }
.code-block-dots .dot.yellow { background: #febc2e; }
.code-block-dots .dot.green { background: #28c840; }

.code-block-title {
    flex: 1;
}

.code-copy-btn {
    background: none;
    border: 1px solid #333;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1em;
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.code-copy-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.code-block pre {
    padding: 18px 20px;
    margin: 0;
    background: none;
    border-radius: 0;
    border: none;
    font-size: 0.8em;
    line-height: 1.9;
}

/* Sections */
.section {
    border-bottom: 1px solid var(--border);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.section-title {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    border: none;
    padding: 0;
    color: var(--text);
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    overflow: hidden;
    margin: 0;
}

.feature-card {
    background: var(--bg-card);
    padding: 24px;
    transition: background 0.15s;
    border: none;
    border-radius: 0;
}

.feature-card:hover {
    background: var(--bg-hover);
}

.feature-card-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 0.8em;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 0;
    color: var(--text);
}

.feature-card p {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Code examples grid */
.examples-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Install section */
.install-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 40px;
}

.install-section h2 {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    border: none;
    padding: 0;
    color: var(--text);
}

.install-section p {
    color: var(--text-muted);
    max-width: 480px;
}

/* Platform table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9em;
}

th {
    font-weight: 600;
    color: var(--text);
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-muted);
}

td a {
    color: var(--primary);
}

tr:hover {
    background: var(--bg-card);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 12px;
    color: var(--text);
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.85em;
    max-width: 280px;
    line-height: 1.7;
}

.footer-heading {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

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

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(250, 250, 250, 0.8);
    font-size: 0.85em;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--border);
}

.footer-bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7em;
    color: var(--text-muted);
}

/* Content pages */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 24px;
}

.content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.content h1 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.content h2 {
    font-size: 1.3em;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text);
}

.content h3 {
    font-size: 1em;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--text);
}

.content p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.content ul, .content ol {
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-left: 24px;
}

.content li {
    margin-bottom: 6px;
}

pre {
    background: #0d1117;
    color: #e2e8f0;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82em;
    line-height: 1.8;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    color: var(--text);
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 3px;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Beta notice */
.beta-notice {
    border: 1px solid #854d0e;
    background: rgba(133, 77, 14, 0.1);
    border-radius: 8px;
    padding: 24px 28px;
}

.beta-notice h3 {
    color: #fbbf24;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1em;
}

.beta-notice p {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 10px;
}

.beta-notice p:last-child {
    margin-bottom: 0;
}

.beta-notice a {
    color: #fbbf24;
}

/* Pre copy button (docs pages) */
.pre-wrapper {
    position: relative;
}

.pre-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: 1px solid #333;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7em;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.pre-copy-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* Docs layout */
.docs-layout {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.docs-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-heading {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    padding: 0 0 8px 0;
    transition: color 0.15s;
}

.sidebar-heading:hover {
    color: var(--primary);
    text-decoration: none;
}

.docs-sidebar ul {
    list-style: none;
    padding: 0;
}

.docs-sidebar li a {
    display: block;
    padding: 5px 12px;
    font-size: 0.85em;
    color: rgba(245, 245, 245, 0.7);
    border-left: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.docs-sidebar li a:hover,
.docs-sidebar li a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    text-decoration: none;
}

.docs-main {
    flex: 1;
    min-width: 0;
}

.docs-main .content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* Prev/Next navigation */
.docs-nav-cards {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.docs-nav-card {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    transition: border-color 0.15s;
    min-width: 0;
    flex: 1;
}

.docs-nav-card:hover {
    border-color: var(--primary);
    text-decoration: none;
}

.docs-nav-card-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.docs-nav-card-title {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text);
}

.docs-nav-card.prev {
    align-items: flex-start;
}

.docs-nav-card.next {
    align-items: flex-end;
    text-align: right;
}

/* Helpful card */
.docs-helpful {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.docs-helpful-text {
    font-size: 0.85em;
    color: var(--text-muted);
}

.docs-helpful-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: none;
    color: var(--text-muted);
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.docs-helpful-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.docs-helpful-btn.voted {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* User contributions area (future) */
.docs-comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.docs-comments h3 {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Toggle buttons */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    width: 100%;
    text-align: left;
    margin-bottom: 16px;
}

.sidebar-toggle:hover {
    color: var(--text);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .docs-layout {
        flex-direction: column;
    }

    .sidebar-toggle {
        display: block;
    }

    .docs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        display: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .docs-sidebar.open {
        display: block;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .install-section {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2em;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .header-inner {
        height: auto;
        padding: 12px 24px;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid var(--border);
        margin-top: 12px;
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .site-nav li a {
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-download {
        margin-left: 0;
        margin-top: 8px;
        text-align: center;
        display: block;
    }
}
