/* AskUsNow - World's Best Search Engine 2025+ */
/* Revolutionary Design System for Premium Search Experience */

/* === IMPORT MODERN FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    /* === REVOLUTIONARY BRAND IDENTITY 2025+ === */
    --brand-primary: #0066FF;
    --brand-primary-light: #3385FF;
    --brand-primary-dark: #0052CC;
    --brand-secondary: #00D4AA;
    --brand-accent: #FF6B35;
    --brand-neutral: #1A1D29;
    --brand-surface: #FFFFFF;
    
    /* === ULTRA-MODERN COLOR SYSTEM === */
    --neutral-0: #FFFFFF;
    --neutral-50: #FAFBFC;
    --neutral-100: #F4F6F8;
    --neutral-200: #E8EAED;
    --neutral-300: #DADCE0;
    --neutral-400: #9AA0A6;
    --neutral-500: #5F6368;
    --neutral-600: #3C4043;
    --neutral-700: #202124;
    --neutral-800: #1A1D29;
    --neutral-900: #0D1117;
    
    /* === PREMIUM GRADIENTS === */
    --brand-gradient-primary: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    --brand-gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.05) 100%);
    --brand-gradient-subtle: linear-gradient(135deg, rgba(0, 102, 255, 0.06) 0%, rgba(0, 212, 170, 0.04) 100%);
    
    /* === REVOLUTIONARY SHADOWS === */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.01);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.10);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    --shadow-glass-lg: 0 16px 64px 0 rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 4px 14px 0 rgba(0, 102, 255, 0.12);
    --shadow-glow: 0 0 20px rgba(0, 102, 255, 0.08);
    --shadow-glow-lg: 0 0 40px rgba(0, 102, 255, 0.12);
    
    /* === MODERN BORDER RADIUS === */
    --radius-xs: 0.125rem;
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-search: var(--radius-2xl);
    --radius-button: var(--radius-lg);
    --radius-card: var(--radius-xl);
    --radius-full: 9999px;
    
    /* === PREMIUM TRANSITIONS === */
    --transition-instant: 75ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    
    /* === TYPOGRAPHY SYSTEM === */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-fluid-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --font-size-fluid-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --font-size-fluid-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --font-size-fluid-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --font-size-fluid-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.75rem);
    --font-size-fluid-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3.5rem);
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --leading-tight: 1.2;
    --leading-normal: 1.5;
    --leading-relaxed: 1.6;
    
    /* === SPACING SYSTEM === */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-7: 1.75rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    
    /* === BACKDROP FILTERS === */
    --backdrop-blur-sm: blur(4px);
    --backdrop-blur: blur(8px);
    --backdrop-blur-md: blur(12px);
    --backdrop-blur-lg: blur(16px);
    --backdrop-blur-xl: blur(24px);
    --backdrop-blur-2xl: blur(40px);
    
    /* === Z-INDEX SYSTEM === */
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-modal: 1050;
    --z-tooltip: 1070;
    
    /* === RESPONSIVE BREAKPOINTS === */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1400px;
}

/* === MODERN CSS RESET === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #202124;
    background: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    line-height: var(--leading-tight);
    color: var(--neutral-900);
    margin: 0;
}

h1 { font-size: var(--font-size-fluid-4xl); font-weight: var(--font-weight-bold); }
h2 { font-size: var(--font-size-fluid-3xl); }
h3 { font-size: var(--font-size-fluid-2xl); }

p {
    margin: 0;
    line-height: var(--leading-relaxed);
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid rgba(0, 102, 255, 0.6);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
}

/* === ACCESSIBILITY === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Clean, minimal focus styles */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* === WORLD'S MOST BEAUTIFUL HEADER === */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    padding: var(--space-2) 0;
}

.header-logo:hover {
    transform: scale(1.02);
}

.header-logo-img {
    height: 32px;
    width: auto;
}

/* === WORLD'S MOST BEAUTIFUL SEARCH INTERFACE === */
.search-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    background: #ffffff;
    position: relative;
}

