:root {
    --primary: #27C66E;
    --primary-dark: #1FA85C;
    --dark: #0A0A0A;
    --light: #F5F5F7;
    --gray: #86868B;
    --bg-light: #F5F5F7;
    --card-light: rgba(229, 229, 231, 1.0);
    /* Increased opacity for light mode */
    --text-light: #1D1D1F;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --container: 1200px;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --text-light: #86868B;
    /* Default gray for dark mode */

    /* Spacing Tokens */
    --section-padding: 6rem;
    --grid-gap: 2.5rem;
    --element-gap: 1.5rem;
    --header-margin: 2rem;
    /* Reduced from 4rem */
    --footer-bg: #111;
}

[data-theme="light"] {
    --bg: #FFFFFF;
    --text: #1C1C1E;
    --glass: #F2F2F7;
    --glass-border: rgba(0, 0, 0, 0.05);
    --gray: #636366;
    --text-light: #1C1C1E;
    --footer-bg: #F5F5F7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body[data-theme="light"] {
    background-color: var(--bg);
    color: var(--text);
}

/* Light theme text overrides */
[data-theme="light"] h1,
[data-theme="light"] h2,

[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: var(--text);
}

[data-theme="light"] p {
    color: var(--gray);
}

[data-theme="light"] .hero {
    background: var(--bg);
}

/* Pricing card text visibility */
[data-theme="light"] .pricing-card h3,
[data-theme="light"] .pricing-card .price,
[data-theme="light"] .pricing-features li {
    color: var(--text);
}

[data-theme="light"] .popular-badge {
    background: var(--primary);
    color: #000;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--gray);
}

/* Reusable Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(39, 198, 110, 0.2);
}

.btn-secondary {
    background: var(--glass);
    color: var(--light);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

[data-theme="light"] .btn-secondary:hover {
    background: #E5E5EA;
}

.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.logo img {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

[data-theme="light"] .logo img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    /* Better visibility in light mode */
}

/* How it Works */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--grid-gap);
}

.step {
    text-align: center;
    position: relative;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.step:hover .step-icon {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(39, 198, 110, 0.1);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--gray);
    font-weight: 500;
}

.logo:hover img {
    transform: scale(1.05);
}

[data-theme="light"] .glass-card {
    background-color: var(--glass);
    box-shadow: none;
    border: 1px solid var(--glass-border);
}

/* Ensure all span elements in light theme have proper text color */
[data-theme="light"] span {
    color: var(--text);
}

/* Price spans should use primary color */
[data-theme="light"] .price span {
    color: var(--primary);
}

[data-theme="light"] i {
    color: var(--primary);
}

[data-theme="light"] .btn-primary i {
    color: #FFFFFF;
    /* Keep icons white on green buttons */
}

/* Logo protection */
[data-theme="light"] .logo {
    background: #0A0A0A;
    /* Dark backdrop for brand logo in light mode */
    padding: 0.5rem 1rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav-links a {
    color: var(--text);
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    border-radius: 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(39, 198, 110, 0.2);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

[data-theme="light"] .faq-question {
    color: var(--text);
}

[data-theme="light"] .faq-question:hover {
    color: var(--text);
    color: white
}

[data-theme="light"] .faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--glass);
}

[data-theme="light"] .faq-item:hover {
    background-color: rgba(211, 214, 210, 0.938);
    border-color: rgba(39, 198, 110, 0.2);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.5rem;
    color: var(--gray);
    line-height: 1.6;
}

[data-theme="light"] .faq-answer {
    color: var(--text);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--light);
}

.logo span {
    color: var(--primary);
    display: none;
    /* Hide redundant text logo */
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    opacity: 0.8;
    transition: var(--transition);
}

.nav-links .btn-primary {
    color: #000 !important;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--primary);
}

.hero-btns {
    display: flex;
    gap: var(--element-gap);
    justify-content: center;
    margin-top: 2.5rem;
}

/* Common Layouts */
.hero {
    position: relative;
    padding: 10rem 0 2rem;
    text-align: center;
    overflow: hidden;
}

.section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--header-margin);
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--grid-gap);
    margin-top: 1rem;
    /* Reduced from 2rem */
    align-items: stretch;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    padding: 3rem 2rem;
    height: 100%;
    /* Fill grid cell */
}

.pricing-card .btn {
    margin-top: auto;
    /* Push buttons to bottom */
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--grid-gap);
}

.grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

@media (max-width: 992px) {
    .grid-three {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-three {
        grid-template-columns: 1fr;
    }
}

.feature-card i {
    background: rgba(39, 198, 110, 0.1);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* Footer (extracted from index.html inline styles) */
footer {
    padding-top: 4rem;
}

.footer-grid h4 {
    color: var(--light);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

[data-theme="light"] .footer-grid h4 {
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    padding-bottom: var(--section-padding);
    border-bottom: 1px solid var(--glass-border);
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    margin-top: 1rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    color: var(--gray);
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding: 2rem 0;
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Language Switcher */
.language-switcher {
    position: relative;
    display: inline-block;
}

#language-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    white-space: nowrap;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--light);
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.language-option.active {
    background: rgba(39, 198, 110, 0.1);
    color: var(--primary);
}

[data-theme="light"] .language-dropdown {
    background: var(--glass);
    border: 1px solid var(--glass-border);
}

[data-theme="light"] .language-option {
    color: var(--text);
}

[data-theme="light"] .language-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .section-header h2 {
    color: white
}

[data-theme="light"] h3 {
    color: var(--gray);
}



[data-theme="light"] .language-option.active {
    background: rgba(39, 198, 110, 0.1);
    color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    color: var(--primary);
}

[data-theme="light"] .mobile-menu-toggle {
    color: var(--text);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
        /* Added to prevent horizontal layout shift */
    }

    [data-theme="light"] .nav-links {
        background: rgba(255, 255, 255, 0.98);
    }

    .nav-links.show {
        right: 0;
    }

    .nav-links a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links .btn {
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }

    .language-switcher {
        width: 100%;
    }

    #language-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .language-dropdown {
        right: auto;
        left: 0;
        width: 100%;
    }
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.show {
    display: block;
    opacity: 1;
}
