/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimized Performance Settings */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Selective GPU Acceleration - only for active animations */
.btn-primary:hover, .btn-secondary:hover, .search-container input:focus, .search-container button:hover {
    will-change: transform, opacity, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Remove will-change from static elements */
.fade-in, .feature-card {
    backface-visibility: hidden;
}

/* Lazy loading optimization */
img {
    loading: lazy;
    decoding: async;
}

/* Core Web Vitals Optimizations */
.hero, .features, .pricing {
    contain: layout style paint;
}

/* Prevent layout shift with proper aspect ratios */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px; /* Account for fixed header */
}

/* Tooltip animations for smooth UX */
@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.search-limit-tooltip {
    animation: tooltipFadeIn 0.3s ease;
}

/* Showcase Target Button Styles */
.showcase-target-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.showcase-target-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4) !important;
}

.showcase-target-btn:active {
    transform: translateY(0) scale(1);
}

/* Responsive showcase targets */
@media (max-width: 768px) {
    .showcase-targets {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem !important;
    }
    
    .showcase-target-btn {
        min-width: 280px !important;
        padding: 14px 24px !important;
    }
}

/* Upgrade modal styling */
.upgrade-modal-content {
    background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.3);
}

.upgrade-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upgrade-modal-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.upgrade-modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.upgrade-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.upgrade-actions button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Trial invite modal styling */
.trial-modal-content {
    background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.3);
}

.trial-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.trial-benefits {
    margin: 1.5rem 0;
    text-align: left;
}

.benefit-item {
    color: var(--primary-blue);
    margin: 0.5rem 0;
    font-weight: 500;
}

.trial-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.trial-actions button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

:root {
    /* Premium Color System */
    --primary-blue: #1e40af;
    --primary-purple: #7c3aed;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    
    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #7c3aed 50%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --gradient-surface: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.8) 100%);
    --gradient-glass: linear-gradient(145deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
    
    /* Advanced Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-bg-strong: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --glass-blur: blur(20px);
    
    /* Premium Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-tertiary: #4b5563;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --text-gradient: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    
    /* Premium Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-neural: radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.1) 0%, transparent 50%), 
                radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Typography */
    --font-sans: '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;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-neural);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container System */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: var(--text-white);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--text-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-sm);
}

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

/* Early Bird Banner Animations */
@keyframes bannerSlideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bannerSlideOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100%); opacity: 0; }
}

.early-bird-banner {
    position: fixed !important;
    top: 80px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999 !important;
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 50%, #d97706 100%) !important;
    color: white !important;
    padding: 12px 0 !important;
    text-align: center !important;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    display: block !important;
    transition: transform 0.5s ease !important;
}

.early-bird-banner.hidden {
    animation: bannerSlideOut 0.5s ease forwards;
}

/* Mobile responsive banner */
@media (max-width: 768px) {
    .early-bird-banner {
        padding: 10px 0 !important;
        font-size: 0.9rem !important;
    }
    
    .early-bird-banner > div {
        gap: 10px !important;
        padding: 0 15px !important;
    }
}

/* REFINED: Enhanced Header Layout - Fixed positioning for universal access */
.header {
    background: var(--gradient-glass);
    backdrop-filter: blur(12px); /* Reduced blur for better performance */
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* Higher z-index for modals */
    padding: 16px 0; /* Fixed padding instead of variable */
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(25px);
    box-shadow: var(--shadow-lg);
    padding: 12px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    min-height: 60px; /* Consistent header height */
}

/* Logo section improvements */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.2;
}

.tagline {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

/* REFINED: Header actions optimized for single CTA + nav toggle */
.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
}

/* Navigation Toggle (Hamburger Menu) */
.nav-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.nav-menu-toggle:hover span {
    background: var(--primary-blue);
}

/* Hide nav toggle on larger screens where we have space */
@media (min-width: 1024px) {
    .nav-menu-toggle {
        display: none;
    }
    
    /* Removed "Access Demo" content - no longer needed */
    .nav-toggle {
        display: flex;
    }
}

/* Mobile header optimizations */
@media (max-width: 768px) {
    .header {
        padding: 12px 0;
    }
    
    .header-content {
        min-height: 50px;
        gap: 8px;
    }
    
    .logo h1 {
        font-size: var(--font-size-lg);
    }
    
    .tagline {
        font-size: var(--font-size-xs);
    }
    
    .header-actions {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .tagline {
        display: none; /* Hide tagline on very small screens */
    }
    
    .logo h1 {
        font-size: var(--font-size-base);
    }
}

/* REFINED: Enhanced Button System - Clear hierarchy and consistent sizing */
.btn-primary, .btn-secondary, .btn-tertiary, .btn-primary-large, .btn-secondary-large, .btn-search, .pricing-btn, .auth-btn {
    font-family: inherit;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    min-height: 44px; /* Minimum touch target */
    min-width: 120px;
    line-height: 1.2;
}

/* Primary button - main CTA */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 12px 24px;
    font-size: var(--font-size-base);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 50%, #06b6d4 100%);
}

.btn-primary:focus {
    outline: none;
    box-shadow: var(--shadow-xl), 0 0 0 3px rgba(30, 64, 175, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

/* Secondary button - secondary CTA */
.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-blue);
    padding: 12px 24px;
    font-size: var(--font-size-base);
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(30, 64, 175, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.btn-secondary:focus {
    outline: none;
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(30, 64, 175, 0.3);
}

/* REFINED: Tertiary button - Try Free Demo - minimal styling */
.btn-tertiary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 12px 24px;
    font-size: var(--font-size-base);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.btn-tertiary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-1px);
}

