/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #22d3ee;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-code: #16162a;
    --bg-light: #252542;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: #334155;
    --border-light: #475569;
    
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    --gradient-text: linear-gradient(135deg, var(--primary-light), var(--accent));
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-img {
    height: 40px;
    width: 40px;
    object-fit: contain;
}

.logo-icon {
    font-size: 1.8rem;
}

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

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

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

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

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

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* ===== Hero ===== */
.hero {
    padding: 140px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badges-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-img {
    height: 20px;
    vertical-align: middle;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

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

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

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Code Window ===== */
.code-window {
    background: var(--bg-code);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.code-title {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-content {
    padding: 24px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    overflow-x: auto;
}

.code-content code {
    color: var(--text-primary);
}

.code-content .comment { color: var(--text-muted); }
.code-content .command { color: var(--success); }
.code-content .string { color: var(--accent); }
.code-content .keyword { color: var(--primary-light); }
.code-content .function { color: var(--warning); }
.code-content .number { color: var(--accent); }
.code-content .key { color: var(--primary-light); }
.code-content .atom { color: var(--secondary); }

.code-window.large .code-content {
    min-height: 300px;
}

.code-actions {
    margin-top: 16px;
    text-align: center;
}

.code-note {
    margin-top: 16px;
    color: var(--text-secondary);
    text-align: center;
}

.code-note code {
    background: var(--bg-light);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', monospace;
}

/* ===== Section Styles ===== */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
}

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

/* ===== Demo Section ===== */
.demo-section {
    background: var(--bg-dark);
    padding: 100px 0;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
}

/* ===== Features ===== */
.features {
    background: var(--bg-card);
}

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

.feature-card {
    padding: 32px;
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

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

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

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

/* ===== Tabs ===== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.tab {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.tab-content {
    display: none;
    max-width: 800px;
    margin: 0 auto;
}

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

/* ===== Comparison Table ===== */
.comparison {
    background: var(--bg-card);
}

.table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.comparison-table th {
    background: var(--bg-light);
    font-weight: 700;
    color: var(--text-primary);
}

.comparison-table th.highlight,
.comparison-table td.highlight {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    font-weight: 600;
}

.comparison-table td {
    color: var(--text-secondary);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* ===== Docs Grid ===== */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.doc-card {
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: var(--transition);
}

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

.doc-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.doc-card h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.doc-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== CTA ===== */
.cta {
    background: var(--gradient);
    text-align: center;
    padding: 80px 0;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cta .btn-primary {
    background: white;
    color: var(--primary-dark);
    box-shadow: none;
}

.cta .btn-primary:hover {
    background: var(--text-primary);
}

.cta .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-card);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-code {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .docs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 16px;
        font-size: 0.875rem;
    }
}
