/* CSS Variables - Light Mode */
:root,
[data-theme="light"] {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --header-bg: rgba(255, 255, 255, 0.9);
    --code-bg: #1e293b;
    --code-header-bg: #0f172a;
}

/* CSS Variables - Dark Mode */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary: #94a3b8;
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
    --background: #111827;
    --surface: #1f2937;
    --surface-hover: #374151;
    --text: #f9fafb;
    --text-secondary: #9ca3af;
    --border: #374151;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --header-bg: rgba(17, 24, 39, 0.9);
    --code-bg: #0f172a;
    --code-header-bg: #020617;
}

/* Reset */
*, *::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;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    text-decoration: underline;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    text-decoration: none;
}

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

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

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

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

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

.btn-white:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.btn-ghost-white {
    color: white;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.lang-toggle:hover {
    color: var(--text);
    background: var(--surface-hover);
    border-color: var(--text-secondary);
}

.lang-current {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.theme-toggle:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
    opacity: 0.8;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-link:hover {
    color: var(--text);
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--text);
    cursor: pointer;
    background: none;
    border: none;
    border-radius: var(--radius);
}

.mobile-menu-btn:hover {
    background: var(--surface-hover);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 2rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.mobile-menu.open {
    display: flex;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.mobile-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.mobile-menu-footer .btn {
    flex: 1;
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    margin-top: 72px;
    background: linear-gradient(180deg, var(--background) 0%, var(--surface) 100%);
}

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

.hero-badge {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.375rem 0.875rem;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 9999px;
}

.hero-content {
    max-width: 560px;
}

.hero-title {
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

.hero-title-highlight {
    color: var(--primary);
}

.hero-description {
    margin-bottom: 2rem;
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
}

.hero-stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-card-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hero-card-dots {
    display: flex;
    gap: 0.375rem;
}

.hero-card-dots span {
    width: 10px;
    height: 10px;
    background: var(--border);
    border-radius: 50%;
}

.hero-card-dots span:first-child {
    background: #ef4444;
}

.hero-card-dots span:nth-child(2) {
    background: #f59e0b;
}

.hero-card-dots span:last-child {
    background: #22c55e;
}

.hero-card-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.hero-field label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
}

.hero-input,
.hero-textarea {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.hero-textarea {
    min-height: 60px;
}

.hero-button {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    text-align: center;
    background: var(--primary);
    border-radius: var(--radius);
}

/* Sections */
.section-header {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-title {
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--background);
}

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

.feature-card {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

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

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1.25rem;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
}

.feature-title {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

.feature-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* How it Works Section */
.how-it-works {
    padding: 6rem 0;
    background: var(--surface);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.step-card {
    padding: 2rem;
    text-align: center;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
}

.step-title {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.step-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Install Section */
.install-section {
    max-width: 700px;
    margin: 0 auto;
}

.install-title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

.code-block {
    overflow: hidden;
    background: var(--code-bg);
    border-radius: var(--radius-lg);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #94a3b8;
    background: var(--code-header-bg);
}

.copy-btn {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    color: #94a3b8;
    cursor: pointer;
    background: transparent;
    border: 1px solid #334155;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.copy-btn:hover {
    color: white;
    background: #334155;
}

.code-block pre {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: "SF Mono", "Fira Code", "Monaco", monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-title {
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
}

.cta-description {
    margin-bottom: 2rem;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    padding: 3rem 2rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.logo-icon-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 6px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

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

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

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-card {
        transform: none;
    }

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

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav,
    .header-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 5rem 0 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.0625rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .features,
    .how-it-works,
    .cta {
        padding: 4rem 0;
    }

    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-actions {
        flex-direction: column;
    }

    .cta-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }
}