.btn-tertiary:focus {
    outline: none;
    box-shadow: var(--shadow-sm), 0 0 0 3px rgba(30, 64, 175, 0.2);
}

.btn-tertiary:active {
    transform: translateY(0);
}

/* Large button variants */
.btn-primary-large, .btn-secondary-large {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
    min-height: 56px;
    min-width: 180px;
}

/* Mobile responsive button adjustments */
@media (max-width: 768px) {
    .btn-primary, .btn-secondary, .btn-tertiary {
        padding: 14px 20px;
        font-size: var(--font-size-sm);
        min-width: 140px;
    }
    
    .btn-primary-large, .btn-secondary-large {
        padding: 14px 24px;
        font-size: var(--font-size-base);
        min-width: 160px;
    }
    
    /* Ensure text doesn't overflow on small screens */
    .btn-primary, .btn-secondary, .btn-primary-large, .btn-secondary-large {
        max-width: calc(100vw - 32px);
        text-overflow: ellipsis;
        overflow: hidden;
    }
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-enterprise {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(147, 51, 234, 0.2);
}

.btn-enterprise:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(147, 51, 234, 0.3);
    background: linear-gradient(135deg, #8b5cf6 0%, #9333ea 100%);
}

.btn-primary-large {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
    min-width: 320px;
    text-align: center;
}

.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary-large {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
    border: 2px solid var(--primary-blue);
    border-radius: var(--radius-lg);
}

.btn-secondary-large:hover {
    background: var(--primary-blue);
    color: var(--text-white);
}

.btn-search {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-base);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    display: block;
}

.stat-label {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Enhanced Search Section - Improved UX and responsive design */
.search-section {
    padding: var(--spacing-2xl) 0;
    background: var(--gradient-secondary);
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-neural);
    opacity: 0.7;
    z-index: 1;
}

.search-section .container {
    position: relative;
    z-index: 2;
}

.search-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.search-content h3 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    margin-bottom: var(--spacing-xl);
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Enhanced search container with better UX */
.search-container {
    display: flex;
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-container:focus-within {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(30, 64, 175, 0.2);
    transform: translateY(-2px);
}

/* Enhanced search input with better accessibility */
.search-container input, #authSearchInput {
    flex: 1;
    padding: 18px 24px;
    border: none;
    font-size: var(--font-size-lg);
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

.search-container input::placeholder, #authSearchInput::placeholder {
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.search-container input:focus::placeholder, #authSearchInput:focus::placeholder {
    color: var(--text-light);
}

/* Enhanced search button */
.search-container button, #authSearchBtn {
    padding: 18px 28px;
    background: var(--gradient-primary);
    color: var(--text-white);
    border: none;
    font-weight: 600;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    justify-content: center;
}

.search-container button:hover, #authSearchBtn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 50%, #06b6d4 100%);
    transform: translateX(2px);
}

.search-container button:active, #authSearchBtn:active {
    transform: translateX(0);
}

/* Mobile search optimizations */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        border-radius: var(--radius-lg);
        max-width: 100%;
        margin: 0 var(--spacing-sm) var(--spacing-xl);
    }
    
    .search-container input, #authSearchInput {
        padding: 16px 20px;
        font-size: var(--font-size-base);
        border-bottom: 1px solid rgba(30, 64, 175, 0.1);
    }
    
    .search-container button, #authSearchBtn {
        padding: 16px 20px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        min-height: 50px;
    }
    
    .search-content h3 {
        font-size: var(--font-size-2xl);
    }
}

.search-suggestions {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.search-suggestions span {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.suggestion-btn {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-btn:hover {
    background: var(--primary-blue);
    color: var(--text-white);
    border-color: var(--primary-blue);
}

/* Results Section */
.results-section {
    padding: var(--spacing-2xl) 0;
}

.results-content {
    display: grid;
    gap: var(--spacing-lg);
}

.result-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    width: 100%;
}

/* Enhanced Modal System - Consistent across all modals */
.modal-overlay, .oauth-modal, .waitlist-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-md);
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(12px);
    }
}

.modal-content, .oauth-modal-content, .waitlist-modal-content {
    background: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    position: relative;
    animation: modalSlideIn 0.4s ease;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from { 
        transform: translateY(30px) scale(0.95); 
        opacity: 0;
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1;
    }
}