.search-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.logo-container {
    margin-bottom: 48px;
}

.hero-logo {
    height: 92px;
    width: auto;
}

.search-wrapper {
    position: relative;
}

/* === WORLD'S MOST BEAUTIFUL SEARCH FORM 2025+ === */
.search-form {
    display: flex;
    align-items: center;
    position: relative;
    min-height: 72px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 36px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.search-form:hover {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.search-form:focus-within {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

/* === WORLD'S MOST BEAUTIFUL SEARCH INPUT === */
.search-input {
    flex: 1;
    border: none;
    padding: 0 24px;
    padding-right: 160px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    outline: none;
    color: #202124;
    background: transparent;
    width: 100%;
    height: 72px;
    line-height: 1.5;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    z-index: 2;
    cursor: text;
}

.search-input::placeholder {
    color: #9aa0a6;
    font-weight: 400;
    font-size: 16px;
    opacity: 1;
}

.search-input:focus {
    outline: none;
}

.search-input:focus::placeholder {
    opacity: 0.6;
}

/* === WORLD'S MOST BEAUTIFUL SEARCH BUTTON === */
.search-button {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 28px;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    cursor: pointer;
    z-index: 3;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-button:hover {
    background: #1557b0;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25);
}

.search-button:active {
    background: #1557b0;
    transform: scale(0.98);
}

.search-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.3);
}

/* === BEAUTIFUL VOICE SEARCH BUTTON === */
.voice-search-button {
    position: absolute;
    right: 140px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 4;
}

.voice-search-button:hover {
    background: rgba(0, 0, 0, 0.04);
}

.voice-search-button svg {
    width: 24px;
    height: 24px;
    color: #5f6368;
    transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-search-button:hover svg {
    color: #1a73e8;
}

.voice-search-button:focus {
    outline: none;
    background: rgba(26, 115, 232, 0.08);
}

/* === PERFECT MOBILE RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .search-section {
        padding: 32px 16px;
    }

    .logo-container {
        margin-bottom: 32px;
    }

    .hero-logo {
        height: 72px;
    }

    .search-form {
        min-height: 56px;
        border-radius: 28px;
    }

    .search-input {
        padding: 0 16px;
        padding-right: 120px;
        height: 56px;
        font-size: 16px;
    }

    .search-button {
        right: 4px;
        top: 4px;
        bottom: 4px;
        min-width: 80px;
        border-radius: 24px;
        font-size: 13px;
        padding: 0 16px;
    }

    .voice-search-button {
        right: 90px;
        width: 36px;
        height: 36px;
    }

    .voice-search-button svg {
        width: 20px;
        height: 20px;
    }

    .header-content {
        padding: 0 16px;
        height: 56px;
    }

    .header-logo-img {
        height: 24px;
    }
}

@media (max-width: 480px) {
    .search-form {
        min-height: 48px;
        border-radius: 24px;
    }

    .search-input {
        padding: 0 12px;
        padding-right: 100px;
        height: 48px;
        font-size: 16px;
    }

    .search-button {
        right: 4px;
        top: 4px;
        bottom: 4px;
        min-width: 70px;
        border-radius: 20px;
        font-size: 12px;
        padding: 0 12px;
    }

    .voice-search-button {
        right: 80px;
        width: 32px;
        height: 32px;
    }

    .voice-search-button svg {
        width: 18px;
        height: 18px;
    }
}

/* === PREMIUM ANIMATIONS 2025+ === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* === BEAUTIFUL DARK MODE === */
[data-theme="dark"] body {
    background: #202124;
    color: #e8eaed;
}

[data-theme="dark"] .search-section {
    background: #202124;
}

[data-theme="dark"] .app-header {
    background: rgba(32, 33, 36, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .app-header.scrolled {
    background: rgba(32, 33, 36, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .search-form {
    background: rgba(48, 49, 52, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-form:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .search-form:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .search-input {
    color: #e8eaed;
}

[data-theme="dark"] .search-input::placeholder {
    color: #9aa0a6;
}

[data-theme="dark"] .search-button {
    background: #8ab4f8;
    color: #202124;
}

[data-theme="dark"] .search-button:hover {
    background: #aecbfa;
}

[data-theme="dark"] .voice-search-button svg {
    color: #9aa0a6;
}

[data-theme="dark"] .voice-search-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .voice-search-button:hover svg {
    color: #8ab4f8;
}

[data-theme="dark"] .quick-answer {
    background: #303134;
    border-color: #5f6368;
}

[data-theme="dark"] .quick-answer-header {
    color: #8ab4f8;
}

[data-theme="dark"] .quick-answer-header svg {
    color: #8ab4f8;
}

[data-theme="dark"] .quick-answer-content {
    color: #e8eaed;
}

/* === NAVIGATION STYLES === */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    list-style: none;
}

.nav-link {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    color: var(--neutral-600);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--brand-primary);
    background: rgba(0, 102, 255, 0.05);
    text-decoration: none;
}

/* === THEME SWITCH === */
.theme-switch-container {
    display: flex;
    align-items: center;
    margin-left: var(--space-4);
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

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

.theme-switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-1);
}

.theme-switch-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    background: var(--neutral-0);
    border-radius: var(--radius-full);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.theme-switch-input:checked + .theme-switch-slider {
    background: var(--brand-primary);
}

.theme-switch-input:checked + .theme-switch-slider::before {
    transform: translateX(24px);
}

.theme-switch-icon {
    width: 14px;
    height: 14px;
    z-index: 1;
    transition: var(--transition);
}

.theme-switch-sun {
    color: var(--neutral-500);
}

.theme-switch-moon {
    color: var(--neutral-400);
}

[data-theme="dark"] .theme-switch-sun {
    color: var(--neutral-400);
}

[data-theme="dark"] .theme-switch-moon {
    color: var(--neutral-0);
}

/* === REVOLUTIONARY SEARCH RESULTS 2025+ === */
.results-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    animation: fadeInUp 0.6s var(--ease-out-expo);
}

.result-card {
    background: var(--brand-surface);
    border: 1px solid var(--neutral-100);
    border-radius: var(--radius-card);
    margin-bottom: var(--space-8);
    overflow: hidden;
    transition: all var(--transition) var(--ease-out-expo);
    box-shadow: var(--shadow-sm);
}

.result-card:hover {
    border-color: rgba(0, 102, 255, 0.2);
    box-shadow: var(--shadow-md), 0 0 20px rgba(0, 102, 255, 0.06);
    transform: translateY(-1px);
}

/* === BEAUTIFUL QUICK ANSWER SECTION === */
.quick-answer {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-answer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #1a73e8;
    font-weight: 500;
    font-size: 18px;
}

.quick-answer-header svg {
    width: 20px;
    height: 20px;
    color: #1a73e8;
}

.quick-answer-content {
    font-size: 16px;
    line-height: 1.6;
    color: #202124;
}

.quick-answer-content p {
    margin-bottom: 16px;
}

.quick-answer-content p:last-child {
    margin-bottom: 0;
}

/* === PREMIUM CITATIONS === */
.result-citations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.citation-card {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius);
    padding: var(--space-4);
    transition: all var(--transition);
}

.citation-card:hover {
    background: var(--neutral-25);
    border-color: rgba(0, 102, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.04);
}

.citation-title {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    color: var(--brand-primary);
    margin-bottom: var(--space-2);
    text-decoration: none;
}

.citation-title:hover {
    text-decoration: underline;
}

.citation-url {
    font-size: var(--font-size-xs);
    color: var(--neutral-500);
    margin-bottom: var(--space-2);
}

.citation-snippet {
    font-size: var(--font-size-sm);
    color: var(--neutral-700);
    line-height: var(--leading-relaxed);
}

.citation-confidence {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--neutral-600);
    margin-top: var(--space-2);
}

.confidence-bar {
    width: 40px;
    height: 4px;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: var(--brand-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition);
}

/* === DARK MODE RESULTS === */
[data-theme="dark"] .results-container {
    color: var(--neutral-800);
}

[data-theme="dark"] .result-card {
    background: var(--neutral-100);
    border-color: var(--neutral-200);
}

[data-theme="dark"] .result-card:hover {
    border-color: var(--brand-primary);
    background: var(--neutral-50);
}

[data-theme="dark"] .quick-answer {
    background: linear-gradient(135deg,
        rgba(88, 166, 255, 0.05) 0%,
        rgba(88, 166, 255, 0.02) 100%);
    border-color: rgba(88, 166, 255, 0.2);
}

[data-theme="dark"] .quick-answer-content {
    color: var(--neutral-800);
}

[data-theme="dark"] .citation-card {
    background: var(--neutral-200);
    border-color: var(--neutral-300);
}

[data-theme="dark"] .citation-card:hover {
    background: var(--neutral-100);
    border-color: var(--brand-primary);
}

[data-theme="dark"] .citation-snippet {
    color: var(--neutral-700);
}

[data-theme="dark"] .confidence-bar {
    background: var(--neutral-300);
}

/* === REVOLUTIONARY SEARCH SUGGESTIONS 2025+ === */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-surface);
    border: 1px solid var(--neutral-200);
    border-top: none;
    border-radius: 0 0 var(--radius-search) var(--radius-search);
    box-shadow: var(--shadow-glass-lg);
    backdrop-filter: var(--backdrop-blur-xl);
    -webkit-backdrop-filter: var(--backdrop-blur-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition) var(--ease-out-expo);
    pointer-events: none;
}

.search-suggestions.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.suggestion-item {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--neutral-100);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: rgba(0, 102, 255, 0.03);
    color: var(--brand-primary);
}

