/* --- ROOT VARIABLES (The Control Panel) --- */
:root {
    --bg-color: #0f172a;        /* Deep navy background */
    --surface-color: #1e293b;   /* Slightly lighter for cards */
    --text-primary: #f8fafc;    /* Crisp white text */
    --text-secondary: #94a3b8;  /* Muted gray text */
    --primary-accent: #6366f1;  /* Indigo buttons */
    --primary-hover: #4f46e5;   /* Darker indigo on hover */
    --highlight: #38bdf8;       /* Bright blue for gradient text */
}

/* --- RESET & TYPOGRAPHY --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-color);
    /* Premium Background Depth: Top glow + subtle 40px grid */
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-attachment: fixed; /* Keeps the grid stable while scrolling */
    
    color: var(--text-primary);
    line-height: 1.6;
}

/* --- NAVIGATION --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px); /* Premium glassmorphism effect */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

/* --- MOBILE MENU BUTTON --- */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    color: var(--text-primary);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo span {
    color: var(--highlight);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* --- BUTTONS --- */
.btn-primary {
    background-color: var(--primary-accent);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid var(--text-secondary);
    font-weight: 600;
    transition: border-color 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
}

/* --- HERO SECTION --- */
.hero {
    padding: 12rem 5% 6rem;
    text-align: center;
    display: flex;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--highlight);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(to right, var(--highlight), var(--primary-accent));
    -webkit-background-clip: text;
    background-clip: text; /* Added for strict standard compliance */
    -webkit-text-fill-color: transparent;
    color: transparent; /* Added fallback */
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* --- FEATURES SECTION --- */
.features {
    padding: 5rem 5%;
    text-align: center;
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px); /* Gentle hover lift */
}

.icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--highlight);
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4)); /* Glow effect */
    transition: transform 0.3s ease;
}

.icon svg {
    width: 100%;
    height: 100%;
}

.feature-card:hover .icon {
    transform: scale(1.1) rotate(-5deg); /* Playful interaction on hover */
    color: var(--text-primary);
}

.feature-card h3 {
    margin-bottom: 1rem;
}

.features .feature-card h2 {
    font-size: 1.25rem; /* Keeps it the exact same size as the h3 */
    margin-bottom: 1rem;
    margin-top: 0;
}

.feature-card p {
    color: var(--text-secondary);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 3rem 5%;
    color: var(--text-secondary);
    border-top: 1px solid var(--surface-color);
    margin-top: 3rem;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block; /* Show the hamburger on mobile */
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        
        /* Animation setup */
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    /* This class gets added by JavaScript when tapped */
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

/* --- PREMIUM BUTTON GLOW --- */
.btn-primary {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); /* The Glow */
    border: 1px solid rgba(99, 102, 241, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.7); /* Glow expands on hover */
    transform: translateY(-2px);
}

.w-100 {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 2rem;
}

/* --- PRICING SECTION & TOGGLE --- */
.pricing {
    padding: 5rem 5%;
    text-align: center;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 3rem;
}

.discount-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--highlight);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

/* Custom CSS Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 4px; bottom: 3px;
    background-color: var(--highlight);
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-accent); }
input:checked + .slider:before { transform: translateX(20px); background-color: white; }

/* --- PRICING CARDS --- */
.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.price-card {
    background: var(--surface-color);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 350px;
    text-align: left;
    position: relative;
}

.price-card.popular {
    background: linear-gradient(180deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-accent);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
    color: white;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}
.features-list li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

/* --- SCROLL ANIMATION CLASSES --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* --- FORMS & AUTHENTICATION --- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1, .auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--highlight);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}