/* Modal close button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

/* PERFORMANCE: Success animation and modal auto-close functionality */
.modal-overlay.success, .oauth-modal.success, .waitlist-modal.success, .modal.success {
    animation: modalSuccessOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalSuccessOut {
    0% { opacity: 1; transform: scale(1); }
    20% { transform: scale(1.02); }
    100% { opacity: 0; transform: scale(0.95) translateY(-20px); visibility: hidden; }
}

/* PERFORMANCE: Success confirmation message */
.modal-success-message {
    display: none;
    background: linear-gradient(135deg, #10b981 0%, #065f46 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.modal-success-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Modal mobile optimizations */
@media (max-width: 768px) {
    .modal-overlay, .oauth-modal, .waitlist-modal {
        padding: var(--spacing-sm);
    }
    
    .modal-content, .oauth-modal-content, .waitlist-modal-content {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        max-height: calc(100vh - 1rem);
    }
}

.oauth-modal-content {
    background: var(--gradient-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.oauth-modal-content h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.oauth-modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.oauth-modal-content input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
}

.oauth-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.oauth-buttons button {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

/* Comprehensive Mobile Optimizations */
@media (max-width: 768px) {
    .result-card {
        padding: 1.75rem 1.5rem !important;
        margin: 0 0 2rem 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden;
        overflow-wrap: break-word;
        word-break: break-word;
        min-width: 0;
        box-sizing: border-box !important;
        background: var(--glass-bg-strong) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: var(--radius-lg) !important;
        backdrop-filter: var(--glass-blur) !important;
    }
    
    .result-title {
        font-size: 1.5rem !important;
        line-height: 1.4;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
        font-weight: 700 !important;
        color: var(--text-primary) !important;
        margin-bottom: 1.25rem !important;
    }
    
    /* Hero mobile adjustments */
    .hero-title {
        font-size: var(--font-size-3xl);
        line-height: 1.3;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
        flex-direction: column;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: center;
    }
    
    /* Performance cards mobile */
    .performance-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .performance-card {
        padding: var(--spacing-md);
    }
    
    /* Better touch targets */
    .suggestion-btn {
        min-height: 44px;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
    }
    
    .performance-card {
        padding: var(--spacing-sm);
    }
    
    .performance-header h4 {
        font-size: var(--font-size-base);
    }
    
    .performance-score {
        font-size: var(--font-size-2xl);
    }
    
    .confidence-badge {
        max-width: 120px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
    
    .result-insights {
        font-size: var(--font-size-sm);
        max-width: 100%;
        overflow-wrap: break-word;
    }
    
    .result-insights li {
        margin-bottom: var(--spacing-xs);
        line-height: 1.5;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* Search result containers - mobile friendly styling */
.result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
}

/* Ensure all text content respects mobile boundaries */
.result-card * {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Force all search result containers to be mobile-friendly - ENHANCED FOR READABILITY */
.executive-summary-container,
.opportunity-section,
.metric-card,
.analysis-metric,
.insight-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.75rem 1.5rem !important;
    margin: 0 0 2rem 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    backdrop-filter: var(--glass-blur) !important;
}

.metric-card h4,
.analysis-metric h4,
.insight-card h4 {
    font-size: 1.375rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1.25rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.metric-card p,
.analysis-metric p,
.insight-card p {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 1rem !important;
}

/* Ensure text elements are properly sized */
.executive-summary-container h1,
.executive-summary-container h2,
.executive-summary-container h3,
.executive-summary-container h4 {
    font-size: 1.125rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.75rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Performance optimizations */

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.result-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.confidence-badge {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.result-insights {
    list-style: none;
}

.result-insights li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.result-insights li:last-child {
    border-bottom: none;
}

.upgrade-prompt {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-md);
}

.upgrade-prompt h4 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.upgrade-prompt p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* Features Section */
.features {
    padding: var(--spacing-2xl) 0;
    background: var(--gradient-surface);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-neural);
    opacity: 0.3;
    z-index: 1;
}

.features .container {
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: var(--font-size-3xl);
    font-weight: 800;
    margin-bottom: var(--spacing-xl);
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: var(--gradient-glass);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    z-index: 1;
}

.feature-card > * {
    position: relative;
    z-index: 2;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(30, 64, 175, 0.3);
}

.feature-icon {
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-card h4 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: var(--font-size-base);
}

/* Pricing Section */
.pricing {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-secondary);
    position: relative;
}



/* Hide Early Bird banner when revenue target reached */
.pricing.hide-early-bird-banner::before,
.pricing.hide-early-bird-banner .early-bird-text {
    display: none !important;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    position: relative;
}

.pricing-card.featured {
    transform: scale(1.05);
    border: 2px solid var(--primary-blue);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.pricing-header h4 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.price {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--primary-blue);
}

.price span {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--spacing-lg);
}

.pricing-features li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
}

.pricing-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-md);
    font-size: var(--font-size-base);
    border-radius: var(--radius-md);
}

.pricing-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* AI Performance Section */
.ai-performance {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.performance-card {
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.performance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.performance-card.primary {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(30, 64, 175, 0.3);
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.performance-header h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.performance-score {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.performance-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.performance-advantage {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-sm);
}

.performance-metric {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--font-size-sm);
}

.performance-metric:last-child {
    border-bottom: none;
}

/* Modal System */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: var(--glass-blur);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.fade-out .modal-content {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: var(--font-size-2xl);
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-content h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    color: var(--text-primary);
}

.modal-content form {
    display: grid;
    gap: var(--spacing-md);
}

.modal-content input,
.modal-content select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    outline: none;
    transition: border-color 0.2s ease;
}

.modal-content input:focus,
.modal-content select:focus {
    border-color: var(--primary-blue);
}

.auth-divider {
    text-align: center;
    color: var(--text-secondary);
    margin: var(--spacing-lg) 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--glass-border);
    z-index: 1;
}

.auth-divider {
    background: var(--bg-primary);
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 2;
}

.auth-options {
    display: grid;
    gap: var(--spacing-sm);
}

.auth-btn {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
}

.auth-btn:hover {
    background: var(--bg-secondary);
}

.auth-btn.google:hover {
    background: #ea4335;
    color: var(--text-white);
    border-color: #ea4335;
}

.auth-btn.apple:hover {
    background: #000000;
    color: var(--text-white);
    border-color: #000000;
}

.auth-btn.microsoft:hover {
    background: #0078d4;
    color: var(--text-white);
    border-color: #0078d4;
}

.waitlist-stats {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
}

.waitlist-stats h4 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.waitlist-stats p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .hero-stats {
        gap: var(--spacing-md);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary-large,
    .btn-secondary-large {
        width: 100%;
        max-width: 350px;
        font-size: var(--font-size-sm);
        padding: var(--spacing-sm) var(--spacing-lg);
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .btn-search {
        border-radius: var(--radius-md);
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
}

/* Enhanced Showcase Target Details */
.showcase-target-details {
    margin: 16px 0;
    flex-grow: 1;
}

.showcase-description-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.showcase-highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.showcase-highlight {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.highlight-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(34, 197, 94, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Update showcase button height */
.showcase-target-btn {
    min-height: 280px;
}

/* Enhanced Search Section for Premium UI */
.search-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    position: relative;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.search-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.search-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: white;
    font-weight: 600;
}

.search-container {
    display: flex;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    background: var(--gradient-glass);
    backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.search-container:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

#searchInput, #authSearchInput {
    flex: 1;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 28px;
    font-size: 18px;
    color: var(--text-primary);
    outline: none;
    font-weight: 500;
    border-radius: 16px;
    transition: all 0.3s ease;
}

#searchInput::placeholder, #authSearchInput::placeholder {
    color: var(--text-secondary);
}

#searchBtn, #authSearchBtn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 20px 36px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

#searchBtn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.demo-notice {
    background: rgba(245, 158, 11, 0.1) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 24px !important;
    text-align: center !important;
    color: #fbbf24 !important;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

/* OAuth Modal Styling */
.oauth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.oauth-modal-content {
    background: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.oauth-modal-content h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.oauth-modal-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.oauth-modal-content .form-input {
    width: 100%;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
}

.oauth-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

.oauth-buttons button {
    flex: 1;
}

/* Performance Optimizations */
* {
    will-change: auto;
}

/* Reduce reflows with GPU acceleration for animations */
.btn-primary-large,
.btn-secondary-large,
.btn-search,
.auth-btn,
.pricing-card {
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Lazy loading for background images */
.hero::before {
    content-visibility: auto;
    contain-intrinsic-size: 100vh;
}

/* Enhanced OAuth button styling */
.auth-btn {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.auth-btn:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.auth-btn.google:hover {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.auth-btn.microsoft:hover {
    background: #0078d4;
    color: white;
    border-color: #0078d4;
}

.auth-btn.apple:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

/* Microsoft OAuth button styling */
.auth-btn.microsoft {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn.microsoft:hover {
    background: #0078d4;
    color: white;
    border-color: #0078d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

/* PERFORMANCE: Enhanced mobile responsiveness and UX improvements */
@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 4rem;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .btn-primary-large, .btn-secondary-large, .btn-tertiary {
        width: 100%;
        min-height: 48px;
        padding: 16px 24px;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .header {
        padding: 1rem 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    }
    
    .header-content {
        padding: 0 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .search-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .search-input {
        width: 100%;
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }
    
    .results-content {
        padding: 0 1rem;
    }
    
    /* CRITICAL: Mobile-optimized search results styling for portrait mode - ENHANCED FOR MAXIMUM READABILITY */
    #resultsSection {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    #resultsContent {
        width: 100% !important;
        max-width: calc(100vw - 2rem) !important;
        padding: 0 1rem !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        display: block !important;
    }
    
    .executive-section {
        background: var(--glass-bg-strong);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-lg);
        padding: 1.75rem 1.5rem !important;
        margin: 0 0 2rem 0 !important;
        backdrop-filter: var(--glass-blur);
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        min-height: auto !important;
    }
    
    .executive-section h3 {
        font-size: 1.5rem !important;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 1.25rem;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    .summary-content {
        font-size: 1.125rem !important;
        line-height: 1.7 !important;
        color: var(--text-secondary);
    }
    
    .summary-content p {
        margin-bottom: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Table responsiveness for mobile */
    .assignee-table, 
    table {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.9rem !important;
        border-collapse: collapse;
        margin: 1rem 0;
        background: var(--bg-primary);
        border-radius: var(--radius-md);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        box-sizing: border-box !important;
    }
    
    .assignee-table th,
    .assignee-table td,
    table th,
    table td {
        padding: 1rem 0.75rem !important;
        text-align: left;
        border-bottom: 1px solid var(--glass-border);
        word-wrap: break-word;
        max-width: none !important;
        overflow-wrap: break-word;
        hyphens: auto;
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
        min-width: 0 !important;
        white-space: normal !important;
    }
    
    .assignee-table th,
    table th {
        background: var(--bg-secondary);
        font-weight: 600;
        color: var(--text-primary);
        font-size: 0.8rem;
    }
    
    /* Scrollable tables for very wide content */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1rem 0;
        border-radius: var(--radius-md);
        border: 1px solid var(--glass-border);
    }
    
    /* Analysis metrics styling */
    .metric-card,
    .analysis-metric {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin: 0.75rem 0;
        backdrop-filter: var(--glass-blur);
    }
    
    .metric-card h4,
    .analysis-metric h4 {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary-blue);
        margin-bottom: 0.25rem;
    }
    
    .metric-description {
        font-size: 0.85rem;
        color: var(--text-secondary);
        line-height: 1.4;
    }
    
    /* List styling in results */
    .results-content ul,
    .executive-section ul {
        list-style: none;
        padding: 0;
        margin: 1rem 0;
    }
    
    .results-content li,
    .executive-section li {
        background: var(--bg-secondary);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-md);
        padding: 0.75rem;
        margin: 0.5rem 0;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Opportunity/whitespace section styling */
    .opportunity-section,
    .whitespace-section {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(6, 182, 212, 0.05));
        border: 1px solid rgba(16, 185, 129, 0.2);
        border-radius: var(--radius-lg);
        padding: 1.25rem;
        margin: 1rem 0;
    }
    
    .opportunity-item {
        background: var(--bg-primary);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin: 0.75rem 0;
        border-left: 4px solid var(--accent-emerald);
    }
    
    /* Risk assessment styling */
    .risk-section {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(220, 38, 38, 0.05));
        border: 1px solid rgba(239, 68, 68, 0.2);
        border-radius: var(--radius-lg);
        padding: 1.25rem;
        margin: 1rem 0;
    }
    
    .risk-item {
        background: var(--bg-primary);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin: 0.75rem 0;
        border-left: 4px solid #ef4444;
    }
    
    /* Citation and reference styling */
    .citation,
    .reference {
        font-size: 0.8rem;
        color: var(--text-tertiary);
        background: var(--bg-tertiary);
        padding: 0.5rem;
        border-radius: var(--radius-sm);
        margin: 0.5rem 0;
        border-left: 3px solid var(--primary-blue);
    }
    
    /* Charts and graphs placeholder styling */
    .chart-container,
    .graph-container {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-lg);
        padding: 1.5rem 1rem;
        margin: 1rem 0;
        text-align: center;
        min-height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    
    .chart-placeholder {
        color: var(--text-secondary);
        font-size: 0.9rem;
        background: var(--bg-secondary);
        padding: 1rem;
        border-radius: var(--radius-md);
        width: 100%;
    }
    
    .modal-content, .oauth-modal-content, .waitlist-modal-content {
        margin: 1rem;
        padding: 2rem 1.5rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
        flex-direction: column;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        border-radius: 4px;
        transition: background-color 0.2s;
    }
    
    .nav-toggle:hover {
        background-color: rgba(59, 130, 246, 0.1);
    }
    
    .nav-toggle span {
        height: 2px;
        background: #374151;
        margin: 2px 0;
        transition: all 0.3s ease;
        border-radius: 1px;
    }
}

/* PERFORMANCE: Ultra-small mobile optimizations (480px and below) */
@media (max-width: 480px) {
    /* CRITICAL: Ultra-small mobile search results full width */
    .results-container, #results, .search-results, .analysis-results {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 -0.75rem !important;
        padding: 0.75rem !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .result-bubble {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px !important;
        font-size: 0.9rem !important;
        margin: 0 0 0.75rem 0 !important;
    }

    .analysis-section {
        padding: 1rem !important;
        margin: 0 0 1rem 0 !important;
    }

    .hero {
        padding: 4rem 0 3rem;
    }
    
    .hero h1 {
        font-size: 1.875rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        max-width: 280px;
    }
    
    .modal-content, .oauth-modal-content, .waitlist-modal-content {
        margin: 0.5rem;
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    
    .btn-primary-large, .btn-secondary-large, .btn-tertiary {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .search-input {
        min-height: 44px;
        padding: 10px 14px;
    }
    
    .features-grid {
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    /* ULTRA-MOBILE: Search results optimizations for smallest screens */
    .results-content {
        padding: 0 0.5rem;
        gap: 0.75rem;
        display: flex;
        flex-direction: column;
        width: 100%;
        box-sizing: border-box;
    }
    
    .executive-section,
    .analysis-section,
    .metric-card,
    .analysis-metric,
    .insight-card,
    .opportunity-section,
    .whitespace-section,
    .risk-section {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        margin: 0 0 1rem 0 !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
        min-height: auto !important;
    }
    
    .executive-section {
        order: 1;
    }
    
    .executive-section h3 {
        font-size: 1.125rem !important;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .summary-content {
        font-size: 0.95rem;
        line-height: 1.6;
        text-align: left;
    }
    
    /* Enhanced mobile table styling */
    .assignee-table,
    table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-collapse: collapse;
        margin: 1rem 0;
    }
    
    .assignee-table th,
    .assignee-table td,
    table th,
    table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        min-width: 80px;
        text-align: left;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .assignee-table th,
    table th {
        background: var(--glass-bg);
        font-weight: 600;
        color: var(--text-primary);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    /* Mobile-optimized metric cards */
    .metric-card h4,
    .analysis-metric h4 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .metric-value {
        font-size: 1.5rem !important;
        font-weight: 700;
        color: var(--primary-blue);
        margin: 0.5rem 0;
    }
    
    .metric-description {
        font-size: 0.9rem;
        line-height: 1.5;
        color: var(--text-secondary);
    }
    
    /* Enhanced opportunity and risk sections */
    .opportunity-item,
    .risk-item {
        padding: 1rem;
        margin: 0.75rem 0;
        border-radius: var(--radius-md);
        background: var(--bg-primary);
        border-left: 4px solid var(--accent-emerald);
    }
    
    .risk-item {
        border-left-color: #ef4444;
    }
    
    /* Enhanced mobile list styling */
    .results-content li,
    .executive-section li {
        padding: 0.75rem;
        font-size: 0.9rem;
        line-height: 1.5;
        margin: 0.5rem 0;
        background: var(--bg-secondary);
        border-radius: var(--radius-sm);
        border-left: 3px solid var(--primary-blue);
    }
    
    .results-content ul,
    .executive-section ul {
        padding-left: 0;
        list-style: none;
    }
    
    /* Mobile-optimized buttons and actions */
    .btn-primary,
    .btn-secondary,
    .btn-tertiary {
        min-height: 48px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        border-radius: var(--radius-md) !important;
        width: 100% !important;
        margin: 0.5rem 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Mobile search input optimization */
    .search-input,
    input[type="text"],
    input[type="email"] {
        min-height: 48px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: var(--radius-md) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Enhanced mobile modal styling */
    .modal-overlay {
        padding: 1rem !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .modal-content,
    .oauth-modal-content,
    .waitlist-modal-content {
        width: 100% !important;
        max-width: none !important;
        max-height: calc(100vh - 2rem) !important;
        margin: 0 !important;
        border-radius: var(--radius-lg) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .chart-container,
    .graph-container {
        padding: 1rem 0.75rem;
        min-height: 150px;
    }
    
    .chart-placeholder {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .citation,
    .reference {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    /* CRITICAL: Additional search section mobile fixes */
    .search-section, #search-section {
        padding: 1rem 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Fix for tables in search results - make them stack vertically */
    table, .assignee-table, .analysis-table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        font-size: 0.75rem !important;
    }

    table th, table td {
        padding: 0.25rem !important;
        font-size: 0.7rem !important;
        max-width: 60px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

/* ULTRA-MOBILE PORTRAIT: Specific optimizations for phone portrait mode (max-width: 430px) */
@media (max-width: 430px) and (orientation: portrait) {
    /* Enhanced results content layout for portrait mobile - prevent panel squeezing */
    .results-content, #resultsContent, .results-section .container {
        margin: 0 !important;
        padding: 0.75rem 0.5rem !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
        width: 100% !important;
        min-height: auto !important;
        max-width: 100% !important;
    }
    
    /* Override any grid layouts that might be causing squeezing */
    .results-section, 
    .results-section .container,
    .results-content,
    #resultsContent {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        grid-template-rows: none !important;
        grid-gap: 0 !important;
        column-gap: 0 !important;
        row-gap: 1.25rem !important;
    }

    /* Force all result panels to be full-width and readable - no side-by-side stacking */
    .result-bubble,
    .analysis-section,
    .executive-section,
    .executive-summary-container,
    .metric-card,
    .analysis-metric,
    .insight-card,
    .opportunity-section,
    .whitespace-section,
    .risk-section,
    .search-result-item,
    .patent-result,
    .clinical-result,
    .analysis-panel,
    .intelligence-panel {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 1.5rem 1.25rem !important;
        box-sizing: border-box !important;
        margin: 0 0 1.25rem 0 !important;
        flex: none !important;
        display: block !important;
        position: relative !important;
        float: none !important;
        clear: both !important;
        transform: none !important;
        flex-basis: auto !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }
    
    /* Prevent any container from constraining search results */
    .container, 
    .search-container,
    .results-container,
    .content-wrapper {
        max-width: 100% !important;
        padding: 0 0.5rem !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }

    /* Enhanced typography for mobile readability - larger text for easier reading */
    .executive-section h3,
    .analysis-section h3,
    .metric-card h4,
    .analysis-metric h4,
    .insight-card h4 {
        font-size: 1.375rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
        color: var(--text-primary) !important;
        font-weight: 600 !important;
        word-wrap: break-word !important;
    }

    .executive-section p,
    .analysis-section p,
    .metric-card p,
    .analysis-metric p,
    .insight-card p {
        font-size: 1.1rem !important;
        line-height: 1.7 !important;
        margin-bottom: 0.875rem !important;
        color: var(--text-secondary) !important;
        word-wrap: break-word !important;
    }

    /* Improve list readability on mobile - card-like appearance */
    .results-content ul,
    .executive-section ul,
    .analysis-section ul {
        padding-left: 0 !important;
        margin: 1.25rem 0 !important;
        list-style: none !important;
    }

    .results-content li,
    .executive-section li,
    .analysis-section li {
        padding: 1.25rem !important;
        margin: 0.875rem 0 !important;
        background: var(--bg-secondary) !important;
        border-radius: var(--radius-md) !important;
        border-left: 4px solid var(--primary-blue) !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
        box-sizing: border-box !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    }

    /* Enhanced tables for mobile - scroll horizontally with better padding */
    .assignee-table,
    table {
        width: 100% !important;
        margin: 1.25rem 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: var(--radius-md) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    }

    .assignee-table th,
    .assignee-table td,
    table th,
    table td {
        padding: 1rem 0.875rem !important;
        font-size: 0.95rem !important;
        min-width: 120px !important;
        text-align: left !important;
        border-bottom: 1px solid var(--glass-border) !important;
        background: var(--bg-primary) !important;
    }

    .assignee-table th,
    table th {
        background: var(--glass-bg) !important;
        font-weight: 600 !important;
        color: var(--text-primary) !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }

    /* Metric values more prominent on mobile - emphasis on key numbers */
    .metric-value {
        font-size: 2.25rem !important;
        font-weight: 700 !important;
        color: var(--primary-blue) !important;
        margin: 1.25rem 0 !important;
        display: block !important;
        text-align: center !important;
    }

    .metric-description {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
        color: var(--text-secondary) !important;
        text-align: center !important;
    }

    /* Opportunity and risk items - improved mobile layout */
    .opportunity-item,
    .risk-item {
        padding: 1.25rem !important;
        margin: 1rem 0 !important;
        border-radius: var(--radius-md) !important;
        background: var(--bg-primary) !important;
        border-left: 4px solid var(--accent-emerald) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .risk-item {
        border-left-color: #ef4444 !important;
    }

    /* Enhanced modal layout for mobile portrait */
    .modal-overlay {
        padding: 0.5rem !important;
        align-items: flex-start !important;
        padding-top: 2rem !important;
    }

    .modal-content,
    .oauth-modal-content,
    .waitlist-modal-content {
        width: calc(100% - 1rem) !important;
        max-width: none !important;
        max-height: calc(100vh - 3rem) !important;
        margin: 0 auto !important;
        border-radius: var(--radius-lg) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Ultimate anti-squeezing rules for mobile search results */
    .results-content *,
    #resultsContent *,
    .results-section * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Force single-column layout for all search result children */
    .results-content > *,
    #resultsContent > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
        grid-column: 1 / -1 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
        position: relative !important;
        float: none !important;
        clear: both !important;
    }
}

/* PERFORMANCE: Tablet optimization (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        padding: 8rem 0 6rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .modal-content, .oauth-modal-content, .waitlist-modal-content {
        max-width: 520px;
        padding: 3rem;
    }
}

/* PERFORMANCE: Enhanced link button styling for Access Free Demo */
a.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
}

a.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

a.btn-secondary:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.hidden { display: none; }

/* Critical path CSS compression */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
.visible { display: block; }

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* COMPREHENSIVE MOBILE FIXES - Added June 28, 2025 */
/* CRITICAL: Search Results Full Width Mobile Fix */
.results-container, #results, .search-results, .analysis-results {
    width: 100vw;
    max-width: 100vw;
    margin: 0 -1rem; /* Negative margin to counteract container padding */
    padding: 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
    width: 100%;
}

.result-bubble {
    max-width: calc(100vw - 40px);
    padding: 12px 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-overflow: ellipsis;
    overflow: hidden;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
}

@media (max-width: 768px) {
    /* CRITICAL: Full width search results on mobile portrait */
    .results-container, #results, .search-results, .analysis-results {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 -1rem !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        position: relative;
        left: 0;
        right: 0;
    }

    /* Ensure all child elements respect the full-width container */
    .results-container *, #results *, .search-results *, .analysis-results * {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }

    .result-bubble {
        max-width: 100% !important;
        width: 100% !important;
        padding: 16px !important;
        font-size: 1rem !important;
        margin: 0 0 1rem 0 !important;
        box-sizing: border-box !important;
    }
    
    .result-bubble h4 {
        font-size: 1rem;
        line-height: 1.3;
        word-break: break-word;
    }
    
    .result-bubble p {
        font-size: 0.85rem;
        line-height: 1.4;
        word-break: break-word;
        margin-top: 6px;
    }
    
    .analysis-section {
        padding: 1.5rem !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        margin: 0 0 1.5rem 0 !important;
        background: var(--glass-bg) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: var(--radius-lg) !important;
        backdrop-filter: var(--glass-blur) !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
    
    .analysis-section h4 {
        font-size: 1.375rem !important;
        font-weight: 600 !important;
        color: var(--text-primary) !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    .analysis-section p {
        font-size: 1.05rem !important;
        line-height: 1.7 !important;
        color: var(--text-secondary) !important;
        margin-bottom: 1.25rem !important;
    }
    
    .analysis-section ul {
        font-size: 1.05rem !important;
        line-height: 1.7 !important;
        padding-left: 1.5rem !important;
    }
    
    .analysis-section li {
        margin-bottom: 0.875rem !important;
        color: var(--text-secondary) !important;
    }
    
    .upgrade-hint {
        padding: 12px;
        font-size: 0.9rem;
        max-width: calc(100vw - 40px);
        text-align: center;
        background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
        color: white;
        border-radius: 8px;
        margin: 10px 0;
        animation: pulse 2s infinite;
    }
}

/* Showcase Targets Section */
.showcase-section {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.showcase-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(30, 64, 175, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.showcase-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.showcase-content h3 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.showcase-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.6;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.showcase-target-btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 64, 175, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.1);
}

.showcase-target-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.02) 0%, rgba(124, 58, 237, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.showcase-target-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(30, 64, 175, 0.15);
    border-color: rgba(30, 64, 175, 0.3);
    background: rgba(255, 255, 255, 1);
}

.showcase-target-btn:hover::before {
    opacity: 1;
}

.showcase-target-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.showcase-target-header h4 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.showcase-badge {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.showcase-badge.premium {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.showcase-target-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.showcase-stat {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.showcase-stat-number {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.showcase-stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .showcase-target-btn {
        padding: var(--spacing-lg);
    }
    
    .showcase-target-header h4 {
        font-size: var(--font-size-xl);
    }
    
    .showcase-target-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    /* EGFR Showcase Mobile Optimization */
    .showcase-grid-single {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 var(--spacing-sm);
    }

    .showcase-target-btn.premium {
        max-width: 100% !important;
        width: 100% !important;
        padding: var(--spacing-lg) !important;
        margin: 0 !important;
    }

    .showcase-target-header h4 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 0.5rem !important;
    }

    .showcase-description-text {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin: 0.75rem 0 !important;
    }

    .showcase-highlights {
        gap: 0.5rem;
    }

    .showcase-highlight {
        margin-bottom: 0.5rem !important;
        display: block;
    }

    .showcase-highlight .highlight-label {
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.75rem !important;
    }

    .showcase-highlight .highlight-text {
        font-size: 0.75rem !important;
        line-height: 1.3;
        margin-left: 0 !important;
    }

    .showcase-target-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
        margin: 1rem 0 !important;
    }

    .showcase-stat-number {
        font-size: 1.25rem !important;
    }

    .showcase-stat-label {
        font-size: 0.625rem !important;
    }
}

/* Enhanced Mobile Responsiveness - 320px to 1024px */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .hero {
        min-height: 90vh;
        padding: 1.5rem 1rem;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Hero Section Mobile */
    .hero {
        padding: 2rem var(--spacing-md) !important;
        text-align: center;
        min-height: 100vh;
    }
    
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero .subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.4;
    }
    
    .btn-primary, .btn-secondary {
        width: 100% !important;
        max-width: 350px !important;
        font-size: 0.875rem !important;
        padding: 0.875rem 1.5rem !important;
        white-space: nowrap !important;
        margin: 0.5rem auto !important;
        display: block !important;
    }
    
    /* Features Section Mobile */
    .features {
        padding: 2rem var(--spacing-md) !important;
    }
    
    .features h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .feature-card {
        padding: 1.5rem !important;
        text-align: center;
    }
    
    .feature-card h3 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    .feature-card p {
        font-size: 0.875rem !important;
        line-height: 1.5;
    }
    
    /* AI Performance Section Mobile */
    .ai-performance {
        padding: 2rem var(--spacing-md) !important;
    }
    
    .ai-performance h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
        text-align: center;
    }
    
    .performance-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .performance-card {
        padding: 1.25rem !important;
        text-align: center;
    }
    
    .performance-card h3 {
        font-size: 1.125rem !important;
    }
    
    .performance-card .metric {
        font-size: 1.5rem !important;
    }
    
    /* Premium Features Mobile */
    .premium-features {
        padding: 2rem var(--spacing-md) !important;
    }
    
    .premium-features h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
        text-align: center;
    }
    
    .premium-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .premium-card {
        padding: 1.5rem !important;
        text-align: center;
    }
    
    .premium-card h3 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Navigation Mobile */
    .nav {
        padding: 0.75rem var(--spacing-md) !important;
    }
    
    .nav-content {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .nav-links {
        flex-direction: column !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    .nav-link {
        padding: 0.75rem !important;
        text-align: center !important;
        width: 100% !important;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* Modal Mobile */
    .modal-content {
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
        max-height: calc(100vh - 2rem) !important;
        overflow-y: auto !important;
        padding: 1.5rem !important;
    }
    
    .waitlist-form input,
    .waitlist-form select,
    .waitlist-form textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.875rem !important;
        width: 100% !important;
    }
    
    .waitlist-form button {
        width: 100% !important;
        padding: 0.875rem !important;
        font-size: 1rem !important;
    }
    
/* Enhanced Footer System */
.footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-top: 1px solid var(--glass-border);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-logo h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link:hover {
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
    margin-top: var(--spacing-md);
    text-align: center;
    width: 100%;
    opacity: 0.8;
}

    /* Footer Mobile optimizations */
    .footer {
        padding: 2rem var(--spacing-md) !important;
        text-align: center !important;
    }
    
    .footer-content {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .footer-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }
    
    .footer-link {
        font-size: 0.875rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile adjustments */
    .hero h1 {
        font-size: 1.75rem !important;
    }
    
    .hero .subtitle {
        font-size: 0.875rem !important;
    }
    
    .upgrade-modal-content,
    .trial-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .upgrade-actions,
    .trial-actions {
        flex-direction: column;
    }
    
    .showcase-target-stats {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    .features-grid,
    .performance-grid,
    .premium-grid {
        gap: 1rem !important;
    }
    
    .feature-card,
    .performance-card,
    .premium-card {
        padding: 1rem !important;
    }
    
    .btn-primary, .btn-secondary {
        font-size: 0.8rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    .modal-content {
        padding: 1rem !important;
    }
}

@media (max-width: 320px) {
    /* CRITICAL: Very small mobile search results full width */
    .results-container, #results, .search-results, .analysis-results {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 -0.5rem !important;
        padding: 0.5rem !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .result-bubble {
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px !important;
        font-size: 0.85rem !important;
        margin: 0 0 0.5rem 0 !important;
    }

    .analysis-section {
        padding: 0.75rem !important;
        margin: 0 0 0.75rem 0 !important;
    }

    /* Ensure search input container is also full width on very small screens */
    .search-container {
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
        margin: 0 auto 1rem auto !important;
        box-sizing: border-box !important;
    }

    #searchInput, #authSearchInput {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    /* Support for very small screens */
    .hero h1 {
        font-size: 1.5rem !important;
    }
    
    .container {
        padding: 0 0.75rem !important;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px !important;
        font-size: 0.875rem !important;
    }
    
    .upgrade-modal-content,
    .trial-modal-content {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .upgrade-icon,
    .trial-icon {
        font-size: 2rem;
    }
}
