/* Critical CSS - Above the fold */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --bg-primary: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #374151;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --bg-primary: #0f0f23;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --navbar-bg: rgba(15, 15, 35, 0.95);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
}

.ez-navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-lg);
}

.ez-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.ez-navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ez-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ez-logo img {
    transition: opacity 0.3s ease;
}

.ez-nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.ez-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
}

.ez-nav-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.ez-nav-link svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    width: 1.4rem;
    height: 1.4rem;
}

.ez-nav-link:hover svg {
    transform: scale(1.1);
}

/* Critical styles for hero section and above-the-fold content */
.ez-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ez-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.ez-hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.ez-btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.ez-btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Theme switch critical styles */
.ez-theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin-left: 1rem;
}

.ez-theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ez-theme-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    transition: background 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.ez-theme-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.ez-theme-switch input:checked+.ez-theme-switch-slider {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.ez-theme-switch input:checked+.ez-theme-switch-slider:before {
    transform: translateX(28px);
    background: #f1f5f9;
}

.ez-theme-switch-emoji {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.ez-theme-switch-sun {
    left: 6px;
    opacity: 1;
}

.ez-theme-switch-moon {
    right: 6px;
    opacity: 0;
}

.ez-theme-switch input:checked~.ez-theme-switch-sun {
    opacity: 0;
}

.ez-theme-switch input:checked~.ez-theme-switch-moon {
    opacity: 1;
}

/* Language Selector Styles */
.ez-language-selector {
    display: flex;
    align-items: center;
}

.ez-nav-select {
    background: transparent;
    border: 1px solid var(--text-secondary);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ez-nav-select:hover {
    border-color: var(--primary);
}

.ez-nav-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Main content separation from navbar */
main[role="main"] {
    margin-top: 2rem;
}

/* Responsive navbar */
@media (max-width: 1024px) {
    .ez-nav-links {
        gap: 0.5rem;
    }

    .ez-nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
    }

    .ez-nav-link svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 768px) {
    .ez-navbar {
        padding: 0.75rem 0;
    }

    .ez-nav-links {
        gap: 0.25rem;
    }

    .ez-nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }

    .ez-nav-link svg {
        width: 12px;
        height: 12px;
    }
}
