:root {
    /* Dark Theme (Default) */
    --primary: #00f2fe;
    --primary-alt: #4facfe;
    --bg-dark: #0a0b10;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: rgba(255, 255, 255, 0.1);
    --accent-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-alt) 100%);
    --nav-bg: rgba(10, 11, 16, 0.8);
    --code-bg: #000;
}

[data-theme="light"] {
    --bg-dark: #f8f9fa;
    --bg-card: rgba(0, 0, 0, 0.03);
    --text-main: #1a1a1a;
    --text-muted: #5f6368;
    --border: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(248, 249, 250, 0.9);
    --code-bg: #f1f3f4;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-logo img {
    height: 32px;
}

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

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
}

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

.btn-github {
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
}

/* Hero */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('assets/hero-bg.png') no-repeat center center/cover;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 80%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #000;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(5px);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 16px;
    transition: 0.3s;
}

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

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Docs Layout */
.docs-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    padding: 4rem 2rem;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-links li {
    margin-bottom: 1rem;
}

.sidebar-links a {
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    padding: 0.5rem 0;
}

.sidebar-links a:hover, .sidebar-links a.active {
    color: var(--primary);
}

.doc-section {
    margin-bottom: 6rem;
}

.doc-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.doc-section h3 {
    margin-top: 2.5rem;
    color: var(--primary);
}

.code-block {
    position: relative;
    background: var(--code-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
}

.code-block pre {
    overflow-x: auto;
    font-size: 0.9rem;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.copy-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.doc-table th, .doc-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.doc-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.sandbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.sandbox-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.sandbox-card h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #050508;
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand img {
    height: 40px;
}

.footer p {
    color: var(--text-muted);
}

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

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

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}

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

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* Mobile */
.mobile-toggle {
    display: none;
}

@media (max-width: 768px) {
    .docs-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .nav-links {
        display: none;
    }
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
    }
    .mobile-toggle span {
        width: 25px;
        height: 2px;
        background: var(--text-main);
    }
}