.suggestion-icon {
    width: 16px;
    height: 16px;
    color: var(--neutral-400);
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--neutral-700);
}

.suggestion-item:hover .suggestion-text,
.suggestion-item.selected .suggestion-text {
    color: var(--brand-primary);
}

/* === PREMIUM LOADING STATES === */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    color: var(--neutral-500);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--neutral-200);
    border-top: 3px solid var(--brand-primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin-right: var(--space-3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

/* === ADVANCED SEARCH FILTERS === */
.search-filters-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-surface);
    border: 1px solid var(--neutral-200);
    border-top: none;
    border-radius: 0 0 var(--radius-search) var(--radius-search);
    box-shadow: var(--shadow-glass-lg);
    backdrop-filter: var(--backdrop-blur-xl);
    -webkit-backdrop-filter: var(--backdrop-blur-xl);
    padding: var(--space-6);
    z-index: 999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition) var(--ease-out-expo);
    pointer-events: none;
    max-height: 500px;
    overflow-y: auto;
}

.search-filters-panel.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--neutral-200);
}

.filters-header h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--neutral-900);
    margin: 0;
}

.filters-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--neutral-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.filters-close:hover {
    background: var(--neutral-200);
    transform: scale(1.05);
}

.filters-close svg {
    width: 16px;
    height: 16px;
    color: var(--neutral-600);
}

