/**
 * EZer Global Theme System
 * Provides consistent dark/light mode across all pages
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */

:root {
    /* Brand Colors */
    --indigo: #4f46e5;
    --purple: #9333ea;
    --pink: #ec4899;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, var(--indigo) 0%, var(--purple) 50%, var(--pink) 100%);
    --gradient-cta: linear-gradient(90deg, var(--indigo) 0%, var(--purple) 100%);
    --gradient-text: linear-gradient(135deg, var(--indigo) 0%, var(--purple) 50%, var(--pink) 100%);

    /* Plus Badge */
    --gold-start: #FBBF24;
    --gold-end: #F59E0B;
    --plus-text: #4C1D95;

    /* Dark Theme (Default) */
    --bg-primary: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-elevated: #242442;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.15);
    --hero-accent: #a5b4fc;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --header-bg: rgba(15, 15, 26, 0.95);
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    --hero-accent: var(--indigo);
    --card-shadow: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.95);
}

/* System Preference: Light */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg-primary: #f8fafc;
        --bg-card: #ffffff;
        --bg-elevated: #f1f5f9;
        --text-primary: #0f172a;
        --text-secondary: #475569;
        --text-muted: #64748b;
        --border: rgba(0, 0, 0, 0.08);
        --border-light: rgba(0, 0, 0, 0.12);
        --hero-accent: var(--indigo);
        --card-shadow: rgba(0, 0, 0, 0.08);
        --header-bg: rgba(255, 255, 255, 0.95);
    }
}

/* ============================================
   Base Styles
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   Site Header
   ============================================ */

.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.country-banner {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.country-banner .flag { font-size: 16px; margin-right: 6px; }
.country-banner a { color: var(--indigo); text-decoration: none; margin-left: 8px; font-weight: 500; }
.country-banner a:hover { text-decoration: underline; }

/* ============================================
   Navigation
   ============================================ */

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px max(16px, 4vw);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-hero);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    color: white;
}

.nav-logo-text {
    font-size: 26px;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--indigo);
    background: rgba(79, 70, 229, 0.1);
}

.nav-link.active {
    color: var(--indigo);
    background: rgba(79, 70, 229, 0.1);
}

.nav-cta {
    background: var(--gradient-cta);
    color: white !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    margin-left: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.nav-cta:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.4);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    cursor: pointer;
    font-size: 28px;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 16px;
}

.mobile-nav.open { display: block; }

.mobile-nav-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--indigo);
    background: rgba(79, 70, 229, 0.1);
}

.mobile-nav-cta {
    display: block;
    background: var(--gradient-cta);
    color: white !important;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    margin-top: 12px;
}

/* ============================================
   Theme Toggle
   ============================================ */

.theme-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

.theme-toggle-label {
    font-size: 13px;
    color: var(--text-muted);
}

.theme-toggle {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    color: var(--text-primary);
}

.theme-btn.active {
    background: var(--gradient-cta);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.theme-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Container & Section
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 max(16px, 5vw);
}

.section {
    padding: clamp(48px, 10vw, 100px) 0;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px var(--card-shadow);
}

/* ============================================
   Plus Badge
   ============================================ */

.plus-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--gold-start) 0%, var(--gold-end) 100%);
    color: var(--plus-text);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1.2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.plus-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 max(16px, 5vw);
}

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

.footer-section h4 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--indigo);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .mobile-menu-btn { display: block; }

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

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
