/* ============================================================================
   AynalyxAI Web - Styles
   Intelligent Anomaly Detection
   ============================================================================ */

/* CSS Variables */
:root {
    /* Brand Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: rgba(99, 102, 241, 0.1);
    
    /* Anomaly Level Colors */
    --extreme: #7c3aed;
    --extreme-bg: #f5f3ff;
    --high: #ef4444;
    --high-bg: #fef2f2;
    --medium: #f59e0b;
    --medium-bg: #fffbeb;
    --low: #22c55e;
    --low-bg: #f0fdf4;
    
    /* Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================================================
   Privacy Badge (inline in navbar)
   ============================================================================ */
.privacy-badge {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: #16a34a;
    white-space: nowrap;
    margin-right: 8px;
}

.privacy-icon { font-size: 11px; }

/* ============================================================================
   Navigation
   ============================================================================ */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 900;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon-svg {
    flex-shrink: 0;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.5px;
}

/* Removed AI branding */

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary); }

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: var(--primary-dark);
    color: white !important;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    transition: all 0.2s;
    min-width: 44px;
}

.lang-toggle:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.lang-code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Language toggle mobile - ensure visibility */
@media (max-width: 768px) {
    .lang-toggle {
        padding: 8px 12px;
        min-width: 40px;
        margin-left: auto;
    }
}

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: var(--radius-lg);
}

.btn-block { width: 100%; }

.btn-icon { font-size: 18px; }

/* ============================================================================
   Hero Section - Conversion Optimized
   ============================================================================ */
.hero {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0d1b2a 100%);
    padding: 100px 0 80px;
    overflow: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background Effects */
.hero-bg-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 8s ease-in-out infinite;
}

.hero-gradient-orb.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.hero-gradient-orb.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    top: 50%;
    right: -150px;
    animation-delay: -3s;
}

.hero-gradient-orb.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.25) 0%, transparent 70%);
    bottom: -100px;
    left: 30%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.hero-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 80px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 620px;
}

/* Problem Badge */
.hero-problem-badge {
    display: inline-block;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fcd34d;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Title */
.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 28px;
    letter-spacing: -1.5px;
}