.filter-group {
    margin-bottom: var(--space-6);
}

.filter-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--neutral-700);
    margin-bottom: var(--space-3);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.filter-option {
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius);
    background: var(--brand-surface);
    color: var(--neutral-600);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-option:hover {
    border-color: rgba(0, 102, 255, 0.3);
    color: var(--brand-primary);
    background: rgba(0, 102, 255, 0.02);
}

.filter-option.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-surface);
}

/* === DARK MODE UX FEATURES === */
[data-theme="dark"] .search-suggestions {
    background: var(--neutral-100);
    border-color: var(--neutral-200);
}

[data-theme="dark"] .suggestion-item {
    border-bottom-color: var(--neutral-200);
}

[data-theme="dark"] .suggestion-item:hover,
[data-theme="dark"] .suggestion-item.selected {
    background: linear-gradient(135deg,
        rgba(88, 166, 255, 0.1) 0%,
        rgba(88, 166, 255, 0.05) 100%);
}

[data-theme="dark"] .search-filters-panel {
    background: var(--neutral-100);
    border-color: var(--neutral-200);
}

[data-theme="dark"] .filters-header {
    border-bottom-color: var(--neutral-200);
}

[data-theme="dark"] .filters-close {
    background: var(--neutral-200);
}

[data-theme="dark"] .filters-close:hover {
    background: var(--neutral-300);
}

