/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #1e293b;
    --accent: #22d3ee;
    --background: #1e293b;
    --background-light: #334155;
    --surface: #475569;
    --surface-light: #64748b;
    --text: #f8fafc;
    --text-muted: #cbd5e1;
    --border: #64748b;
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

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

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
}

code, pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.nav-logo:hover {
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-github {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.nav-github:hover {
    background: var(--surface-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: var(--background);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

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

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 16px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-light);
    color: var(--text);
}

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

.hero-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 48px;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--background-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: white;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.feature-card code {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--background);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

/* Examples Section */
.examples {
    padding: 100px 0;
    background: var(--background);
}

.examples-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--surface-light);
    color: var(--text);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.examples-content {
    max-width: 800px;
    margin: 0 auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    overflow-x: auto;
}

.tab-content code {
    font-size: 0.875rem;
    line-height: 1.8;
}

.tab-content .comment {
    color: var(--text-muted);
}

.tab-content .result {
    color: var(--success);
}

.tab-content .output {
    color: var(--accent);
}

/* Download Section */
.download {
    padding: 100px 0;
    background: var(--background-light);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.download-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    display: block;
}

.download-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

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

.download-card:hover .download-icon {
    color: var(--primary-light);
}

.download-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.download-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.download-file {
    font-size: 0.75rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.build-source {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.build-source h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.build-source p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.build-source pre {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: left;
    overflow-x: auto;
}

.build-source code {
    font-size: 0.8rem;
    color: var(--accent);
}

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

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-logo .logo-icon {
    width: 32px;
    height: 32px;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

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

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

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-image {
        order: 2;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--background);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}