.hero-title-line {
    display: block;
    color: #ffffff;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.hero-title-line:nth-child(1) { animation-delay: 0.1s; }
.hero-title-line:nth-child(2) { animation-delay: 0.2s; }

.hero-title-highlight {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   NEW HERO ELEMENTS - Bilingual Badge, Trust List, Testimonial
   ============================================================================ */

/* Bilingual Badge */
.bilingual-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50px;
    padding: 10px 18px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.5s ease-out;
}

.bilingual-badge .flag {
    font-size: 1.3rem;
}

.bilingual-badge .quebec-note {
    opacity: 0.75;
    font-size: 0.85rem;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 24px;
    line-height: 1.6;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

/* Trust List */
.trust-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

.trust-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.trust-list .check {
    color: #22c55e;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Hero CTA Buttons */
.hero-cta-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

/* Hero Testimonial */
.hero-testimonial {
    margin-top: 24px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary);
    border-radius: 0 12px 12px 0;
    max-width: 400px;
    animation: fadeInUp 0.5s ease-out 0.5s both;
}

.testimonial-quote {
    font-style: italic;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.testimonial-author {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Desktop Only */
.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* ============================================================================
   STICKY MOBILE CTA BAR
   ============================================================================ */

.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .mobile-cta-bar {
        display: flex;
    }
    
    body {
        padding-bottom: 80px;
    }
}

.mobile-cta-btn {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-cta-btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.mobile-cta-btn.secondary {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

/* ============================================================================
   MOBILE HERO ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }
    
    .bilingual-badge {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .bilingual-badge .quebec-note {
        border-left: none;
        padding-left: 0;
        width: 100%;
        margin-top: 4px;
    }
    
    .hero-title {
        font-size: 1.9rem;
        line-height: 1.25;
    }
    
    .trust-list {
        grid-template-columns: 1fr;
        text-align: left;
        max-width: 280px;
        margin: 0 auto 24px;
    }
    
    .hero-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .hero-testimonial {
        text-align: left;
        margin: 20px auto 0;
        max-width: 320px;
    }
}

/* ============================================================================
   ROTATING HERO SLIDES (Value Propositions)
   ============================================================================ */

.hero-slides-container {
    position: relative;
    min-height: 100px;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.25s both;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    padding: 16px 24px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.slide-main {
    font-size: 18px;
    font-weight: 600;
    color: #e0e7ff;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.slide-sub {
    font-size: 15px;
    color: rgba(196, 181, 253, 0.85);
    margin: 0;
    font-style: italic;
    line-height: 1.4;
}

/* Slide Indicators (dots) */
.slide-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.slide-dot:hover {
    background: rgba(99, 102, 241, 0.5);
    transform: scale(1.15);
}

.slide-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}

/* Mobile responsive for slides */
@media (max-width: 640px) {
    .hero-slides-container {
        min-height: 110px;
    }
    
    .hero-slide {
        padding: 14px 16px;
    }
    
    .slide-main {
        font-size: 16px;
    }
    
    .slide-sub {
        font-size: 14px;
    }
    
    .slide-indicators {
        gap: 6px;
    }
    
    .slide-dot {
        width: 8px;
        height: 8px;
    }
}

/* ============================================================================
   HERO MOCKUPS (Rotating Visuals)
   ============================================================================ */

.hero-mockup {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-mockup.active {
    display: block;
    opacity: 1;
    animation: mockupFadeIn 0.5s ease-out;
}

@keyframes mockupFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mockup 2 - Comparison before/after */
.mockup-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.comparison-before,
.comparison-after {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.comparison-before {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.comparison-after {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.comparison-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.comparison-arrow {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
}

.comparison-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.col-highlight {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.col-highlight.active {
    background: rgba(34, 197, 94, 0.25);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

/* Mockup 5 - Anomaly summary cards */
.anomaly-summary {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.anomaly-card {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 80px;
}

.anomaly-card .num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.anomaly-card .label {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 4px;
    display: block;
}

.anomaly-card.extreme {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.anomaly-card.high {
    background: rgba(251, 146, 60, 0.2);
    border: 1px solid rgba(251, 146, 60, 0.4);
    color: #fdba74;
}

.anomaly-card.low {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.priority-extreme {
    color: #f87171 !important;
    font-weight: 600;
}

.priority-high {
    color: #fb923c !important;
    font-weight: 600;
}

.why-cell {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Mockup 6 - Ratio formula display */
.ratio-demo {
    margin-bottom: 16px;
    text-align: center;
}

.ratio-formula {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    font-size: 15px;
}

.ratio-part {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #e0e7ff;
}

.ratio-divider,
.ratio-equals {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.ratio-result {
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 4px;
    color: #4ade80;
    font-weight: 600;
}

.highlight-col {
    background: rgba(99, 102, 241, 0.1) !important;
}

.mult.dim {
    opacity: 0.6;
}

/* Mockup 7 - Grouping badge */
.grouping-demo {
    text-align: center;
    margin-bottom: 16px;
}

.group-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 14px;
    color: #c4b5fd;
}

/* Mockup 8 - Large insight box */
.hero-insight-large {
    padding: 16px 20px !important;
    font-size: 14px !important;
}

/* Mobile responsive for mockups */
@media (max-width: 640px) {
    .mockup-comparison {
        flex-direction: column;
        gap: 12px;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
    
    .anomaly-summary {
        flex-wrap: wrap;
    }
    
    .anomaly-card {
        flex: 1;
        min-width: 70px;
    }
    
    .ratio-formula {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 13px;
    }
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 36px;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Problem & Solution Boxes */
.hero-problem-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.problem-scenario,
.problem-pain {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.problem-scenario {
    margin-bottom: 12px;
}

.problem-scenario strong,
.problem-pain strong {
    color: #fca5a5;
}

.problem-pain em {
    color: #fcd34d;
    font-style: normal;
    font-weight: 600;
}

.hero-solution-box {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease-out 0.35s both;
}

.solution-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #86efac;
    font-size: 15px;
}

.solution-icon {
    width: 22px;
    height: 22px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
}

.solution-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* CTA Buttons */
.hero-cta-group {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.btn-glow {
    position: relative;
    overflow: visible;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #6366f1);
    border-radius: inherit;
    z-index: -1;
    filter: blur(12px);
    opacity: 0.6;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

.btn-arrow {
    transition: transform 0.2s;
}

.btn-glow:hover .btn-arrow {
    transform: translateX(4px);
}

/* Instant Value Prop */
.hero-instant-value {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.instant-value-icon {
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Trust Badges */
.hero-trust-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: all 0.2s;
}

.trust-badge-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.trust-icon-svg {
    color: #22c55e;
    flex-shrink: 0;
}

/* Hero Visual - Example Box */
.hero-visual {
    flex: 0 0 520px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.demo-preview {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.demo-preview-animated {
    animation: previewFloat 4s ease-in-out infinite;
}

@keyframes previewFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Example Before/After */
.example-before,
.example-after {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.example-before {
    background: var(--high-bg);
    border-left: 3px solid var(--high);
}

.example-after {
    background: var(--low-bg);
    border-left: 3px solid var(--low);
}

.example-label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.example-before .example-label { color: var(--high); }
.example-after .example-label { color: #16a34a; }

.example-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-700);
    font-style: italic;
}

/* Example Result Rows */
.example-result {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.result-row {
    display: grid;
    grid-template-columns: 50px 1fr 1fr;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-100);
    align-items: center;
}

.result-row:last-child { border-bottom: none; }

.result-row.highlight {
    background: var(--extreme-bg);
}

.result-priority {
    font-weight: 700;
}

.result-name {
    font-weight: 600;
    color: var(--gray-800);
}

.result-reason {
    color: var(--gray-500);
    font-size: 12px;
}

/* Preview Header (in Hero) */
.preview-header {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #f59e0b; }
.preview-dot.green { background: #22c55e; }

.preview-title {
    margin-left: 8px;
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.preview-content {
    padding: 20px;
}

/* ============================================================================
   Testimonials Section
   ============================================================================ */
.testimonials-section {
    font-size: 13px;
    color: var(--gray-500);
}

.preview-content {
    padding: 24px;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 16px 12px;
    border-radius: var(--radius);
    text-align: center;
}

.stat-card.extreme { background: var(--extreme-bg); }
.stat-card.high { background: var(--high-bg); }
.stat-card.medium { background: var(--medium-bg); }
.stat-card.low { background: var(--low-bg); }

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 800;
}

.stat-card.extreme .stat-number { color: var(--extreme); }
.stat-card.high .stat-number { color: var(--high); }
.stat-card.medium .stat-number { color: var(--medium); }
.stat-card.low .stat-number { color: var(--low); }

.stat-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
}

.preview-table {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    padding: 10px 12px;
    font-size: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.table-row:last-child { border-bottom: none; }

.table-row.header {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
}

.table-row.extreme { background: var(--extreme-bg); }
.table-row.high { background: var(--high-bg); }
.table-row.medium { background: var(--medium-bg); }

/* Animated Cards & Rows */
.stat-card-animated {
    animation: cardPop 0.5s ease-out var(--delay) both;
}

.table-row-animated {
    animation: rowSlide 0.5s ease-out var(--delay) both;
}

@keyframes cardPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rowSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Priority Badges */
.priority-badge {
    font-weight: 600;
}

.amount-highlight {
    font-weight: 700;
    color: var(--extreme);
}

/* Preview Savings */
.preview-savings {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius);
    font-size: 13px;
    color: #16a34a;
    font-weight: 500;
}

.savings-icon {
    font-size: 18px;
}

/* ============================================================================
   Hero Screenshot - Aynalyx-Style Output
   ============================================================================ */

/* Typical Values Reference Box */
.hero-typical-box {
    background: linear-gradient(135deg, var(--primary-bg), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.typical-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.typical-icon {
    font-size: 14px;
}

.typical-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.typical-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .typical-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.typical-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.typical-label {
    font-size: 10px;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.typical-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

/* Results Table */
.hero-results-table {
    margin-bottom: 14px;
}

.hero-results-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.hero-results-table thead {
    background: var(--gray-50);
}

.hero-results-table th {
    padding: 8px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.hero-results-table th:first-child {
    width: 40px;
}

.hero-results-table th:nth-child(2) {
    text-align: left;
    padding-left: 10px;
}

.hero-results-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
}

.hero-results-table tbody tr:last-child {
    border-bottom: none;
}

/* Row priority backgrounds */
.row-priority-1 {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), transparent);
}

.row-priority-2 {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.06), transparent);
}

.row-priority-3 {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.04), transparent);
}

/* Cells */
.hero-results-table td {
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
}

/* Compact table variant for mockups with more columns */
.hero-results-table.compact th,
.hero-results-table.compact td {
    padding: 6px 4px;
    font-size: 11px;
}

.hero-results-table.compact th {
    font-size: 9px;
}

.rank-cell {
    width: 40px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.rank-1 {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.rank-2 {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.rank-3 {
    background: rgba(234, 179, 8, 0.12);
    color: #ca8a04;
}

.vendor-cell {
    text-align: left !important;
    padding-left: 10px !important;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 11px;
}

/* Value cells with heat colors */
.value-cell {
    position: relative;
}

.value-cell .value {
    display: block;
    font-weight: 600;
    font-size: 12px;
    color: var(--gray-800);
}

.value-cell .multiplier {
    display: block;
    font-size: 9px;
    font-weight: 600;
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* Heat map colors */
.heat-extreme {
    background: rgba(124, 58, 237, 0.1);
}

.heat-extreme .value {
    color: var(--extreme);
}

.heat-extreme .multiplier {
    color: var(--extreme);
}

.heat-high {
    background: rgba(239, 68, 68, 0.08);
}

.heat-high .value {
    color: var(--high);
}

.heat-high .multiplier {
    color: var(--high);
}

.heat-medium {
    background: rgba(245, 158, 11, 0.08);
}

.heat-medium .value {
    color: var(--medium);
}

.heat-medium .multiplier {
    color: var(--medium);
}

.heat-low {
    background: rgba(34, 197, 94, 0.06);
}

.heat-low .value {
    color: #16a34a;
}

.heat-low .multiplier {
    color: #16a34a;
}

.heat-normal .value {
    color: var(--gray-600);
}

.multiplier.dim {
    color: var(--gray-400) !important;
    font-weight: 500;
}

/* Inline multiplier for mockup tables */
.mult {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    margin-left: 4px;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    opacity: 0.9;
}

/* Insight Callout */
.hero-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius);
    font-size: 12px;
    line-height: 1.5;
    color: var(--gray-700);
}

.insight-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.insight-text {
    flex: 1;
}

.insight-text strong {
    color: var(--high);
    font-weight: 700;
}

/* Live badge in preview header */
.preview-live-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    color: #22c55e;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive adjustments for hero screenshot */
@media (max-width: 600px) {
    .typical-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .hero-results-table {
        overflow-x: auto;
    }
    
    .hero-results-table table {
        min-width: 400px;
    }
    
    .hero-insight {
        font-size: 11px;
        padding: 10px 12px;
    }
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    animation: fadeInUp 0.6s ease-out 1s both;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* ============================================================================
   Testimonials Section
   ============================================================================ */
.testimonials-section {
    background: linear-gradient(180deg, #0d1b2a 0%, #1a1a3e 50%, var(--gray-50) 100%);
    padding: 60px 0 80px;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s, box-shadow 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 16px;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.author-company {
    font-size: 12px;
    color: var(--gray-500);
}

/* Responsive Testimonials */
@media (max-width: 900px) {
    .testimonials-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

/* ============================================================================
   Social Proof
   ============================================================================ */
.social-proof {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 24px 0;
}

.proof-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.proof-text {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.proof-logos {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.proof-logo {
    font-size: 14px;
    color: var(--gray-400);
    font-weight: 500;
}

/* ============================================================================
   Section Styles
   ============================================================================ */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================================
   Features Section
   ============================================================================ */
.features-section {
    background: white;
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ============================================================================
   How It Works
   ============================================================================ */
.how-section {
    background: var(--gray-50);
    padding: 100px 0;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.step {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    flex: 0 0 280px;
    box-shadow: var(--shadow);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    margin: 0 auto 16px;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 14px;
    color: var(--gray-500);
}

.step-arrow {
    font-size: 28px;
    color: var(--gray-300);
}

/* ============================================================================
   The Principle Section
   ============================================================================ */
.principle-section {
    background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
    padding: 100px 0;
}

.principle-steps {
    display: flex;
    gap: 32px;
    margin-bottom: 60px;
}

.principle-step {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    position: relative;
}

.principle-step-number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
}

.principle-step-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.principle-step-content p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 16px;
}

.principle-example {
    background: var(--primary-bg);
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 13px;
    color: var(--gray-700);
}

.example-label {
    font-weight: 700;
    color: var(--primary);
    margin-right: 6px;
}

/* Color Gradient Explanation */
.principle-colors {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    margin-bottom: 40px;
    text-align: center;
}

.principle-colors h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.principle-colors > p {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 28px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.color-guide {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--gray-700);
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.color-swatch.color-low {
    background: linear-gradient(135deg, #dcfce7 0%, #22c55e 100%);
}

.color-swatch.color-medium {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
}

.color-swatch.color-high {
    background: linear-gradient(135deg, #fecaca 0%, #ef4444 100%);
}

.color-swatch.color-extreme {
    background: linear-gradient(135deg, #ddd6fe 0%, #7c3aed 100%);
}

/* Trust Points */
.principle-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trust-point {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow);
}

.trust-point .trust-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.trust-point strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.trust-point p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
    margin: 0;
}

/* Responsive Principle Section */
@media (max-width: 1024px) {
    .principle-steps {
        flex-direction: column;
    }
    
    .principle-trust {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .principle-trust {
        grid-template-columns: 1fr;
    }
    
    .color-guide {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================================================
   Use Cases
   ============================================================================ */
.usecases-section {
    background: white;
    padding: 100px 0;
}

.usecases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.usecase-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.2s;
}

.usecase-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.usecase-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.usecase-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.usecase-card p {
    font-size: 14px;
    color: var(--gray-500);
    font-style: italic;
}

/* ============================================================================
   Demo Section
   ============================================================================ */
.demo-section {
    background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
    padding: 100px 0;
}

.demo-notice {
    background: var(--primary-bg);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.notice-icon { font-size: 20px; }

.demo-notice a {
    color: var(--primary);
    font-weight: 600;
}

/* Pro Version Notice */
.pro-notice {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: var(--radius);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.pro-notice strong {
    color: #166534;
}

/* App Container */
.app-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.app-step {
    padding: 32px;
    border-bottom: 1px solid var(--gray-100);
}

.app-step:last-child { border-bottom: none; }

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.step-badge {
    background: var(--primary-bg);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.step-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    flex: 1;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
}

.upload-content h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.upload-content p {
    font-size: 14px;
    color: var(--gray-500);
}

.upload-formats {
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-400);
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--low-bg);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-top: 16px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon { font-size: 32px; }

.file-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    display: block;
}

.file-meta {
    font-size: 13px;
    color: var(--gray-500);
}

.btn-remove {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--high);
}

/* Config Groups */
.config-group {
    margin-bottom: 24px;
}

.config-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.config-hint {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--gray-500);
    margin-top: 4px;
}

.config-hint-small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-400);
    margin: 8px 0;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.config-hint-small a.desktop-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.config-hint-small a.desktop-link:hover {
    text-decoration: underline;
}

/* Aggregation options */
.aggregation-options {
    margin: 16px 0;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.aggregation-options .config-hint {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-600);
}

.config-micro-hint {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-500);
    margin-top: 8px;
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    border-radius: 6px;
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.config-select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.config-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Column List */
.column-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.column-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.column-item.selected {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.column-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.column-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.column-direction {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white;
}

/* Sensitivity Options */
.sensitivity-options {
    display: flex;
    gap: 12px;
}

.sensitivity-option {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.sensitivity-option:has(input:checked) {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.sensitivity-option input {
    margin-top: 2px;
    accent-color: var(--primary);
}

.option-label {
    display: flex;
    flex-direction: column;
}

.option-label strong {
    font-size: 14px;
    color: var(--gray-800);
}

.option-label span:last-child {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ============================================================================
   Grouping Options
   ============================================================================ */
.grouping-options {
    margin-top: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.date-format-options {
    margin-top: 12px;
}

.date-format-options .config-select {
    max-width: 200px;
}

/* ============================================================================
   Ratio Options
   ============================================================================ */
.ratio-options {
    margin-top: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.ratio-definition {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ratio-name {
    flex: 0 0 180px;
    padding: 10px 14px;
    font-size: 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: white;
}

.ratio-name:focus {
    outline: none;
    border-color: var(--primary);
}

.ratio-select {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    font-size: 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: white;
}

.ratio-select:focus {
    outline: none;
    border-color: var(--primary);
}

.ratio-divider {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-400);
}

.option-label span {
    font-size: 12px;
    color: var(--gray-500);
}

.btn-analyze {
    margin-top: 16px;
}

/* ============================================================================
   Data Health Panel
   ============================================================================ */
.data-health-panel {
    margin-top: 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-health-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.data-health-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
}

.health-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.health-status.good {
    background: var(--low-bg);
    color: var(--low);
}

.health-status.warning {
    background: var(--medium-bg);
    color: var(--medium);
}

.health-status.info {
    background: var(--primary-bg);
    color: var(--primary);
}

.data-health-content {
    padding: 16px 20px;
}

.health-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.health-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.health-item:first-child {
    padding-top: 0;
}

.health-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.health-text {
    flex: 1;
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.4;
}

.health-text.cleaned {
    color: var(--primary);
    font-weight: 500;
}

.health-text.warning {
    color: var(--medium);
}

.health-text.good {
    color: var(--low);
}

/* Results */
.results-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
}

.summary-card.extreme { background: var(--extreme-bg); border: 2px solid rgba(124, 58, 237, 0.3); }
.summary-card.high { background: var(--high-bg); border: 2px solid rgba(239, 68, 68, 0.3); }
.summary-card.medium { background: var(--medium-bg); border: 2px solid rgba(245, 158, 11, 0.3); }
.summary-card.low { background: var(--low-bg); border: 2px solid rgba(34, 197, 94, 0.3); }

.summary-number {
    font-size: 32px;
    font-weight: 800;
    display: block;
}

.summary-card.extreme .summary-number { color: var(--extreme); }
.summary-card.high .summary-number { color: var(--high); }
.summary-card.medium .summary-number { color: var(--medium); }
.summary-card.low .summary-number { color: var(--low); }

.summary-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

/* Insight Message Box - Transparency explanation */
.insight-message-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.insight-main,
.insight-sort-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.insight-sort-note {
    background: rgba(14, 165, 233, 0.08);
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 4px;
}

.insight-sort-note .insight-icon {
    font-size: 16px;
}

.insight-sort-note .insight-text {
    font-size: 13px;
    color: var(--gray-600);
}

.insight-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.insight-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Warning variant for single metric selection */
.insight-main.insight-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 8px;
    padding: 12px 16px;
    margin: -4px;
}

.insight-main.insight-warning .insight-text {
    color: #92400e;
}

.insight-message-box:has(.insight-warning) {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.insight-message-box:has(.insight-warning) .insight-sort-note {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.insight-message-box:has(.insight-warning) .insight-sort-note .insight-text {
    color: #78350f;
}

/* Upgrade Banner */
.upgrade-banner {
    background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.upgrade-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.upgrade-icon { font-size: 40px; }

.upgrade-text {
    flex: 1;
}

.upgrade-text strong {
    font-size: 17px;
    color: var(--gray-800);
    display: block;
    margin-bottom: 4px;
}

.upgrade-text p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0;
}

.upgrade-options {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.upgrade-btn {
    flex: 1;
    max-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    text-align: left;
}

.upgrade-btn .btn-icon {
    font-size: 24px;
}

.upgrade-btn .btn-text {
    display: flex;
    flex-direction: column;
}

.upgrade-btn .btn-text strong {
    font-size: 15px;
}

.upgrade-btn .btn-text small {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
}

/* Typical Values Reference Box */
.typical-values-box {
    background: linear-gradient(135deg, var(--gray-50) 0%, #f0f4ff 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.typical-values-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.typical-icon {
    font-size: 18px;
}

.typical-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-800);
}

.typical-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 400;
}

.typical-values-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.typical-value-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.typical-value-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.typical-value-number {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

/* Results Table */
.results-table-wrapper {
    display: flex;
    flex-direction: column;
}

.table-expand-btn {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    margin-bottom: 10px;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.table-expand-btn:hover {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.table-expand-btn .expand-icon {
    font-size: 14px;
}

.results-table-container {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    box-shadow: var(--shadow-md);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.results-table th,
.results-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.results-table th {
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--gray-50) 100%);
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--gray-300);
}

/* Header tooltip - use native title with custom JS tooltip */
.header-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    font-size: 10px;
    font-style: normal;
    color: var(--gray-400);
    background: var(--gray-200);
    border-radius: 50%;
    cursor: help;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.header-tooltip:hover {
    color: var(--primary);
    background: var(--primary-bg);
    transform: scale(1.1);
}

/* Custom tooltip popup (added via JS) */
.custom-tooltip {
    position: fixed;
    background: var(--gray-800);
    color: white;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    width: 350px;
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    word-wrap: break-word;
    white-space: normal;
}

.custom-tooltip.visible {
    opacity: 1;
}

.custom-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--gray-800);
    border-top: none;
}

.results-table td {
    font-size: 13px;
    color: var(--gray-700);
    vertical-align: middle;
}

/* Numeric cells - right aligned */
.results-table td.numeric-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Date cells - left aligned, no special formatting */
.results-table td.date-cell {
    text-align: left;
    white-space: nowrap;
    color: var(--gray-600);
}

.results-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.results-table tr.extreme { background: var(--extreme-bg); }
.results-table tr.high { background: var(--high-bg); }
.results-table tr.medium { background: var(--medium-bg); }

.priority-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.priority-badge.extreme { background: var(--extreme); color: white; }
.priority-badge.high { background: var(--high); color: white; }
.priority-badge.medium { background: var(--medium); color: white; }
.priority-badge.low { background: var(--low); color: white; }

.results-footer {
    margin-top: 24px;
    text-align: center;
}

.btn-export {
    padding: 8px 16px;
    font-size: 13px;
}

/* ============================================================================
   Pricing Section
   ============================================================================ */
.pricing-section {
    background: var(--gray-50);
    padding: 100px 0;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-grid.two-cols {
    max-width: 700px;
}

.pricing-grid.three-cols {
    max-width: 1000px;
}

.pricing-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 32px;
    flex: 1;
    max-width: 320px;
    position: relative;
}

.pricing-card.web-pro {
    border-color: var(--primary-light);
}

.pricing-card.web-pro .pricing-badge {
    background: var(--primary);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-600);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.pricing-card.featured .pricing-badge {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
}

.pricing-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin-top: 16px;
    margin-bottom: 8px;
}

.pricing-tagline {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
    font-weight: 500;
}

.pricing-price {
    margin-bottom: 24px;
}

.price-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--gray-900);
}

.price-period {
    font-size: 16px;
    color: var(--gray-500);
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li.muted {
    color: var(--gray-400);
}

.pricing-features .check { color: var(--low); }
.pricing-features .x { color: var(--gray-400); }

.pricing-note {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    margin-top: 12px;
}

/* ============================================================================
   FAQ Section
   ============================================================================ */
.faq-section {
    background: white;
    padding: 100px 0;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--gray-200);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    text-align: left;
}

.faq-toggle {
    font-size: 24px;
    color: var(--gray-400);
    transition: transform 0.2s;
}

.faq-item.open .faq-toggle { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.open .faq-answer { max-height: 200px; }

.faq-answer p {
    padding-bottom: 20px;
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ============================================================================
   CTA Section
   ============================================================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.cta-section .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* ============================================================================
   Footer
   ============================================================================ */
.footer {
    background: var(--gray-900);
    padding: 60px 0;
    text-align: center;
}

.footer-container {
    max-width: 600px;
    margin: 0 auto;
}

.footer .logo-text { color: white; }

.footer-tagline {
    font-size: 16px;
    color: var(--gray-400);
    margin: 12px 0 24px;
}

.footer-copyright {
    font-size: 13px;
    color: var(--gray-500);
}

/* ============================================================================
   Loading Overlay
   ============================================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.loading-content {
    background: white;
    padding: 40px 60px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
}

/* ============================================================================
   Full Screen Table Modal
   ============================================================================ */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-50);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fullscreen-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.fullscreen-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.fullscreen-close-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 18px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fullscreen-close-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.fullscreen-modal-body {
    flex: 1;
    overflow: auto;
    padding: 24px;
}

.fullscreen-table-container {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: auto;
    max-height: 100%;
}

.fullscreen-table-container .results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fullscreen-table-container .results-table th,
.fullscreen-table-container .results-table td {
    padding: 12px 16px;
    white-space: nowrap;
}

.fullscreen-table-container .results-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--gray-50) 100%);
}

.fullscreen-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: white;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

/* Keyboard hint */
.fullscreen-modal-header::after {
    content: 'Press ESC to close';
    font-size: 11px;
    color: var(--gray-500);
    margin-left: auto;
    margin-right: 16px;
}

/* ============================================================================
   Column Detection Summary
   ============================================================================ */
.column-detection-summary {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.detection-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-icon {
    font-size: 18px;
}

.summary-text {
    font-size: 14px;
    color: var(--gray-700);
}

.summary-desc {
    font-size: 12px;
    color: var(--gray-500);
}

/* Column List Header */
.column-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    grid-column: 1 / -1;
}

.column-count {
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
}

.column-hint {
    font-size: 13px;
    color: var(--gray-500);
}

/* No Columns Message */
.no-columns-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: var(--high-bg);
    border: 1px dashed var(--high);
    border-radius: var(--radius);
    text-align: center;
    grid-column: 1 / -1;
}

.no-columns-message span {
    font-size: 32px;
    margin-bottom: 12px;
}

.no-columns-message p {
    color: var(--gray-700);
    margin: 0;
}

.no-columns-message .hint {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 8px;
}

/* Improved Column Item */
.column-item .column-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Option Group Styling */
.config-select optgroup {
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
}

.config-select option {
    font-weight: 400;
    padding: 8px;
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-visual {
        flex: none;
        width: 100%;
        max-width: 500px;
    }
    
    .hero-cta-group {
        justify-content: center;
    }
    
    .hero-trust-badges {
        justify-content: center;
    }
    
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-visual {
        flex: none;
        width: 100%;
        max-width: 500px;
    }
    
    .floating-label-1 {
        right: 10px;
        top: -10px;
    }
    
    .floating-label-2 {
        left: 10px;
        bottom: 60px;
    }
    
    .features-grid,
    .usecases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .privacy-badge {
        display: none; /* Hidden on mobile, can be shown elsewhere if needed */
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 60px 0 50px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 32px;
        letter-spacing: -1px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-cta-group {
        flex-direction: column;
    }
    
    .hero-trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .trust-badge-item {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .hero-scroll-indicator {
        display: none;
    }
    
    .floating-label {
        display: none;
    }
    
    .testimonials-container {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .usecases-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .column-list {
        grid-template-columns: 1fr;
    }
    
    .sensitivity-options {
        flex-direction: column;
    }
    
    .results-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .upgrade-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================================================
   Analysis Workspace - Stacked Layout (Preview on top, Config below)
   ============================================================================ */
.analysis-workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Preview Panel (Top) */
.preview-panel {
    background: white;
    order: 1;
}

/* Config Panel (Below Preview) */
.config-panel {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    overflow: visible;
    order: 2;
}

/* Config Sections - Vertical stacked layout */
.config-sections-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Remove old responsive grid rules - no longer needed */

.panel-header {
    padding: 24px 28px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.preview-status {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 500;
}

/* Config Sections */
.config-section {
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

.config-section:last-of-type {
    border-bottom: none;
}

.config-section-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    background: white;
}

.config-section-header:hover {
    background: var(--gray-50);
}

.config-section-icon {
    font-size: 18px;
}

.config-section-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.config-section-toggle {
    font-size: 12px;
    color: var(--gray-400);
    transition: transform 0.2s;
}

.config-section.collapsed .config-section-toggle {
    transform: rotate(-90deg);
}

.config-section.collapsed .config-section-body {
    display: none;
}

.config-section-body {
    padding: 0 20px 20px;
    background: white;
}

/* Config Row */
.config-row {
    margin-bottom: 12px;
}

.config-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
}

.config-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.config-options {
    margin-top: 12px;
    padding: 14px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.config-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
    margin-bottom: 12px;
}

.config-select:last-child {
    margin-bottom: 0;
}

/* Apply Buttons - Enhanced Feedback */
.btn-apply {
    margin-top: 18px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #5a4fcf 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* Ripple effect on click */
.btn-apply::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.4s, opacity 0.6s;
}

.btn-apply:active::after {
    transform: scale(0, 0);
    opacity: 1;
    transition: 0s;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 99, 255, 0.45);
}

.btn-apply:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 1px 4px rgba(108, 99, 255, 0.3);
}

/* Loading state */
.btn-apply.loading {
    pointer-events: none;
    background: linear-gradient(135deg, #7c7fdb 0%, #6b68c7 100%);
    animation: btn-pulse 1s infinite;
}

.btn-apply.loading .btn-icon {
    animation: spin 0.5s linear infinite;
}

@keyframes btn-pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

/* Success state - satisfying pop */
.btn-apply.success {
    background: linear-gradient(135deg, var(--low) 0%, #2ea043 100%);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.4);
    animation: success-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-apply.success .btn-icon {
    animation: checkmark-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes success-pop {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes checkmark-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Preview panel highlight when scrolled to */
.preview-panel.highlight {
    animation: panel-highlight 0.8s ease-out;
}

@keyframes panel-highlight {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
    30% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.btn-apply .btn-icon {
    font-size: 16px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Ratios */
.ratio-definition {
    padding: 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 14px;
}

.ratio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ratio-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.btn-remove-ratio {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-remove-ratio:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--high);
}

.ratio-name {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 12px;
}

.ratio-name::placeholder {
    color: var(--gray-400);
}

.ratio-formula {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ratio-formula .ratio-select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
}

.ratio-divider {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    padding: 0 4px;
}

.btn-add-ratio {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-add-ratio:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.ratio-limit-hint {
    font-size: 13px;
    color: var(--medium);
    text-align: center;
    margin-top: 10px;
}

/* Final Action Button */
.final-action {
    padding: 20px 28px;
    background: var(--primary-bg);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: center;
}

.final-action .btn-large {
    padding: 16px 48px;
    font-size: 16px;
}

/* Preview Panel (Top) */
.preview-panel {
    background: white;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.preview-panel .panel-header {
    background: var(--primary-bg);
}

.preview-panel .panel-header h3 {
    color: var(--primary);
}

.preview-panel .results-summary {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .preview-panel .results-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

.preview-panel .results-table-container {
    flex: 1;
    padding: 0 24px;
    overflow-x: auto;
}

.preview-panel .upgrade-banner {
    margin: 0 24px 20px;
}

/* Results Actions (under table) */
.results-actions {
    padding: 24px 28px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
    background: var(--gray-50);
}

.results-actions .btn-export {
    flex: 1;
    max-width: 220px;
    padding: 14px 20px;
}

.results-actions .btn-secondary {
    flex: 0 0 auto;
    padding: 14px 20px;
}

/* Column List in Config Panel */
.config-section-body .column-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--gray-50);
}

.config-section-body .column-item {
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
}

.config-section-body .column-item:last-child {
    border-bottom: none;
}

.config-section-body .column-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.config-section-body .column-item .column-name {
    flex: 1;
}

.config-section-body .column-item .column-direction {
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: white;
}

/* Sensitivity Options in Config Panel */
.config-section-body .sensitivity-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.config-section-body .sensitivity-option {
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.config-section-body .sensitivity-option:hover {
    border-color: var(--gray-300);
    background: white;
}

.config-section-body .sensitivity-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.config-section-body .sensitivity-option input[type="radio"] {
    width: 18px;
    height: 18px;
}