[data-theme="dark"] .filter-option {
    background: var(--neutral-200);
    border-color: var(--neutral-300);
    color: var(--neutral-700);
}

[data-theme="dark"] .filter-option:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

[data-theme="dark"] .filter-option.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-surface);
}

/* === PERFORMANCE OPTIMIZATIONS 2025+ === */
/* Critical rendering path optimizations */
.search-form,
.search-input,
.search-button,
.voice-search-button {
    will-change: transform, box-shadow, background-color;
    transform: translateZ(0);
}

/* Reduce layout thrashing */
.result-card,
.citation-card,
.suggestion-item {
    contain: layout style paint;
}

/* Optimize animations for 60fps */
@media (prefers-reduced-motion: no-preference) {
    .search-form,
    .result-card,
    .citation-card {
        animation-duration: 0.3s;
        animation-timing-function: var(--ease-out-expo);
    }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === ACCESSIBILITY ENHANCEMENTS WCAG AAA === */
/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --brand-primary: #0052CC;
        --neutral-400: #666666;
        --neutral-500: #4A4A4A;
        --neutral-600: #333333;
    }

    .search-form {
        border-width: 2px;
    }

    .search-button {
        border: 2px solid var(--brand-primary);
    }

    .result-card {
        border-width: 2px;
    }
}

/* Clean focus indicators */
.search-input:focus {
    outline: none;
}

.search-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.voice-search-button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.nav-link:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.theme-switch:focus-within {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--brand-primary);
    color: var(--brand-surface);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius);
    z-index: 10000;
    transition: top var(--transition);
}

.skip-to-content:focus {
    top: 6px;
}

/* Screen reader optimizations */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Ensure sufficient color contrast */
.search-input::placeholder {
    color: var(--neutral-500); /* 4.5:1 contrast ratio */
}

.citation-url {
    color: var(--neutral-600); /* 4.5:1 contrast ratio */
}

/* === PRINT STYLES === */
@media print {
    .app-header,
    .search-form,
    .voice-search-button,
    .theme-switch-container,
    .search-suggestions,
    .search-filters-panel {
        display: none !important;
    }

    .search-section {
        min-height: auto;
        padding: 0;
    }

    .results-container {
        padding: 0;
    }

    .result-card {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
        margin-bottom: 1rem;
    }

    .quick-answer {
        background: none;
        border: 2px solid #000;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* === MOBILE PERFORMANCE OPTIMIZATIONS === */
@media (max-width: 768px) {
    /* Reduce backdrop blur on mobile for better performance */
    .search-form,
    .app-header {
        backdrop-filter: var(--backdrop-blur-sm);
        -webkit-backdrop-filter: var(--backdrop-blur-sm);
    }

    /* Optimize touch targets */
    .search-button,
    .voice-search-button,
    .nav-link,
    .theme-switch {
        min-height: 44px;
        min-width: 44px;
    }

    /* Reduce motion on mobile to save battery */
    .result-card:hover {
        transform: none;
    }
}

/* === PROGRESSIVE ENHANCEMENT === */
/* Base styles work without JavaScript */
.search-suggestions,
.search-filters-panel {
    display: none;
}

/* Enhanced styles when JavaScript is available */
.js-enabled .search-suggestions,
.js-enabled .search-filters-panel {
    display: block;
}

/* === UTILITY CLASSES === */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.no-scroll {
    overflow: hidden;
}

.fade-in {
    animation: fadeInUp 0.6s var(--ease-out-expo);
}

.scale-in {
    animation: scaleIn 0.4s var(--ease-out-expo);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
