/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --dark: #0f172a;
    --darker: #1e293b;
    --light: #e2e8f0;
    --gray: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

p {
    color: var(--gray);
}

a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.page {
    min-height: 100vh;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: var(--space-sm) 0;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-user {
    font-size: 0.875rem;
    color: var(--gray);
}

/* ===== Buttons ===== */
.btn {
    padding: var(--space-xs) var(--space-md);
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

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

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

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

.btn-outline:hover {
    border-color: var(--light);
    background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
    padding: var(--space-sm) var(--space-lg);
    font-size: 1.125rem;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
}

.hero h1 {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

/* ===== Section Base ===== */
section {
    padding: var(--space-xl) 0;
}

section:nth-child(even) {
    background: var(--darker);
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: var(--space-lg);
    transition: transform 0.2s;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

/* ===== About ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-sm);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-lg);
}

.card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: var(--space-lg);
}

.card h3 {
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.card p {
    margin-bottom: var(--space-sm);
    line-height: 1.8;
}

/* ===== Video ===== */
.video-section {
    margin: var(--space-xl) 0;
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 0.5rem;
    background: var(--darker);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Stats ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* ===== CTA ===== */
.cta {
    text-align: center;
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-top: var(--space-xl);
}

.cta h3 {
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.cta p {
    margin-bottom: var(--space-lg);
}

/* ===== Pricing ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: var(--space-lg);
    position: relative;
    text-align: center;
}

.pricing-card.featured {
    border-color: var(--primary);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    margin: var(--space-sm) 0;
}

.price span {
    font-size: 1rem;
    color: var(--gray);
}

.pricing-features {
    list-style: none;
    margin: var(--space-lg) 0;
    text-align: left;
}

.pricing-features li {
    padding: var(--space-xs) 0;
}

/* ===== Dashboard ===== */
.dashboard {
    padding-top: 60px;
    min-height: 100vh;
}

.dashboard-header {
    background: var(--darker);
    border-bottom: 1px solid var(--border);
    padding: var(--space-sm) 0;
}

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

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.gpu-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: not-allowed;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--gray);
    border-radius: 50%;
    transition: transform 0.2s;
}

.status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--gray);
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
}

/* ===== Demo Container ===== */
.demo-container {
    height: calc(100vh - 120px);
    background: #000;
    position: relative;
}

.demo-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.demo-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-sm);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.demo-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--darker);
    border-radius: 0.5rem;
    padding: var(--space-lg);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--light);
}

/* ===== Form ===== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: 0.875rem;
    color: var(--gray);
}

.form-group input {
    width: 100%;
    padding: var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--light);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-full {
    width: 100%;
}

.btn-google {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.btn-google:hover {
    background: #f8f8f8;
}

.form-footer {
    text-align: center;
    margin-top: var(--space-md);
    font-size: 0.875rem;
}

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

/* ===== Footer ===== */
.footer {
    background: var(--darker);
    border-top: 1px solid var(--border);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-section h4 {
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.footer-section a {
    display: block;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

/* ===== Utilities ===== */
.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: var(--space-sm);
    border-radius: 0.375rem;
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .nav-menu a:not(.btn) {
        display: none;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-xs);
        text-align: center;
    }
}