/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

/* Default Theme (Dark) Variables */
body {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --accent-primary: #8b5cf6;
    /* Violet */
    --accent-secondary: #3b82f6;
    /* Blue */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --card-hover: rgba(255, 255, 255, 0.08);
    --card-text: #a0a0a0;
    --gradient-1: rgba(139, 92, 246, 0.15);
    --gradient-2: rgba(59, 130, 246, 0.15);
    --btn-text: white;
    --logo-gradient-start: #fff;
    --logo-gradient-end: #aaa;
    --hero-gradient-start: #ffffff;
    --hero-gradient-end: #a5a5a5;
    --footer-border: rgba(255, 255, 255, 0.06);
    --footer-text: #555;

    /* Toggle Switch */
    --switch-bg: #333;
    --switch-icon: #f1c40f;
    /* Sun Yellow */
}

/* Light Theme (Applied via JS Class) */
body.light-mode {
    --bg-color: #f8f9fa;
    --text-color: #333333;
    --heading-color: #111111;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --card-hover: rgba(255, 255, 255, 0.95);
    --card-text: #555555;
    --gradient-1: rgba(139, 92, 246, 0.08);
    --gradient-2: rgba(59, 130, 246, 0.08);
    --logo-gradient-start: #1a1a1a;
    --logo-gradient-end: #4a4a4a;
    --hero-gradient-start: #111111;
    --hero-gradient-end: #444444;
    --footer-border: rgba(0, 0, 0, 0.05);
    --footer-text: #888;

    --switch-bg: #e0e0e0;
    --switch-icon: #f39c12;
    /* Darker Orange for Sun */
}

/* Scroll Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--gradient-1), transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    transition: background 0.3s ease;
}

body::after {
    content: '';
    position: fixed;
    bottom: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--gradient-2), transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    transition: background 0.3s ease;
}

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

/* Navigation */
/* Navigation */
header {
    padding: 1.5rem 0;
    /* Slightly tighter padding */
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(5, 5, 5, 0.5);
    /* Semi-transparent base */
    border-bottom: 1px solid var(--glass-border);
    animation: fadeInDown 1s ease-out;
    transition: background-color 0.3s ease;
}

body.light-mode header {
    background: rgba(248, 249, 250, 0.7);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--logo-gradient-start), var(--logo-gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

/* Language Selector (Custom) */
.language-dropdown {
    position: relative;
    font-size: 0.9rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 5px 12px;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--glass-bg);
    border-color: var(--accent-primary);
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    list-style: none;
    background: var(--bg-color);
    /* Solid background for legibility */
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

/* Open State */
.language-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    color: var(--text-color);
}

.dropdown-menu li:hover {
    background: var(--glass-bg);
}

.flag {
    font-size: 1.2em;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.9rem;
}

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

/* Theme Switcher */
#theme-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    background: var(--switch-bg);
    width: 50px;
    height: 26px;
    border-radius: 50px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    transition: background 0.3s ease;
}

#theme-btn span {
    font-size: 14px;
    user-select: none;
    pointer-events: none;
    /* Let clicks pass to button */
}

#theme-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Toggle Logic */
body.light-mode #theme-btn::after {
    transform: translateX(24px);
}

/* API Button Style (Non-functional) */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: default;
    /* Non-functional */
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--btn-text);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

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

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

.full-width {
    display: block;
    width: 100%;
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero h1 {
    font-size: 4.5rem;
    /* Larger font */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    /* Tighter letter spacing for modern feel */
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--card-text);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.cta-group .btn-secondary {
    margin-left: 1rem;
}


/* Features Grid */
.features {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 4rem;
    font-weight: 600;
    color: var(--heading-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        /* Force 4 columns on large screens */
    }
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 16px;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for depth */
}

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

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

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

/* Pricing Grid */
.pricing {
    padding: 5rem 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pricing-card.advanced {
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.1);
}

.pricing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.pricing-header h3 {
    margin-bottom: 0;
    /* Remove bottom margin to align with badge */
}

.badge {
    position: static;
    display: inline-block;
    align-self: center;
    /* Align vertically in flex row */
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    /* Remove margin since it's in a row now */
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transform: none;
    width: auto;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 1rem 0 0.5rem;
}

.currency {
    font-size: 1.5rem;
    vertical-align: top;
    margin-right: 2px;
}

.period {
    font-size: 1rem;
    color: var(--card-text);
    font-weight: 400;
}

.annual-price {
    font-size: 0.9rem;
    color: var(--accent-secondary);
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.feature-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.feature-list li::before {
    content: '✓';
    color: var(--accent-primary);
    font-weight: bold;
    margin-right: 10px;
}

.feature-list li.disabled {
    color: var(--card-text);
    opacity: 0.6;
}

.feature-list li.disabled::before {
    content: '×';
    color: var(--card-text);
}


/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--footer-text);
    font-size: 0.9rem;
    border-top: 1px solid var(--footer-border);
    margin-top: 5rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }
}