:root {
    /* ===================================
       M3 EXPRESSIVE - BOLD COLOR SYSTEM
       Primary: Deep Indigo (#4F46E5)
       Accent: Vibrant Coral (#FF6B6B)
       Inspired by travel, adventure, connection
       =================================== */
    
    /* Primary Tones - Deep Indigo (Night sky, adventure) */
    --md-primary: #4F46E5;
    --md-on-primary: #FFFFFF;
    --md-primary-container: #E0E7FF;
    --md-on-primary-container: #1E1B4B;
    --md-primary-hover: #4338CA;
    --md-primary-glow: rgba(79, 70, 229, 0.4);
    
    /* Secondary Tones - Vibrant Coral (Energy, warmth) */
    --md-secondary: #FF6B6B;
    --md-on-secondary: #FFFFFF;
    --md-secondary-container: #FFE5E5;
    --md-on-secondary-container: #7F1D1D;
    
    /* Tertiary Tones - Electric Teal (Fresh, modern) */
    --md-tertiary: #06B6D4;
    --md-on-tertiary: #FFFFFF;
    --md-tertiary-container: #CFFAFE;
    --md-on-tertiary-container: #164E63;
    
    /* Accent - Golden Yellow (Premium, highlight) */
    --md-accent: #F59E0B;
    --md-on-accent: #1C1917;
    --md-accent-container: #FEF3C7;
    
    /* Error Tones */
    --md-error: #DC2626;
    --md-on-error: #FFFFFF;
    --md-error-container: #FEE2E2;
    --md-on-error-container: #7F1D1D;
    
    /* Surface Tones - Warm Ivory (Not cold gray!) */
    --md-surface: #FEFDFB;
    --md-surface-dim: #F5F3EF;
    --md-surface-bright: #FFFFFF;
    --md-surface-container-lowest: #FFFFFF;
    --md-surface-container-low: #FBF9F6;
    --md-surface-container: #F7F5F2;
    --md-surface-container-high: #F2F0ED;
    --md-surface-container-highest: #EDEBE8;
    
    /* On Surface */
    --md-on-surface: #1C1917;
    --md-on-surface-variant: #57534E;
    
    /* Outline */
    --md-outline: #78716C;
    --md-outline-variant: #D6D3D1;
    
    /* Inverse */
    --md-inverse-surface: #1C1917;
    --md-inverse-on-surface: #FAFAF9;
    --md-inverse-primary: #A5B4FC;
    
    /* Legacy support */
    --primary: var(--md-primary);
    --primary-dark: #3730A3;
    --primary-light: var(--md-primary-container);
    --primary-gradient: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #7C3AED 100%);
    
    /* Expressive Gradients */
    --gradient-hero: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
    --gradient-warm: linear-gradient(135deg, #FF6B6B 0%, #F59E0B 100%);
    --gradient-cool: linear-gradient(135deg, #06B6D4 0%, #4F46E5 100%);
    --gradient-sunset: linear-gradient(135deg, #F97316 0%, #EC4899 50%, #8B5CF6 100%);
    --gradient-surface: linear-gradient(180deg, #FEFDFB 0%, #F7F5F2 100%);
    --gradient-card: linear-gradient(145deg, #FFFFFF 0%, #FBF9F6 100%);
    
    /* Backgrounds */
    --background-color: var(--md-surface);
    --background-gradient: var(--gradient-surface);
    --card-bg-color: var(--md-surface-container-lowest);
    --card-hover-bg: var(--md-surface-container-low);
    
    /* Text Colors */
    --text-primary: var(--md-on-surface);
    --text-secondary: var(--md-on-surface-variant);
    --text-muted: #A8A29E;
    --text-light: #D6D3D1;
    
    /* Borders */
    --border-color: var(--md-outline-variant);
    --border-light: rgba(120, 113, 108, 0.12);
    
    /* Status Colors */
    --success-color: #059669;
    --success-light: #D1FAE5;
    --error-color: var(--md-error);
    --error-light: var(--md-error-container);
    --warning-color: #D97706;
    --info-color: var(--md-tertiary);
    
    /* M3 Elevation - With colored shadows */
    --md-elevation-1: 0 1px 3px rgba(28, 25, 23, 0.1), 0 1px 2px rgba(28, 25, 23, 0.06);
    --md-elevation-2: 0 4px 6px -1px rgba(28, 25, 23, 0.1), 0 2px 4px -1px rgba(28, 25, 23, 0.06);
    --md-elevation-3: 0 10px 15px -3px rgba(28, 25, 23, 0.1), 0 4px 6px -2px rgba(28, 25, 23, 0.05);
    --md-elevation-4: 0 20px 25px -5px rgba(28, 25, 23, 0.1), 0 10px 10px -5px rgba(28, 25, 23, 0.04);
    --md-elevation-5: 0 25px 50px -12px rgba(28, 25, 23, 0.25);
    --md-elevation-primary: 0 10px 40px -10px rgba(79, 70, 229, 0.5);
    --md-elevation-accent: 0 10px 40px -10px rgba(255, 107, 107, 0.4);
    
    /* Legacy Shadows */
    --shadow-xs: var(--md-elevation-1);
    --shadow-sm: var(--md-elevation-1);
    --shadow-md: var(--md-elevation-2);
    --shadow-lg: var(--md-elevation-3);
    --shadow-xl: var(--md-elevation-4);
    --shadow-colored: var(--md-elevation-primary);
    
    /* M3 Expressive Shape System */
    --md-shape-none: 0;
    --md-shape-xs: 8px;
    --md-shape-sm: 12px;
    --md-shape-md: 16px;
    --md-shape-lg: 24px;
    --md-shape-xl: 32px;
    --md-shape-full: 9999px;
    /* Expressive asymmetric shapes */
    --md-shape-squircle: 30% 70% 70% 30% / 30% 30% 70% 70%;
    --md-shape-blob: 60% 40% 30% 70% / 60% 30% 70% 40%;
    
    /* Legacy Radius */
    --radius-sm: var(--md-shape-sm);
    --radius-md: var(--md-shape-md);
    --radius-lg: var(--md-shape-lg);
    --radius-xl: var(--md-shape-xl);
    --radius-full: var(--md-shape-full);
    
    /* Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* M3 Expressive Motion - Spring physics */
    --md-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
    --md-motion-easing-standard-decelerate: cubic-bezier(0, 0, 0, 1);
    --md-motion-easing-standard-accelerate: cubic-bezier(0.3, 0, 1, 1);
    --md-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
    --md-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
    --md-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
    /* Expressive spring easing */
    --md-motion-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --md-motion-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --md-motion-easing-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    
    /* M3 Motion - Duration */
    --md-motion-duration-short1: 50ms;
    --md-motion-duration-short2: 100ms;
    --md-motion-duration-short3: 150ms;
    --md-motion-duration-short4: 200ms;
    --md-motion-duration-medium1: 250ms;
    --md-motion-duration-medium2: 300ms;
    --md-motion-duration-medium3: 350ms;
    --md-motion-duration-medium4: 400ms;
    --md-motion-duration-long1: 450ms;
    --md-motion-duration-long2: 500ms;
    --md-motion-duration-long3: 600ms;
    --md-motion-duration-long4: 800ms;
    
    /* Legacy Transitions */
    --transition-fast: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
    --transition-base: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    --transition-slow: all var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized);
    --transition-bounce: all var(--md-motion-duration-medium4) var(--md-motion-easing-spring);
    --transition-expressive: all var(--md-motion-duration-long1) var(--md-motion-easing-emphasized-decelerate);
    
    /* Glass Morphism - Enhanced */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-bg-dark: rgba(28, 25, 23, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(20px);
    --glass-blur-heavy: blur(40px);
    
    /* M3 State Layer Opacity */
    --md-state-hover: 0.08;
    --md-state-focus: 0.12;
    --md-state-pressed: 0.12;
    --md-state-dragged: 0.16;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: white;
    color: var(--md-on-surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    font-size: 15px;
    margin: 0;
    padding: 0;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

@media (min-width: 768px) {
    body {
        background: var(--gradient-surface);
    }
}

/* Expressive background decoration - desktop only */
body::before,
body::after {
    display: none;
}

@media (min-width: 768px) {
    body::before {
        content: '';
        display: block;
        position: fixed;
        top: -50%;
        right: -30%;
        width: 80vw;
        height: 80vw;
        background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
        animation: floatBlob 20s ease-in-out infinite;
    }

    body::after {
        content: '';
        display: block;
        position: fixed;
        bottom: -30%;
        left: -20%;
        width: 60vw;
        height: 60vw;
        background: radial-gradient(circle, rgba(255, 107, 107, 0.06) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
        animation: floatBlob 25s ease-in-out infinite reverse;
    }
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 5%) scale(1.05); }
    66% { transform: translate(-3%, 3%) scale(0.95); }
}

/* M3 Expressive Typography Scale - Using Outfit for display, Sora for headlines */
.display-large { 
    font-family: 'Outfit', sans-serif;
    font-size: clamp(48px, 8vw, 72px); 
    line-height: 1.1; 
    letter-spacing: -0.03em; 
    font-weight: 700;
}
.display-medium { 
    font-family: 'Outfit', sans-serif;
    font-size: clamp(36px, 6vw, 56px); 
    line-height: 1.15; 
    letter-spacing: -0.02em; 
    font-weight: 600; 
}
.display-small { 
    font-family: 'Outfit', sans-serif;
    font-size: clamp(28px, 5vw, 44px); 
    line-height: 1.2; 
    letter-spacing: -0.01em; 
    font-weight: 600; 
}
.headline-large { 
    font-family: 'Sora', sans-serif;
    font-size: clamp(24px, 4vw, 36px); 
    line-height: 1.25; 
    letter-spacing: -0.01em; 
    font-weight: 600; 
}
.headline-medium { 
    font-family: 'Sora', sans-serif;
    font-size: clamp(20px, 3vw, 28px); 
    line-height: 1.3; 
    letter-spacing: 0; 
    font-weight: 600; 
}
.headline-small { 
    font-family: 'Sora', sans-serif;
    font-size: 24px; 
    line-height: 1.35; 
    letter-spacing: 0; 
    font-weight: 600; 
}
.title-large { 
    font-family: 'Sora', sans-serif;
    font-size: 22px; 
    line-height: 1.3; 
    letter-spacing: -0.01em; 
    font-weight: 500; 
}
.title-medium { 
    font-family: 'DM Sans', sans-serif;
    font-size: 16px; 
    line-height: 1.5; 
    letter-spacing: 0; 
    font-weight: 600; 
}
.title-small { 
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; 
    line-height: 1.4; 
    letter-spacing: 0; 
    font-weight: 600; 
}
.label-large { 
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; 
    line-height: 1.4; 
    letter-spacing: 0.02em; 
    font-weight: 600; 
}
.label-medium { 
    font-family: 'DM Sans', sans-serif;
    font-size: 12px; 
    line-height: 1.3; 
    letter-spacing: 0.04em; 
    font-weight: 600; 
    text-transform: uppercase;
}
.label-small { 
    font-family: 'DM Sans', sans-serif;
    font-size: 11px; 
    line-height: 1.3; 
    letter-spacing: 0.05em; 
    font-weight: 600; 
    text-transform: uppercase;
}
.body-large { 
    font-family: 'DM Sans', sans-serif;
    font-size: 17px; 
    line-height: 1.7; 
    letter-spacing: 0; 
    font-weight: 400; 
}
.body-medium { 
    font-family: 'DM Sans', sans-serif;
    font-size: 15px; 
    line-height: 1.6; 
    letter-spacing: 0; 
    font-weight: 400; 
}
.body-small { 
    font-family: 'DM Sans', sans-serif;
    font-size: 13px; 
    line-height: 1.5; 
    letter-spacing: 0; 
    font-weight: 400; 
}

/* Expressive text utilities */
.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--md-secondary);
}

.container {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    max-width: 1200px;
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
}

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

/* ===================================
   M3 EXPRESSIVE FORM STYLES
   =================================== */
.form-group {
    margin-bottom: var(--space-xl);
    position: relative;
    animation: formGroupEnter 0.4s var(--md-motion-easing-emphasized-decelerate) backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }

@keyframes formGroupEnter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--md-on-surface-variant);
    text-transform: uppercase;
}

/* M3 Expressive Outlined Text Field */
input, textarea, select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--md-outline-variant);
    border-radius: var(--md-shape-lg);
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-spring);
    background-color: var(--md-surface-bright);
    color: var(--md-on-surface);
    caret-color: var(--md-primary);
    box-shadow: var(--md-elevation-1);
}

input:hover, textarea:hover, select:hover {
    border-color: var(--md-primary);
    box-shadow: var(--md-elevation-2);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 4px var(--md-primary-container), var(--md-elevation-2);
    background: white;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

/* ===================================
   M3 EXPRESSIVE BUTTONS - Bold & Dynamic
   =================================== */

/* M3 Filled Button (default) - Expressive */
button, .md-btn-filled {
    background: var(--primary-gradient);
    color: var(--md-on-primary);
    padding: 14px 28px;
    border: none;
    border-radius: var(--md-shape-lg);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--md-elevation-primary);
    transform: translateY(0);
}

button::before, .md-btn-filled::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 1;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

button:hover, .md-btn-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 44px -8px rgba(79, 70, 229, 0.55);
}

button:hover::before, .md-btn-filled:hover::before {
    opacity: 0.8;
}

button:focus-visible, .md-btn-filled:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--md-primary-container), var(--md-elevation-primary);
}

button:active, .md-btn-filled:active {
    transform: translateY(0) scale(0.98);
}

button:active::before, .md-btn-filled:active::before {
    opacity: 0.6;
}

button:disabled, .md-btn-filled:disabled {
    background: var(--md-surface-container-highest);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

button:disabled::before {
    display: none;
}

/* M3 Filled Tonal Button - Expressive */
.md-btn-tonal {
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    padding: 14px 28px;
    border: none;
    border-radius: var(--md-shape-lg);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--md-elevation-2);
}

.md-btn-tonal:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-elevation-3);
    background: #C7D2FE;
}

/* M3 Outlined Button - Expressive */
.md-btn-outlined {
    background: transparent;
    color: var(--md-primary);
    padding: 13px 27px;
    border: 2px solid var(--md-primary);
    border-radius: var(--md-shape-lg);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.md-btn-outlined:hover {
    background: var(--md-primary-container);
    transform: translateY(-2px);
    box-shadow: var(--md-elevation-2);
}

/* M3 Text Button - Expressive */
.md-btn-text {
    background: transparent;
    color: var(--md-primary);
    padding: 12px 16px;
    border: none;
    border-radius: var(--md-shape-md);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.md-btn-text:hover {
    background: var(--md-primary-container);
    transform: scale(1.02);
}

/* M3 FAB - Expressive */
.md-fab {
    background: var(--gradient-warm);
    color: white;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: var(--md-shape-xl);
    font-size: 28px;
    cursor: pointer;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--md-elevation-accent);
    position: relative;
    overflow: hidden;
}

.md-fab:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 18px 50px -10px rgba(255, 107, 107, 0.5);
}

/* M3 Extended FAB - Expressive */
.md-fab-extended {
    background: var(--gradient-warm);
    color: white;
    height: 60px;
    padding: 0 24px;
    border: none;
    border-radius: var(--md-shape-xl);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: var(--md-elevation-3);
}

/* ===================================
   M3 EXPRESSIVE CARDS - Dynamic & Layered
   =================================== */
.card {
    background: var(--gradient-card);
    border-radius: 0;
    box-shadow: none;
    padding: var(--space-xl);
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid var(--md-outline-variant);
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    position: relative;
    overflow: visible;
    z-index: 1;
    animation: cardEnter var(--md-motion-duration-long2) var(--md-motion-easing-emphasized-decelerate) forwards;
}

/* Cards get rounded corners and shadows on larger screens */
@media (min-width: 768px) {
    .card {
        border-radius: var(--md-shape-xl);
        box-shadow: var(--md-elevation-2);
        margin-bottom: var(--space-lg);
        border: 1px solid rgba(255, 255, 255, 0.8);
    }
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* M3 Elevated Card - Expressive */
.md-card-elevated {
    background: var(--gradient-card);
    border-radius: var(--md-shape-xl);
    box-shadow: var(--md-elevation-2);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
}

.md-card-elevated:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-elevation-4);
}

/* M3 Filled Card - Expressive */
.md-card-filled {
    background: linear-gradient(145deg, var(--md-primary-container) 0%, #D4D8FD 100%);
    border-radius: var(--md-shape-xl);
    box-shadow: none;
    padding: 20px;
    border: none;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
}

.md-card-filled:hover {
    transform: scale(1.02);
}

/* M3 Outlined Card - Expressive */
.md-card-outlined {
    background: var(--md-surface-bright);
    border: 2px solid var(--md-outline-variant);
    border-radius: var(--md-shape-xl);
    box-shadow: none;
    padding: 20px;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
}

.md-card-outlined:hover {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 4px var(--md-primary-container);
}

.card::before {
    display: none;
}

.card:hover {
    /* No hover effect on mobile - cards are edge-to-edge */
}

@media (min-width: 768px) {
    .card:hover {
        transform: translateY(-4px);
        box-shadow: var(--md-elevation-4);
    }
}

.card:hover::before {
    display: none;
}

/* Modern Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    font-family: 'Sora', sans-serif;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--md-on-surface);
    font-size: 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Page titles - clean and minimal */
.card > h2:first-child,
.chat-container > h2:first-child {
    padding-bottom: 1rem;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 2rem;
    font-weight: 600;
}

h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--md-on-surface);
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
}

/* ===================================
   M3 EXPRESSIVE TOP APP BAR
   =================================== */
.nav {
    background: white;
    padding: 0;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 64px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--md-outline-variant);
}

@media (min-width: 768px) {
    .nav {
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        min-height: 72px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    min-height: 72px;
}

@media (min-width: 768px) {
    .nav-container {
        padding: 0 24px;
    }
}

.nav-container .nav-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Home page nav - centered logo without hamburger */
.home-nav-container {
    justify-content: center !important;
}

.home-nav-container .nav-logo {
    position: static !important;
    transform: none !important;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 4px;
    }
    
    .nav-container .nav-logo {
        position: static;
        transform: none;
        margin: 0 auto;
    }
    
    .logo-link {
        font-size: 16px;
    }
    
    .logo-link i {
        font-size: 20px;
    }
    
    .hamburger-button {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 24px;
        padding: 12px;
    }
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--md-on-surface);
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 600;
    gap: 10px;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    letter-spacing: -0.02em;
}

/* Icon styling */
.logo-link .material-symbols-outlined {
    color: var(--md-primary) !important;
    font-size: 28px;
    background: var(--md-primary-container);
    padding: 6px;
    border-radius: var(--md-shape-sm);
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-spring);
}

/* Remove hover effect and pointer when logo is not clickable */
span.logo-link {
    cursor: default;
}

span.logo-link:hover {
    opacity: 1;
}

/* Keep hover effect only for actual links */
a.logo-link:hover {
    opacity: 0.85;
}

a.logo-link:hover .material-symbols-outlined {
    transform: rotate(-8deg) scale(1.1);
}

.logo-link i {
    color: var(--md-primary);
    font-size: 24px;
}

.nav-user {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* ===================================
   M3 EXPRESSIVE ICON BUTTON (Hamburger)
   =================================== */
.hamburger-button {
    background: transparent;
    border: none;
    color: var(--md-on-surface);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--md-shape-md);
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-spring);
    margin-right: 4px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.hamburger-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--md-primary);
    opacity: 0;
    border-radius: inherit;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.hamburger-button:hover {
    background: var(--md-primary-container);
    color: var(--md-primary);
}

.hamburger-button:hover::before {
    opacity: 0;
}

.hamburger-button:active::before {
    opacity: var(--md-state-pressed);
}

/* Notification dot on hamburger button */
.hamburger-button .notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: var(--md-primary);
    border-radius: 50%;
    border: 2px solid var(--md-surface);
}

/* Gentle pulse animation when new message arrives */
.hamburger-button .notification-dot.new-message {
    animation: newMessagePulse 1s ease-out;
}

@keyframes newMessagePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(79, 70, 229, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* Notification badge in menu drawer */
.menu-notification-badge {
    margin-left: auto;
    background-color: var(--md-primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* M3 Scrim Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.32);
    z-index: 999;
    animation: m3FadeIn var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized-decelerate);
}

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

/* ===================================
   M3 NAVIGATION DRAWER
   =================================== */
.menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: linear-gradient(180deg, var(--md-surface-bright) 0%, var(--md-surface-container) 100%);
    box-shadow: var(--md-elevation-5);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform var(--md-motion-duration-medium4) var(--md-motion-easing-emphasized-decelerate);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 var(--md-shape-xl) var(--md-shape-xl) 0;
}

@media (min-width: 768px) {
    .menu-drawer {
        width: 320px;
    }
}

.menu-drawer-open {
    transform: translateX(0);
}

.menu-drawer-header {
    padding: 32px 24px 24px;
    border-bottom: none;
    background: linear-gradient(135deg, var(--md-primary-container) 0%, #E0E7FF 100%);
    position: relative;
    overflow: hidden;
}

.menu-drawer-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.menu-drawer-header .logo-link {
    font-size: 20px;
    color: var(--md-on-primary-container);
    position: relative;
    z-index: 1;
}

.menu-drawer-list {
    list-style: none;
    padding: 16px;
    margin: 0;
}

.menu-drawer-list li {
    margin: 4px 0;
}

/* M3 Navigation Drawer Item */
.menu-drawer-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--md-on-surface);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    gap: 16px;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-spring);
    font-size: 15px;
    letter-spacing: 0;
    position: relative;
    border-radius: var(--md-shape-lg);
    margin-bottom: 4px;
    min-height: 52px;
}

.menu-drawer-link:hover {
    background: var(--md-primary-container);
    color: var(--md-primary);
    transform: translateX(4px);
}

.menu-drawer-link i,
.menu-drawer-link .material-symbols-outlined {
    width: 24px;
    height: 24px;
    font-size: 24px;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    color: var(--md-on-surface-variant);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-drawer-link:hover i,
.menu-drawer-link:hover .material-symbols-outlined {
    color: var(--md-primary);
}

/* Material Symbols Base Styling */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 500,
        'GRAD' 0,
        'opsz' 24;
    vertical-align: middle;
}

/* M3 Active Navigation Item - Expressive */
.menu-drawer-link.router-link-active {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    box-shadow: var(--md-elevation-primary);
}

.menu-drawer-link.router-link-active i,
.menu-drawer-link.router-link-active .material-symbols-outlined {
    color: white;
}

.menu-drawer-link.router-link-active:hover {
    transform: translateX(4px);
}

.menu-drawer-link.router-link-active::before {
    display: none;
}

.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--md-outline-variant), transparent);
    margin: 20px 16px;
}

/* Desktop Navigation (drawer menu stays consistent) */
@media (min-width: 768px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ===================================
   M3 CHAT STYLES
   Full Material Design 3 Compliance
   =================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    min-height: 500px;
    width: 100%;
    max-width: 100%;
    background-color: var(--md-surface);
    border-radius: var(--md-shape-xl);
    box-shadow: none;
    overflow: hidden;
    border: none;
}

/* M3 Expressive Messages Area */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background-color: var(--md-surface);
    height: calc(100vh - 120px);
}

/* M3 Expressive Message Group - Same sender */
.message-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.message-group.sent {
    align-items: flex-end;
}

.message-group.received {
    align-items: flex-start;
}

/* M3 Expressive Sender Label */
/* Floating Date Indicator - Sticky at top */
.floating-date {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    padding: 8px 0;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-date.visible {
    opacity: 1;
    transform: translateY(0);
}

.floating-date-text {
    background: var(--md-surface-container-high);
    color: var(--md-on-surface-variant);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 6px 14px;
    border-radius: var(--md-shape-full);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Date Separator - Static between messages */
.date-separator {
    display: flex;
    justify-content: center;
    padding: 16px 0 8px;
}

.date-separator-text {
    background: var(--md-surface-container-high);
    color: var(--md-on-surface-variant);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 4px 12px;
    border-radius: var(--md-shape-full);
}

.message-sender-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--md-on-surface-variant);
    letter-spacing: 0.4px;
    margin-bottom: 4px;
    margin-left: 4px;
}

/* M3 Expressive Message Bubble Base */
.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    position: relative;
    word-wrap: break-word;
    animation: m3MessageIn var(--md-motion-duration-medium1) var(--md-motion-easing-emphasized-decelerate);
}

@keyframes m3MessageIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.sent {
    align-self: flex-end;
}

.message.received {
    align-self: flex-start;
}

/* M3 Expressive Message Row - Avatar + Content */
.message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.message.sent .message-row {
    flex-direction: row-reverse;
}

/* M3 Expressive Avatar */
.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.message-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--md-tertiary-container);
    color: var(--md-on-tertiary-container);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    margin-bottom: 2px;
}

/* Hide avatar for sent messages */
.message.sent .message-avatar,
.message.sent .message-avatar-placeholder {
    display: none;
}

/* M3 Expressive Message Content - Pill Shape */
.message-content {
    padding: 14px 18px;
    border-radius: 24px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    animation: messageSlide 0.3s var(--md-motion-easing-emphasized-decelerate) forwards;
}

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

/* M3 Expressive Sent Message - Gradient */
.message.sent .message-content {
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 8px;
    box-shadow: var(--md-elevation-primary);
}

/* M3 Expressive Received Message - Soft Container */
.message.received .message-content {
    background: white;
    color: var(--md-on-surface);
    border-bottom-left-radius: 8px;
    box-shadow: var(--md-elevation-1);
    border: 1px solid var(--md-outline-variant);
}

/* M3 Expressive Message Typography */
.message-content p {
    margin: 0;
    font-size: 15px;
    line-height: 22px;
    letter-spacing: 0.15px;
    font-weight: 400;
}

.message-content small {
    display: block;
    font-size: 11px;
    line-height: 16px;
    letter-spacing: 0.5px;
    margin-top: 4px;
    opacity: 0.7;
}

/* M3 Expressive Message Footer - Time & Read Receipts */
.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
}

.message-time {
    font-size: 11px;
    line-height: 16px;
    letter-spacing: 0.4px;
}

.message-status {
    display: inline-flex;
    align-items: center;
}

.message-status .material-symbols-outlined {
    font-size: 16px;
}

/* M3 Expressive Read Receipts */
.message-sent {
    color: rgba(255, 255, 255, 0.7);
}

.message-read {
    color: rgba(255, 255, 255, 0.95);
}

/* M3 Typing Indicator */
.typing-indicator {
    padding: 8px 16px;
    margin-bottom: 4px;
    text-align: left;
}

.typing-text {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    color: var(--md-on-surface-variant);
    font-style: italic;
    animation: m3TypingPulse 1.5s ease-in-out infinite;
}

@keyframes m3TypingPulse {
    0%, 100% {
        color: var(--md-on-surface-variant);
        opacity: 0.7;
    }
    50% {
        color: var(--md-primary);
        opacity: 1;
    }
}

/* M3 Expressive Message Time Colors */
.message.sent .message-status {
    margin-left: 2px;
}

.message.sent .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.message.received .message-time {
    color: var(--md-on-surface-variant);
}

.message.received .message-footer {
    justify-content: flex-start;
    padding-left: 4px;
}

.message.sent small {
    text-align: right;
}

.message.received small {
    text-align: left;
}

/* M3 Expressive Location Card */
.location {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
}

.message.sent .location {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--md-on-primary);
}

.message.received .location {
    background-color: var(--md-surface-container-highest);
    color: var(--md-on-surface);
}

.location-shared {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.25px;
}

.location-shared .material-symbols-outlined {
    font-size: 18px;
}

.view-location-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition-base);
}

.view-location-link:hover {
    opacity: 0.8;
}

.view-location-link::after {
    content: '→';
    font-size: 14px;
}

/* ===================================
   M3 MESSAGE INPUT BAR
   Unified chat input with icons + text field
   =================================== */

/* M3 Expressive Chat Input Bar */
.message-input,
/* ===================================
   M3 CHAT INPUT BAR
   Based on M3 Text Fields & Icon Buttons
   =================================== */
.message-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 16px;
    position: sticky;
    bottom: 0;
    z-index: 2;
    border-top: 1px solid var(--md-outline-variant);
}

@media (min-width: 768px) {
    .message-input-bar {
        background: var(--md-surface-container-low);
        border-top: none;
        border-radius: var(--md-shape-xl);
        margin: 12px 16px 16px;
        padding: 8px 12px;
    }
}

/* M3 Icon Buttons - Standard style */
.message-input-bar .input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--md-surface-container-high);
    border: none;
    border-radius: var(--md-shape-full);
    color: var(--md-on-surface-variant);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-base);
    padding: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.message-input-bar .input-icon:hover {
    background: var(--md-surface-container-highest);
    color: var(--md-on-surface);
}

.message-input-bar .input-icon:active {
    transform: scale(0.95);
}

/* M3 Text field container - Filled style */
.message-input-bar .text-field {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--md-surface-container-highest);
    border-radius: var(--md-shape-full);
    padding: 0 8px 0 20px;
    min-height: 48px;
    gap: 8px;
    border: 2px solid transparent;
    transition: var(--transition-base);
}

.message-input-bar .text-field:focus-within {
    border-color: var(--md-primary);
    background: var(--md-surface-container-low);
}

/* Text input */
.message-input-bar .text-field input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.01em;
    color: var(--md-on-surface);
    outline: none;
    padding: 12px 0;
    width: 100%;
    min-width: 0;
}

.message-input-bar .text-field input::placeholder {
    color: var(--md-on-surface-variant);
}

/* M3 Send Button - Filled FAB style */
.message-input-bar .send-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--md-primary);
    border: none;
    border-radius: var(--md-shape-full);
    color: var(--md-on-primary);
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition-base);
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.message-input-bar .send-icon:hover:not(.disabled) {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.message-input-bar .send-icon:active:not(.disabled) {
    transform: scale(0.95);
}

.message-input-bar .send-icon.disabled {
    background: var(--md-surface-container-high);
    color: var(--md-on-surface-variant);
    cursor: default;
}

/* Legacy support */
.message-input .image-button,
.message-input .location-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--md-surface-container-high);
    border: none;
    border-radius: var(--md-shape-full);
    color: var(--md-on-surface-variant);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-base);
}

.message-input .image-button:hover,
.message-input .location-button:hover {
    background: var(--md-surface-container-highest);
    color: var(--md-on-surface);
}

.message-input .image-button:disabled,
.message-input .location-button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.message-input .send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--md-primary);
    border: none;
    border-radius: var(--md-shape-full);
    color: var(--md-on-primary);
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition-base);
}

.message-input .send-button:disabled {
    background: var(--md-surface-container-high);
    color: var(--md-on-surface-variant);
    cursor: default;
}

/* Message input wrapper - legacy */
.message-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--md-surface-container-highest);
    border-radius: var(--md-shape-full);
    padding: 0 8px 0 20px;
    min-height: 48px;
    gap: 8px;
}


/* M3 Image Preview Container */
.image-preview-container {
    padding: 16px;
    background: var(--md-surface-container-low);
    border-top: none;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    min-height: 80px;
}

.image-preview {
    width: 200px;
    height: 150px;
    border-radius: var(--md-shape-md);
    object-fit: cover;
    box-shadow: var(--md-elevation-1);
    display: block;
    background: var(--md-surface-container-highest);
}

.heic-preview-placeholder {
    width: 200px;
    height: 150px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.heic-preview-placeholder i {
    font-size: 3rem;
    opacity: 0.9;
}

.heic-preview-placeholder span {
    font-weight: 600;
    font-size: 1rem;
}

.heic-preview-placeholder small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.heic-preview-placeholder .upload-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* M3 Clear Image Button */
.clear-image-btn {
    position: absolute;
    top: 12px;
    left: 180px;
    background: var(--md-error);
    color: var(--md-on-error);
    border: none;
    border-radius: var(--md-shape-full);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-base);
    z-index: 10;
    box-shadow: var(--md-elevation-1);
}

.clear-image-btn:hover {
    box-shadow: var(--md-elevation-2);
}


/* Button Spinner (smaller for send button) */
.button-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chat Images in Messages */
.message-image-container {
    position: relative;
    margin-bottom: 0.5rem;
}

.chat-image {
    max-width: 100%;
    width: 100%;
    max-height: 300px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    object-fit: cover;
    display: block;
    margin-bottom: 8px;
}

.chat-image:hover:not(.image-uploading):not(.image-failed) {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Pending Message States */
.message-pending .message-content {
    opacity: 0.7;
}

.image-uploading {
    opacity: 0.6;
    cursor: default;
}

.message-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-upload-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Failed Message States */
.message-failed .message-content {
    opacity: 0.8;
}

.image-failed {
    opacity: 0.5;
    cursor: default;
}

.message-failed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.9);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
}

.message-failed-overlay i {
    font-size: 2rem;
}

.message-failed-overlay span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Image Modal */
/* M3 Image Modal */
.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--md-surface-container-lowest);
    border-radius: var(--md-shape-xl);
    overflow: hidden;
    box-shadow: var(--md-elevation-5);
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    object-fit: contain;
}

/* M3 Close Modal Button */
.close-modal-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--md-inverse-surface);
    color: var(--md-inverse-on-surface);
    border: none;
    border-radius: var(--md-shape-full);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: var(--transition-base);
    z-index: 10;
}

.close-modal-btn:hover {
    background: var(--md-on-surface);
}

/* ===================================
   M3 CHAT HEADER - Small Top App Bar
   =================================== */
.chat-header {
    padding: 8px 4px 8px 4px;
    border-bottom: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    background: var(--md-surface);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 64px;
}

/* M3 Back Button - Icon Button */
.chat-back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--md-shape-full);
    background: transparent;
    color: var(--md-on-surface);
    text-decoration: none;
    transition: var(--transition-base);
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.chat-back-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    border-radius: inherit;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.chat-back-button:hover::before {
    opacity: var(--md-state-hover);
}

.chat-back-button:active::before {
    opacity: var(--md-state-pressed);
}

/* M3 Chat Header Title */
.chat-header h2 {
    margin: 0;
    font-size: 22px;
    line-height: 28px;
    color: var(--md-on-surface);
    font-weight: 400;
    letter-spacing: 0;
}

/* M3 Share Location in Header - Icon Button */
.chat-header .share-location-button {
    background: transparent;
    border: none;
    color: var(--md-on-surface-variant);
    padding: 0;
    border-radius: var(--md-shape-full);
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
    margin-left: auto;
}

.chat-header .share-location-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    border-radius: inherit;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.chat-header .share-location-button:hover::before {
    opacity: var(--md-state-hover);
}

.chat-header .share-location-button:hover {
    color: var(--md-primary);
}

.chat-header .share-location-button:active::before {
    opacity: var(--md-state-pressed);
}

.chat-header .share-location-button i {
    line-height: 1;
    transition: transform 0.2s ease;
}

.chat-header .share-location-button:hover i {
    transform: translateY(-1px);
}

/* Time display */
.time-display {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    margin: 1rem 0;
    opacity: 0.8;
}

/* Profile styles */
.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-header h2 {
    margin-top: 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-md);
}

.profile-info {
    padding: 0.5rem;
}

.profile-field {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

.profile-field strong {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.reviews {
    margin-top: 2.5rem;
}

.review {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.reviewer {
    font-weight: 600;
}

.rating {
    color: #ffc107;
}

.review-comment {
    margin-bottom: 0.75rem;
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

/* M3 Expressive Rides Section */
.rides-section {
    margin-bottom: 32px;
}

.rides-section h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    color: var(--md-on-surface-variant);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--md-outline-variant);
}

/* ===================================
   M3 EXPRESSIVE RIDE CARDS
   Clean, modern, no legacy elements
   =================================== */
.rides-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ride-card {
    background: white;
    border-radius: var(--md-shape-xl);
    padding: 0;
    overflow: hidden;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    border: none;
    box-shadow: none;
}

.ride-card:hover {
    box-shadow: var(--md-elevation-2);
}

.ride-card.past-ride {
    opacity: 0.6;
}

/* Card Header - Airport & Delete */
.ride-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 0;
    gap: 16px;
}

.ride-header .airport {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--md-on-surface);
    flex: 1;
}

/* Delete button - subtle icon */
.ride-header .delete-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--md-shape-full);
    color: var(--md-on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
    box-shadow: none;
}

.ride-header .delete-button:hover {
    background: var(--md-error-container);
    color: var(--md-error);
    transform: none;
    box-shadow: none;
}

.ride-header .delete-button:disabled {
    color: var(--md-outline);
    cursor: not-allowed;
    background: transparent;
}

.ride-header .delete-button i {
    font-size: 18px;
}

/* Status chips */
.ride-header .status {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--md-shape-full);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.status-active {
    background-color: var(--md-primary-container);
    color: var(--md-primary);
}

.status-completed {
    background-color: var(--md-surface-container);
    color: var(--md-on-surface-variant);
}

.status-cancelled {
    background-color: var(--md-error-container);
    color: var(--md-error);
}

/* Card Details - Clean list */
.ride-details {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ride-details p {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
    color: var(--md-on-surface-variant);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ride-details strong {
    font-weight: 600;
    color: var(--md-on-surface);
}

/* Passenger count with icon */
.ride-passengers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--md-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.ride-passengers i,
.ride-passengers .material-symbols-outlined {
    font-size: 18px;
    color: var(--md-primary);
}

/* Empty state */
.no-rides {
    text-align: center;
    padding: 48px 24px;
    background: transparent;
    border-radius: var(--md-shape-xl);
    color: var(--md-on-surface-variant);
}

.no-rides i,
.no-rides .material-symbols-outlined {
    font-size: 48px;
    color: var(--md-outline);
    margin-bottom: 16px;
    display: block;
}

.no-rides p {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.no-rides a {
    color: var(--md-primary);
    font-weight: 600;
    text-decoration: none;
}

.no-rides a:hover {
    text-decoration: underline;
}

.no-rides a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.no-rides a:hover {
    text-decoration: underline;
}

/* No matches container with airport activity */
.no-matches-container {
    padding: 32px 24px;
}

.no-matches-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--md-on-surface);
    margin: 0 0 24px 0;
    line-height: 1.3;
}

/* Airport Activity Section */
.airport-activity {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.activity-section {
    padding: 0;
}

.activity-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--md-on-surface);
    margin: 0 0 8px 0;
}

.activity-label-live {
    color: var(--md-primary);
    animation: pulse-live 2s ease-in-out infinite;
}

.activity-label-primary {
    color: var(--md-primary);
}

@keyframes pulse-live {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.activity-period {
    font-weight: 400;
    color: var(--md-on-surface-variant);
}

.activity-stat {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--md-on-surface-variant);
    margin: 0 0 4px 0;
    line-height: 1.5;
}

.activity-stat-zero {
    color: var(--md-outline);
    font-style: italic;
}

.activity-detail {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--md-on-surface-variant);
    margin: 4px 0 0 0;
    line-height: 1.4;
}

/* Activity loading state */
.activity-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    color: var(--md-on-surface-variant);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--md-outline-variant);
    border-top-color: var(--md-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Airport search styles */
.airport-search-container {
    position: relative;
}

/* Clear airport selection button - Light gray circle with white X */
.clear-airport-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #d1d5db;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    transition: var(--transition-base);
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.clear-airport-button:hover {
    background: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.clear-airport-button:active {
    background: #6b7280;
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.clear-airport-button i {
    font-size: 10px;
    color: white;
}

/* Adjust input padding when clear button is visible */
.airport-search-container input.has-clear-button {
    padding-right: 40px;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .clear-airport-button {
        width: 22px;
        height: 22px;
        right: 10px;
    }
    
    .clear-airport-button i {
        font-size: 11px;
    }
    
    .airport-search-container input.has-clear-button {
        padding-right: 42px;
    }
}

/* Modern Airport Suggestions Dropdown */
.airport-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideInDown 0.15s ease;
}

.airport-suggestion {
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

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

.airport-suggestion:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(220, 38, 38, 0.05) 100%);
}

/* Disabled airport styles */
.airport-suggestion.airport-disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #fafafa;
}

.airport-suggestion.airport-disabled:hover {
    background-color: #fafafa;
}

.airport-suggestion.airport-disabled .airport-name,
.airport-suggestion.airport-disabled .airport-location {
    color: var(--text-muted);
}

.airport-info {
    flex: 1;
}

.airport-name {
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.airport-location {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.airport-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* Terminal Selection Styles */
.loading-terminals {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.loading-terminals i {
    color: var(--primary);
}

.terminal-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background-color: white;
    color: #171717;
    font-family: inherit;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    padding-right: 3rem;
    cursor: pointer;
}

.terminal-select:hover {
    border-color: #d1d5db;
}

.terminal-select:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 107, 91, 0.1);
}

.terminal-select:disabled {
    background-color: #f9fafb;
    cursor: not-allowed;
    opacity: 0.6;
}

.terminal-select option:disabled {
    color: #9ca3af;
}

/* Ride Selector - Horizontal Date/Airport Navigation */
.ride-selector {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0 1.25rem;
}

.ride-selector-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--md-outline-variant) transparent;
    width: 100%;
    padding: 0.25rem 0;
    -webkit-overflow-scrolling: touch;
}

.ride-selector-options::-webkit-scrollbar {
    height: 4px;
}

.ride-selector-options::-webkit-scrollbar-track {
    background: transparent;
}

.ride-selector-options::-webkit-scrollbar-thumb {
    background: var(--md-outline-variant);
    border-radius: 4px;
}

.ride-selector-option {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--md-on-surface-variant);
    cursor: pointer;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    border-radius: var(--md-shape-full);
    background: transparent;
    border: 1px solid var(--md-outline-variant);
}

.ride-selector-option:hover {
    color: var(--md-primary);
    border-color: var(--md-primary);
    background: var(--md-primary-container);
}

/* Indicator for options with matches - subtle dot or different weight */
.ride-selector-option-has-matches {
    color: var(--md-primary);
    font-weight: 600;
}

.ride-selector-option-has-matches:hover {
    background: var(--md-primary-container);
}

.ride-selector-option-active {
    color: white;
    font-weight: 600;
    background: var(--md-primary);
    border-color: var(--md-primary);
    box-shadow: var(--md-elevation-2);
}

.ride-selector-option-active:hover {
    background: var(--md-primary-hover);
}

/* Active + has matches - same style, already selected */
.ride-selector-option-active.ride-selector-option-has-matches {
    color: white;
    background: var(--md-primary);
}

/* ===================================
   M3 MATCHES LIST
   =================================== */
.matches-list-compact {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.match-item {
    transition: var(--transition-base);
}

/* M3 List Item */
.match-item-collapsed {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 16px;
    cursor: pointer;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    border-radius: var(--md-shape-lg);
    margin: 0 -16px 4px;
    min-height: 72px;
    background: transparent;
    border: 1px solid transparent;
}

.match-item-collapsed:hover {
    background: var(--md-surface-container);
}

/* M3 Expressive Avatar */
.match-item-thumbnail {
    width: 56px;
    height: 56px;
    border-radius: var(--md-shape-full);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--md-surface-container);
    box-shadow: var(--md-elevation-1);
}

.match-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--md-shape-full);
}

.match-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-item-title {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.5px;
    color: var(--md-on-surface);
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-item-subtitle {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    color: var(--md-on-surface-variant);
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* M3 Badge/Chip */
.match-item-badge {
    flex-shrink: 0;
    background: var(--md-primary-container);
    color: var(--md-primary);
    padding: 6px 12px;
    border-radius: var(--md-shape-full);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.02em;
    font-weight: 700;
}

/* ===================================
   M3 EXPANDED MATCH CARD
   =================================== */
.match-item-expanded {
    margin: 8px 0;
    padding: 0;
}

.match-card-expanded {
    position: relative;
    border-radius: var(--md-shape-xl);
    overflow: hidden;
    background: var(--md-surface-container-low);
    box-shadow: var(--md-elevation-2);
    width: 100%;
    animation: m3ExpandCard var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized-decelerate);
}

@keyframes m3ExpandCard {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* M3 Close Button - Icon Button */
.match-collapse-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: var(--md-shape-full);
    background: var(--md-surface-container-highest);
    border: none;
    color: var(--md-on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    box-shadow: var(--md-elevation-1);
}

.match-collapse-button:hover {
    background: var(--md-surface-container-high);
    box-shadow: var(--md-elevation-2);
}

.match-collapse-button .material-symbols-outlined {
    font-size: 20px;
}

/* M3 Profile Image Container */
.match-card-image-container {
    padding: 16px 16px 0;
}

.match-card-expanded .match-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--md-shape-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--md-surface-container-highest);
}

.match-card-expanded .match-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--md-motion-duration-medium2) var(--md-motion-easing-standard);
}

.match-card-expanded .match-card-image:hover img {
    transform: scale(1.02);
}

/* M3 Info Section */
.match-card-info {
    padding: 20px 24px 24px;
}

/* M3 Header with Name */
.match-card-expanded .match-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.match-card-expanded .match-card-name {
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--md-on-surface);
    text-decoration: none;
    transition: color var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.match-card-expanded .match-card-name:hover {
    color: var(--md-primary);
}

/* M3 Savings Chip */
.match-savings-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--md-primary-container);
    color: var(--md-primary);
    border-radius: var(--md-shape-full);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0;
}

.match-savings-chip .material-symbols-outlined {
    font-size: 16px;
}

/* M3 Details Grid */
.match-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin-bottom: 24px;
}

.match-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--md-on-surface-variant);
    text-transform: uppercase;
}

.detail-value {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: 0.15px;
    color: var(--md-on-surface);
}

/* M3 Action Buttons */
.match-card-expanded .match-card-actions {
    display: flex;
    gap: 12px;
    justify-content: stretch;
}

/* M3 Primary Action - Filled Button */
.match-action-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 24px;
    background: var(--md-primary);
    color: var(--md-on-primary);
    border: none;
    border-radius: var(--md-shape-full);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: var(--transition-base);
}

.match-action-primary:hover {
    box-shadow: var(--md-elevation-1);
}

.match-action-primary .material-symbols-outlined {
    font-size: 18px;
}

/* M3 Secondary Action - Outlined Button */
.match-action-secondary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 24px;
    background: transparent;
    color: var(--md-primary);
    border: 1px solid var(--md-outline);
    border-radius: var(--md-shape-full);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: var(--transition-base);
}

.match-action-secondary:hover {
    background: rgba(0, 107, 91, 0.08);
}

.match-action-secondary .material-symbols-outlined {
    font-size: 18px;
}

.matches-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
    align-items: start;
}

/* Modern Match Cards - Profile Card Style */
.match-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 400px;
    max-height: 600px;
}

.match-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

/* Profile Image Section - Full Card Background */
.match-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.match-card-image img {
    width: 100%;
    object-fit: cover;
    object-position: center;
}

/* Airport Code - Top Center */
.match-card-airport-code {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: white;
    z-index: 10;
    pointer-events: none;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.airport-code-line {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
    line-height: 1.1;
}

/* Legacy Overlay - Kept for non-expanded cards */
.match-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    pointer-events: none;
}

.match-card-overlay > * {
    pointer-events: auto;
}

/* Header Section */
.match-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.match-card-name {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    transition: opacity 0.2s ease;
}

.match-card-name:hover {
    opacity: 0.9;
}

/* Center Section - Info Row */
.match-card-center {
    margin-bottom: 1rem;
}

/* Stats Container - Simple Text */
.match-card-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.match-stat {
    background: none;
    border: none;
    padding: 0;
    min-width: 0;
}

.match-stat .stat-value {
    font-size: 1rem;
    font-weight: 400;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.match-stat .stat-value::before {
    content: "• ";
    margin-right: 0.25rem;
}

.match-stat:first-child .stat-value::before {
    content: "";
    margin-right: 0;
}

/* Passenger count and savings badge */
.match-passengers {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.match-passengers i {
    font-size: 1rem;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.match-passengers .passenger-number {
    font-size: 1rem;
    font-weight: 400;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.match-passengers .savings-badge,
.match-card-header .savings-badge {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: 0.25rem;
}

.match-passengers .savings-arrow {
    font-size: 0.875rem;
    color: rgb(0, 255, 0);
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.match-passengers {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgb(0, 255, 0);
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.match-card-header .savings-arrow {
    font-size: 0.875rem;
    color: rgb(0, 255, 0);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.match-card-header {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(0, 255, 0);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Date */
.match-card-date {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    text-transform: none;
    white-space: nowrap;
    line-height: 1.1;
}

/* Comparison Section */
.match-card-comparison {
    margin-bottom: 1rem;
}

.comparison-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.comparison-label {
    font-size: 1rem;
    font-weight: 400;
    min-width: 60px;
}

.comparison-time {
    font-size: 1rem;
    font-weight: 600;
    min-width: 50px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.comparison-party {
    font-size: 1rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.comparison-value {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.comparison-distance {
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Chat Button */
.match-card-actions {
    display: flex;
    justify-content: center;
}

.match-chat-button {
    padding: 0.4rem 1.5rem;
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    width: auto;
}

.match-chat-button:hover {
    background: #f87171;
    transform: scale(1.05);
}

.match-chat-button:active {
    transform: scale(0.95);
}

/* Keep old button styles for backward compatibility */
.match-info {
    flex: 1;
    min-width: 0;
}

.match-info h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.match-actions {
    display: flex !important;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Modern Chat & Action Buttons */
.chat-button, .review-button {
    flex: 1;
    padding: 12px 20px;
    min-width: 120px;
    min-height: 44px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    text-decoration: none;
    font-size: 0.9375rem;
}

.chat-button {
    background: var(--primary) !important;
    position: relative;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
}

.chat-button:hover {
    background: var(--primary-dark) !important;
}

.chat-button i {
    font-size: 1rem;
    color: white;
}

.review-button {
    background-color: var(--text-muted);
}

/* Review styles */
.ride-info {
    margin-bottom: 2rem;
}

.rating-section {
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.star {
    font-size: 1.5rem;
    color: var(--border-color);
    cursor: pointer;
}

.star.filled {
    color: var(--primary-color);
}

/* Error message */
/* Modern Error & Success Messages */
/* Informational messages - used for location verification, hints, etc. */
.error-message,
.info-message {
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border-left: 4px solid var(--md-primary);
    box-shadow: var(--shadow-sm);
    animation: slideInDown 0.3s ease;
}

.success-message {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(72, 187, 120, 0.05) 100%);
    color: var(--success-color);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border-left: 4px solid var(--success-color);
    box-shadow: var(--shadow-sm);
    animation: slideInDown 0.3s ease;
}

.success-message::before {
    content: "✅";
    font-size: 1.25rem;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-3xl);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
}

.loading::after {
    content: "";
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: var(--space-md);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Delete button */
.delete-button {
    background-color: var(--error-color);
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
}

.delete-button:hover {
    background-color: #9F1F1F;
    box-shadow: var(--md-elevation-1);
}

.delete-button:active {
    transform: translateY(0);
}

.delete-button:disabled {
    background-color: #f87171;
    cursor: not-allowed;
    transform: none;
}

.delete-button i {
    font-size: 1rem;
}

.ride-actions {
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

/* Responsive design - Mobile first approach */
@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding: 1.5rem;
    }
    
    button {
        width: auto;
    }
    
    .card {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 1.75rem;
    }
    
    .message {
        max-width: 70%;
    }
    
    .match-card {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: var(--space-lg);
    }
    
    .match-info {
        flex: 1 1 auto;
        min-width: 0;
    }
    
    .match-actions {
        flex: 0 0 auto;
        min-width: 140px;
        width: auto;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .match-actions .chat-button,
    .match-actions button.chat-button {
        flex: 1;
        min-width: 120px;
        white-space: nowrap;
        display: inline-flex !important;
        visibility: visible !important;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
        padding: 2rem;
    }
    
    .rides-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .matches-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .match-item-collapsed {
        padding: 0.75rem 1rem;
        margin: 0 -1rem;
    }

    .match-item-thumbnail {
        width: 64px;
        height: 64px;
    }

    .match-item-expanded {
        margin: 12px 0;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
    
    .rides-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .matches-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.destinations {
    margin: 1.25rem 0;
    display: grid;
    gap: 1.25rem;
    padding: 0;
}

@media (min-width: 640px) {
    .destinations {
        grid-template-columns: repeat(2, 1fr);
    }
}

.destination {
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.06) 0%, rgba(220, 38, 38, 0.03) 100%);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.destination p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.time-diff {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.75rem;
}

/* Search form special styling */
.setNowButton {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    width: auto;
    min-width: 80px;
    max-width: 100px;
    justify-content: center;
    transition: all 150ms ease;
}

.setNowButton:hover {
    background-color: var(--primary-dark);
}

.setNowButton i {
    font-size: 0.875rem;
}

/* Add responsive adjustments for mobile */
@media (max-width: 480px) {
    .timeInputWrapper {
        gap: 0.25rem;
    }
    
    .setNowButton {
        padding: 0.5rem 0.75rem;
        min-width: 60px;
        font-size: 0.8125rem;
    }
    
    .timeInputWrapper input[type="datetime-local"] {
        min-width: 140px;
    }
}

.timeInputWrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.timeInputWrapper input[type="datetime-local"] {
    flex: 1;
    min-width: 0;
}

/* Passenger input uses standard number input field styling (see input styles above) */

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--md-on-surface-variant);
    font-size: 0.875rem;
    text-align: center;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: modalOverlayFadeIn var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized-decelerate);
}

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

@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
    }
}

.modal-content {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-md);
}

/* Delete Account Modal Header */
.delete-modal .modal-header h3 {
    margin: 0;
    color: var(--error-color);
    font-size: 1.2rem;
}

/* Profile Modal Header */
.profile-modal .modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: auto;
    line-height: 1;
}

.close-button:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

/* M3 Login and Register form styling */
.register-link, .login-link {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    color: var(--md-on-surface-variant);
}

.register-link a, .login-link a {
    color: var(--md-primary);
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover, .login-link a:hover {
    text-decoration: underline;
}

/* M3 Auth subtitle and terms */
.auth-subtitle {
    text-align: center;
    color: var(--md-on-surface-variant);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    margin: 8px 0 32px 0;
}

.auth-terms {
    text-align: center;
    color: var(--md-on-surface-variant);
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.4px;
    margin: 24px 0 8px 0;
}

.auth-terms a {
    color: var(--md-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* M3 Login/Register Containers */
.login-container, .register-container {
    background: var(--md-surface-container-lowest);
    border-radius: var(--md-shape-xl);
    padding: 32px;
    margin: 32px auto;
    max-width: 400px;
    box-shadow: var(--md-elevation-1);
}

.login-container h2, .register-container h2 {
    text-align: center;
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
    color: var(--md-on-surface);
    margin-bottom: 8px;
}

/* OAuth / Google Sign-In Styles */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0 1rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e5e5;
}

.auth-divider span {
    padding: 0 1rem;
}

.google-signin-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0 1.5rem 0;
    min-height: 44px;
}

/* Style for the Google Sign-In button iframe */
.google-signin-container iframe {
    max-width: 100%;
}

/* Home page styles - See hero section below for main styling */

.home-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    padding: var(--space-md) var(--space-2xl);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.125rem;
    transition: var(--transition-base);
    min-width: 220px;
    box-shadow: var(--shadow-colored);
    position: relative;
    overflow: hidden;
}

.home-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: var(--transition-base);
}

.home-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), 0 20px 50px -15px rgba(249, 115, 22, 0.5);
}

.home-button:hover::before {
    opacity: 1;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .home-hero {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .home-hero-image img {
        max-width: 450px;
    }

    .home-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.profile-actions {
    margin-top: 2rem;
    text-align: center;
}

.edit-profile-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.edit-profile-button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

.terms-group {
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Units Toggle Switch */
.units-toggle-container {
    display: flex;
    justify-content: flex-start;
    margin: 0.5rem 0;
}

.units-toggle-pill {
    background-color: #f1f5f9;
    border-radius: 100px;
    padding: 4px;
    display: inline-flex;
    position: relative;
}

.toggle-option {
    font-size: 1rem;
    padding: 8px 24px;
    border: none;
    background: none;
    border-radius: 100px;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.toggle-option.active {
    color: #000000;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Remove old toggle switch styles */
.units-toggle,
.switch,
.slider,
.unit-label {
    display: none;
}

/* Form Group Spacing */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.field-note {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}

/* Success Message */
.success-message {
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.primary-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.primary-button:hover {
    background-color: #1976D2;
}

.primary-button:disabled {
    background-color: #90CAF9;
    cursor: not-allowed;
}

.danger-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.danger-button:hover {
    background-color: #d32f2f;
}

/* Modern Profile Button */
.profile-button {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition-base);
    margin-left: auto;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.profile-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: var(--transition-base);
}

.profile-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.profile-button:hover::before {
    opacity: 1;
}

.profile-button:active {
    transform: scale(0.95);
}

.profile-button:active {
    transform: scale(0.95);
}


/* M3 Location Error Snackbar */
.location-error-message {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--md-inverse-surface);
    color: var(--md-inverse-on-surface);
    padding: 14px 24px;
    border-radius: var(--md-shape-xs);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    box-shadow: var(--md-elevation-3);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
    max-width: 90%;
    text-align: center;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Chat Error Toast (e.g., file size errors) */
.chat-error-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--md-error-container);
    color: var(--md-on-error-container);
    padding: 14px 24px;
    border-radius: var(--md-shape-xs);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    box-shadow: var(--md-elevation-3);
    z-index: 1001;
    animation: slideDown 0.3s ease-out;
    max-width: 90%;
    text-align: center;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.message-content .location-link {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.message.received .message-content .location-link {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.message-content .view-location-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.message-content .view-location-link:hover {
    opacity: 1;
}

.message-content .view-location-link i {
    font-size: 0.9rem;
}

/* M3 Chat User Info - List Item Style */
.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--md-shape-full);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.chat-user-info::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    border-radius: inherit;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.chat-user-info:hover::before {
    opacity: var(--md-state-hover);
}

.chat-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--md-shape-full);
    object-fit: cover;
    border: none;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

.chat-user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--md-shape-full);
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 18px;
}

.chat-user-name {
    font-weight: 400;
    color: var(--md-on-surface);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* M3 Chat Responsive Styles */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 100px);
        border-radius: 0;
    }
    
    .chat-header {
        padding: 8px 4px;
        gap: 0;
        min-height: 56px;
    }
    
    .chat-back-button {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .messages {
        padding: 12px;
        gap: 2px;
    }
    
    .message-sender-label {
        font-size: 11px;
        margin-left: 40px;
    }
    
    .message-avatar,
    .message-avatar-placeholder {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .message-content {
        padding: 10px 14px;
        border-radius: 18px;
    }
    
    .message-content p {
        font-size: 14px;
        line-height: 20px;
    }
    
    .message-input,
    .message-input-bar {
        padding: 8px 12px;
        gap: 6px;
    }
    
    .message-input .image-button,
    .message-input .location-button,
    .message-input-bar .input-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 22px;
    }
    
    .message-input-wrapper,
    .message-input-bar .text-field {
        min-height: 44px;
        padding: 0 6px 0 16px;
    }
    
    .message-input .send-button,
    .message-input-bar .send-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 20px;
    }

    /* Ride selector responsive */
    .ride-selector {
        padding: 0.375rem 0 0.75rem;
    }

    .ride-selector-option {
        font-size: 0.75rem;
        padding: 0.35rem 0.625rem;
    }
    
    .ride-selector-arrow {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 0.7rem;
    }

    /* Match card responsive styles */
    .matches-list-compact {
        padding: 0;
    }

    .match-item-collapsed {
        padding: 0.625rem 0.5rem;
        margin: 0 -0.5rem;
    }

    .match-item-thumbnail {
        width: 48px;
        height: 48px;
    }

    .match-item-title {
        font-size: 0.9375rem;
    }

    .match-item-subtitle {
        font-size: 0.8125rem;
    }

    .match-item-badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }

    /* M3 Expanded Match Card - Mobile */
    .match-item-expanded {
        margin: 8px 0;
    }

    .match-card-expanded {
        border-radius: var(--md-shape-lg);
    }

    .match-card-image-container {
        padding: 12px 12px 0;
    }

    .match-card-info {
        padding: 16px 16px 20px;
    }

    .match-card-expanded .match-card-name {
        font-size: 20px;
        line-height: 28px;
    }

    .match-card-details {
        gap: 12px 16px;
    }

    .match-card-expanded .match-card-actions {
        flex-direction: column;
        gap: 8px;
    }

    .match-action-primary,
    .match-action-secondary {
        width: 100%;
    }

    .match-chat-button {
        font-size: 1.1rem;
    }
} 
/* ===================================
   M3 HOME PAGE STYLES
   Material Design 3 Inspired Landing
   =================================== */

.home-page {
    background: var(--md-surface);
    min-height: 100vh;
}

/* M3 Top App Bar for Home */
.home-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    animation: navSlideDown 0.6s var(--md-motion-easing-emphasized-decelerate) forwards;
}

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

.home-nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.home-logo {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--md-on-surface);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-logo .material-symbols-outlined {
    background: var(--md-primary-container);
    color: var(--md-primary) !important;
    padding: 6px;
    border-radius: var(--md-shape-sm);
}

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

.home-nav-link {
    color: var(--md-on-surface);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0;
    padding: 10px 16px;
    border-radius: var(--md-shape-md);
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
}

.home-nav-link:hover {
    background: var(--md-primary-container);
    color: var(--md-primary);
    color: var(--md-on-surface);
}

/* M3 Filled Button for Nav */
.home-nav-btn {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: var(--md-shape-lg);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    position: relative;
    overflow: hidden;
    box-shadow: var(--md-elevation-primary);
}

.home-nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 1;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.home-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -8px rgba(79, 70, 229, 0.5);
}

.home-nav-btn:hover::before {
    opacity: 0.7;
}

/* M3 Hero Section */
.home-hero {
    padding: 160px 24px 100px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 120%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, transparent 60%);
    pointer-events: none;
    animation: heroBlob 15s ease-in-out infinite;
}

.home-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -5%;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 60%);
    pointer-events: none;
    animation: heroBlob 20s ease-in-out infinite reverse;
}

@keyframes heroBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
}

.home-hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
    animation: heroContentEnter 0.8s var(--md-motion-easing-emphasized-decelerate) forwards;
}

@keyframes heroContentEnter {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    animation: heroImageEnter 1s var(--md-motion-easing-emphasized-decelerate) 0.2s forwards;
    opacity: 0;
}

@keyframes heroImageEnter {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.home-hero-image img {
    width: 100%;
    max-width: 520px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 30px 60px rgba(79, 70, 229, 0.3));
    animation: heroFloat 6s ease-in-out infinite;
}

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

/* M3 Expressive Display Typography for Hero */
.home-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(48px, 9vw, 72px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--md-on-surface);
    margin-bottom: 28px;
}

.home-hero-accent {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: 0;
    color: var(--md-on-surface-variant);
    max-width: 520px;
    margin-bottom: 40px;
    font-weight: 400;
}

/* M3 Extended FAB Style Button */
.home-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-gradient);
    color: white;
    padding: 18px 32px;
    border-radius: var(--md-shape-xl);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.02em;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    box-shadow: var(--md-elevation-primary);
    position: relative;
    overflow: hidden;
}

.home-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    opacity: 1;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.home-btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 50px -10px rgba(79, 70, 229, 0.5);
}

.home-btn-primary:hover::before {
    opacity: 0.7;
}

/* M3 Expressive Stats Section */
.home-stats {
    padding: 100px 24px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.home-stat {
    background: white;
    border-radius: var(--md-shape-xl);
    padding: 32px;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    border: 1px solid var(--md-outline-variant);
    position: relative;
    overflow: hidden;
}

.home-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-hero);
    opacity: 0;
    transition: opacity var(--md-motion-duration-short4) var(--md-motion-easing-standard);
}

.home-stat:hover {
    transform: translateY(-8px);
    box-shadow: var(--md-elevation-4);
}

.home-stat:hover::before {
    opacity: 1;
}

.home-stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.home-stat-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
    color: var(--md-on-surface-variant);
    font-weight: 400;
}

/* M3 Expressive How It Works Section */
.home-how {
    padding: 100px 24px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.home-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--md-secondary);
    margin-bottom: 56px;
    display: inline-block;
    padding: 8px 16px;
    background: var(--md-secondary-container);
    border-radius: var(--md-shape-full);
}

.home-how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.home-how-item {
    position: relative;
    background: white;
    border-radius: var(--md-shape-xl);
    padding: 32px;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-spring);
    border: 1px solid var(--md-outline-variant);
    text-align: center;
}

.home-how-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--md-elevation-4);
    border-color: var(--md-primary);
    box-shadow: var(--md-elevation-1);
}

.home-how-number {
    font-size: 57px;
    font-weight: 400;
    color: var(--md-primary-container);
    line-height: 64px;
    margin-bottom: 16px;
    letter-spacing: -0.25px;
}

.home-how-item h3 {
    font-size: 22px;
    font-weight: 400;
    line-height: 28px;
    color: var(--md-on-surface);
    margin-bottom: 8px;
}

.home-how-item p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    color: var(--md-on-surface-variant);
}

/* M3 Timing Section */
.home-timing {
    padding: 48px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.home-timing-content {
    text-align: center;
}

.home-timing-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 44px;
    margin-bottom: 48px;
    color: var(--md-on-surface);
    letter-spacing: 0;
}

.home-timing-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 48px;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.home-timing-option {
    text-align: left;
    background: var(--md-surface-container);
    border-radius: var(--md-shape-xl);
    padding: 24px;
}

.timing-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--md-primary);
    margin-bottom: 12px;
}

.home-timing-option h3 {
    font-size: 28px;
    font-weight: 400;
    line-height: 36px;
    margin-bottom: 12px;
    color: var(--md-on-surface);
}

.home-timing-option p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    color: var(--md-on-surface-variant);
}

.home-timing-divider {
    width: 1px;
    background: var(--md-outline-variant);
    align-self: stretch;
}

@media (max-width: 768px) {
    .home-timing {
        padding: 32px 16px 64px;
    }
    
    .home-timing-title {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 32px;
    }
    
    .home-timing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .home-timing-divider {
        display: none;
    }
    
    .home-timing-option {
        text-align: left;
    }
}

/* M3 Features Section */
.home-features {
    padding: 80px 24px;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--md-surface-container-lowest);
}

.home-features-split {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
}

.home-features-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 44px;
    letter-spacing: 0;
    color: var(--md-on-surface);
    margin-top: 24px;
}

.home-features-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.home-feature-item {
    background: var(--md-surface-container);
    border-radius: var(--md-shape-md);
    padding: 20px;
    transition: var(--transition-base);
}

.home-feature-item:hover {
    background: var(--md-surface-container-high);
}

.home-feature-item h3 {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0.15px;
    color: var(--md-on-surface);
    margin-bottom: 8px;
}

.home-feature-item p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    color: var(--md-on-surface-variant);
}

/* M3 CTA Section */
.home-cta {
    padding: 140px 24px;
    width: calc(100% - 48px);
    max-width: 1400px;
    margin: 0 auto 100px auto;
    text-align: center;
    background: var(--primary-gradient);
    border-radius: 48px;
    position: relative;
    overflow: hidden;
}

.home-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.home-cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.home-cta-content {
    position: relative;
    z-index: 1;
}

.home-cta-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(36px, 6vw, 52px);
    font-weight: 700;
    line-height: 1.1;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.home-cta-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.home-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--md-primary);
    padding: 16px 32px;
    border-radius: var(--md-shape-full);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.1px;
    transition: var(--transition-base);
    box-shadow: var(--md-elevation-2);
}

.home-btn-cta:hover {
    box-shadow: var(--md-elevation-4);
}

/* M3 Footer */
.home-footer {
    border-top: none;
    padding: 48px 24px;
    background: var(--md-surface-container-low);
}

.home-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.home-footer-logo {
    font-weight: 400;
    font-size: 22px;
    color: var(--md-on-surface);
    margin-bottom: 8px;
}

.home-footer-left p {
    color: var(--md-on-surface-variant);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    max-width: 300px;
}

.home-footer-right {
    display: flex;
    gap: 8px;
}

.home-footer-right a {
    color: var(--md-on-surface-variant);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    padding: 10px 12px;
    border-radius: var(--md-shape-full);
    transition: var(--transition-base);
}

.home-footer-right a:hover {
    background: rgba(0, 107, 91, 0.08);
    color: var(--md-on-surface);
}

/* Responsive */
@media (max-width: 1024px) {
    .home-features-split {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .home-features-right {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 10rem 1.5rem 6rem;
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .home-hero-image {
        order: -1;
    }

    .home-hero-image img {
        max-width: 400px;
    }

    .home-hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .home-hero-text {
        font-size: 1.125rem;
    }

    .home-stats-grid,
    .home-how-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .home-stat-number {
        font-size: 3rem;
    }

    .home-how-number {
        font-size: 3.5rem;
    }

    .home-features-title {
        font-size: 2rem;
    }

    .home-cta {
        padding: 6rem 1.5rem;
    }

    .home-footer-content {
        flex-direction: column;
        gap: 3rem;
    }

    .home-nav-link {
        display: none;
    }
}

/* CTA Divider */
.home-cta-divider {
    margin: 2rem 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* App Store Buttons */
.home-app-stores {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.home-store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    transition: transform 0.2s, opacity 0.2s;
}

.home-store-btn img {
    height: 100%;
    width: auto;
    display: block;
}

.home-store-btn.google img {
    transform: scale(1.5);
}

.home-store-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .home-app-stores {
        flex-direction: column;
        gap: 1rem;
    }
    
    .home-store-btn {
        height: 50px;
    }
}

/* Modal Profile Carousel Styles */
.profile-modal-carousel {
    background: black !important;
    border-radius: var(--md-shape-xl) var(--md-shape-xl) 0 0;
    width: 100%;
    max-width: 100%;
    height: 95vh;
    height: 95dvh;
    overflow: hidden;
    position: relative;
    animation: modalSlideUp var(--md-motion-duration-long1) var(--md-motion-easing-emphasized-decelerate);
}

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

@media (min-width: 768px) {
    .profile-modal-carousel {
        width: 400px;
        max-width: 400px;
        height: auto;
        max-height: 85vh;
        border-radius: var(--md-shape-xl);
        animation: modalScaleIn var(--md-motion-duration-medium4) var(--md-motion-easing-emphasized-decelerate);
    }
    
    @keyframes modalScaleIn {
        from {
            transform: scale(0.9);
            opacity: 0;
        }
        to {
            transform: scale(1);
            opacity: 1;
        }
    }
}

/* M3 Modal Close Button */
.modal-close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: var(--md-shape-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    padding: 0;
    box-shadow: none;
    min-width: 44px;
}

.modal-close-button .material-symbols-outlined {
    font-size: 22px;
}

.modal-close-button:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

.modal-close-button:active {
    transform: scale(0.95);
}

/* M3 Bottom Sheet Drag Handle */
.modal-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    cursor: grab;
}

.drag-handle-bar {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    transition: var(--transition-base);
}

.modal-drag-handle:hover .drag-handle-bar {
    background: rgba(255, 255, 255, 0.6);
    width: 48px;
}

@media (min-width: 768px) {
    .modal-drag-handle {
        display: none;
    }
}

/* ===================================
   M3 PROFILE PAGE
   =================================== */

/* Override container padding for profile page */
.container:has(.profile-card-container) {
    padding: 0;
    max-width: 600px;
    min-height: auto;
}

.profile-card-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

.profile-card-main {
    background: var(--md-surface-container-low);
    border-radius: var(--md-shape-lg);
    overflow: hidden;
    box-shadow: var(--md-elevation-1);
}

/* M3 Profile Carousel */
.profile-carousel {
    position: relative;
    width: 100%;
    background: var(--md-surface-container-highest);
}

.profile-carousel .carousel-wrapper {
    position: relative;
    width: 100%;
    /* Fill available viewport height minus navbar */
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px); /* Dynamic viewport height for mobile */
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.profile-carousel .carousel-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.profile-carousel .carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill space, crop if needed */
    object-position: center top; /* Focus on face/top of image */
    display: block;
}

/* M3 Carousel Placeholder */
.profile-carousel .carousel-placeholder {
    width: 100%;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    background: var(--md-surface-container-highest);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-carousel .carousel-placeholder img {
    width: 40%;
    height: auto;
    object-fit: cover;
    border-radius: var(--md-shape-full);
    opacity: 0.5;
}

/* M3 Edit Button - Top Right */
.carousel-edit-link {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--md-on-surface);
    border-radius: var(--md-shape-full);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1px;
    text-decoration: none;
    box-shadow: var(--md-elevation-1);
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
}

.carousel-edit-link .material-symbols-outlined {
    font-size: 14px;
}

.carousel-edit-link:hover {
    box-shadow: var(--md-elevation-2);
    background: rgba(255, 255, 255, 1);
}

/* M3 Carousel Indicator - Minimal Line Style */
.profile-carousel .carousel-dots {
    position: absolute;
    top: 4px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    z-index: 10;
    padding: 0;
    margin: 0;
    background: none;
}

.profile-carousel .carousel-dots button.carousel-dot,
.profile-carousel button.carousel-dot {
    /* Complete button reset */
    all: unset !important;
    display: block !important;
    flex: 1 !important;
    height: 2px !important;
    min-height: 2px !important;
    max-height: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 1px !important;
    background: rgba(255, 255, 255, 0.35) !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    outline: none !important;
}

.profile-carousel .carousel-dots button.carousel-dot::before,
.profile-carousel button.carousel-dot::before {
    display: none !important;
}

.profile-carousel .carousel-dots button.carousel-dot:hover,
.profile-carousel button.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

.profile-carousel .carousel-dots button.carousel-dot.active,
.profile-carousel button.carousel-dot.active {
    background: rgba(255, 255, 255, 0.95) !important;
}

/* M3 Carousel Tap/Swipe Areas - Full coverage */
.profile-carousel .carousel-tap-areas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    z-index: 5;
}

.profile-carousel .tap-area {
    flex: 1;
    cursor: pointer;
}

.profile-carousel .tap-area-left {
    cursor: w-resize;
}

.profile-carousel .tap-area-right {
    cursor: e-resize;
}

.profile-carousel .tap-area:active {
    background: rgba(255, 255, 255, 0.1);
}

/* M3 Profile Info Overlay */
.profile-carousel .profile-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 20px 24px;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.75) 0%, 
        rgba(0, 0, 0, 0.5) 50%, 
        rgba(0, 0, 0, 0.2) 80%, 
        transparent 100%);
    color: white;
    pointer-events: none;
}

.profile-carousel .profile-card-header {
    text-align: left;
}

.profile-carousel .profile-card-name {
    font-family: 'Google Sans', sans-serif;
    font-size: 36px;
    line-height: 44px;
    font-weight: 400;
    letter-spacing: 0;
    margin: 0 0 8px 0;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.profile-carousel .profile-card-bio {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    letter-spacing: 0.25px;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Loading State */
.loading-profile {
    text-align: center;
    padding: 48px 24px;
    color: var(--md-on-surface-variant);
    font-size: 16px;
    line-height: 24px;
}

/* M3 Profile Page - Mobile */
@media (max-width: 768px) {
    .profile-card-container {
        padding: 0 12px;
        max-width: 100%;
    }
    
    .profile-card-main {
        border-radius: var(--md-shape-lg);
    }
    
    .profile-carousel .carousel-wrapper {
        height: calc(100vh - 56px);
        height: calc(100dvh - 56px);
        max-height: none;
    }
    
    .profile-carousel .carousel-placeholder {
        height: calc(100vh - 56px);
        height: calc(100dvh - 56px);
        max-height: none;
    }
    
    .profile-carousel .profile-card-name {
        font-size: 28px;
        line-height: 34px;
    }
    
    .profile-carousel .profile-card-bio {
        font-size: 15px;
        line-height: 22px;
    }
    
    .profile-carousel .profile-card-overlay {
        padding: 40px 16px 20px;
    }
    
    .carousel-edit-link {
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .carousel-edit-link .material-symbols-outlined {
        font-size: 12px;
    }
    
    .profile-carousel .carousel-dots {
        top: 4px;
        left: 6px;
        right: 6px;
        gap: 2px;
    }
    
    .profile-carousel .carousel-dots button.carousel-dot,
    .profile-carousel button.carousel-dot {
        height: 2px !important;
        min-height: 2px !important;
        max-height: 2px !important;
    }
}

.modal-profile-card {
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
}

/* M3 Modal Profile Carousel */
.modal-profile-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: black;
}

.modal-profile-carousel .carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.modal-profile-carousel .carousel-image {
    width: 100%;
    height: 100%;
}

.modal-profile-carousel .carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: opacity var(--md-motion-duration-medium2) var(--md-motion-easing-standard);
}

.modal-profile-carousel .carousel-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--md-primary) 0%, #6366F1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-profile-carousel .carousel-placeholder img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--md-shape-full);
    border: 4px solid rgba(255, 255, 255, 0.3);
}

/* M3 Carousel Indicator - Minimal Line Style */
.modal-profile-carousel .carousel-dots {
    position: absolute;
    top: 4px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    z-index: 10;
    padding: 0;
    margin: 0;
    background: none;
}

.modal-profile-carousel .carousel-dots button.carousel-dot,
.modal-profile-carousel button.carousel-dot {
    all: unset !important;
    display: block !important;
    flex: 1 !important;
    height: 2px !important;
    min-height: 2px !important;
    max-height: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 1px !important;
    background: rgba(255, 255, 255, 0.35) !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    outline: none !important;
}

.modal-profile-carousel .carousel-dots button.carousel-dot::before,
.modal-profile-carousel button.carousel-dot::before {
    display: none !important;
}

.modal-profile-carousel .carousel-dots button.carousel-dot:hover,
.modal-profile-carousel button.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

.modal-profile-carousel .carousel-dots button.carousel-dot.active,
.modal-profile-carousel button.carousel-dot.active {
    background: rgba(255, 255, 255, 0.95) !important;
}

/* M3 Tap Areas for Navigation */
.modal-profile-carousel .carousel-tap-areas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 100px;
    display: flex;
    pointer-events: none;
}

.modal-profile-carousel .tap-area {
    flex: 1;
    pointer-events: all;
    cursor: pointer;
    transition: background var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.modal-profile-carousel .tap-area:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal-profile-carousel .tap-area:active {
    background: rgba(255, 255, 255, 0.1);
}

/* M3 Profile Overlay Info */
.modal-profile-carousel .profile-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 80px 24px 40px;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.9) 0%, 
        rgba(0, 0, 0, 0.6) 50%, 
        transparent 100%);
    color: white;
}

.modal-profile-carousel .profile-card-header {
    text-align: left;
}

.modal-profile-carousel .profile-card-name {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    line-height: 42px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 12px 0;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-profile-carousel .profile-card-bio {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.01em;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    max-width: 400px;
}

/* Loading Spinner for Modal */
.profile-modal-carousel .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    gap: 16px;
}

.profile-modal-carousel .loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.profile-modal-carousel .modal-body p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.profile-modal-carousel .modal-body.error {
    color: var(--md-error);
    padding: 24px;
    text-align: center;
}

/* Airport Code Hover Effect */
.match-card:hover .match-card-airport-code {
    background: rgba(0, 0, 0, 0.65);
}

/* Airport Code Mobile */
@media (max-width: 768px) {
    .match-card-airport-code {
        font-size: 0.8rem;
        padding: 0.4rem 0.85rem;
        top: 0.75rem;
    }
}

/* WhatsApp-style Chats List */
/* ===================================
   M3 CHAT LIST
   Based on https://m3.material.io/components/lists
   =================================== */

/* Chats Card - Optimized padding for list */
.chats-card {
    padding: 0 !important;
    overflow: hidden;
}

.chats-card > h2 {
    padding: 24px 24px 16px;
    margin: 0;
    font-size: 22px;
    line-height: 28px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--md-on-surface);
    border-bottom: none;
}

.chats-card .loading-container,
.chats-card .error-message,
.chats-card .empty-state {
    padding: 24px;
}

.chats-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0 0 8px;
}

/* M3 List Item - Two-line variant */
.chat-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 24px 8px 16px;
    min-height: 72px;
    cursor: pointer;
    transition: var(--transition-base);
    background-color: transparent;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border: none;
    border-radius: 0;
}

/* M3 State Layer */
.chat-list-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--md-on-surface);
    opacity: 0;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
    pointer-events: none;
}

.chat-list-item:hover::before {
    opacity: var(--md-state-hover);
}

.chat-list-item:active::before {
    opacity: var(--md-state-pressed);
}

/* M3 Focus indicator */
.chat-list-item:focus-visible {
    outline: none;
}

.chat-list-item:focus-visible::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 2px solid var(--md-primary);
    border-radius: var(--md-shape-sm);
    pointer-events: none;
}

/* M3 Avatar - 56px for prominent lists */
.chat-item-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--md-shape-full);
    overflow: hidden;
    background-color: var(--md-surface-container-highest);
    position: relative;
    z-index: 1;
}

.chat-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* M3 List Content */
.chat-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

/* M3 Title - body-large */
.chat-item-name {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--md-on-surface);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* M3 Trailing supporting text - label-small */
.chat-item-time {
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--md-on-surface-variant);
    white-space: nowrap;
    flex-shrink: 0;
}

.chat-item-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* M3 Supporting text - body-medium */
.chat-item-last-message {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0.25px;
    color: var(--md-on-surface-variant);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.chat-item-last-message i,
.chat-item-last-message .material-symbols-outlined {
    margin-right: 4px;
    font-size: 16px;
    vertical-align: middle;
    color: var(--md-on-surface-variant);
}

/* M3 Badge */
.chat-item-unread {
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: var(--md-shape-full);
    min-width: 16px;
    min-height: 16px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* M3 Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--md-on-surface-variant);
}

.empty-icon {
    font-size: 48px;
    color: var(--md-on-surface-variant);
    margin-bottom: 16px;
    opacity: 0.5;
}

/* M3 Empty State Typography */
.empty-state h3 {
    font-size: 22px;
    line-height: 28px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--md-on-surface);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    color: var(--md-on-surface-variant);
    margin-bottom: 24px;
}

/* M3 Empty State Button - Filled */
.empty-state .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    height: 40px;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    text-decoration: none;
    border-radius: var(--md-shape-full);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    transition: var(--transition-base);
    box-shadow: none;
}

.empty-state .btn-primary:hover {
    box-shadow: var(--md-elevation-1);
}

/* Loading state */
.loading-container {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-lg);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-muted);
    font-size: var(--text-base);
}

/* M3 Chat List Responsive */
@media (max-width: 768px) {
    .chat-list-item {
        padding: 12px 16px;
        min-height: 64px;
        gap: 12px;
    }
    
    .chat-item-avatar {
        width: 48px;
        height: 48px;
    }
    
    .chat-item-name {
        font-size: 14px;
        line-height: 20px;
    }
    
    .chat-item-time {
        font-size: 11px;
    }
    
    .chat-item-last-message {
        font-size: 12px;
        line-height: 16px;
    }
}

/* ============================================
   TERMS PAGE STYLES
   ============================================ */

.terms-page {
    background: #ffffff;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    color: #171717;
}

.terms-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
}

.terms-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.terms-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #000;
    margin-bottom: 1rem;
}

.terms-subtitle {
    font-size: 1rem;
    color: #737373;
    font-weight: 400;
}

.terms-body {
    margin-bottom: 4rem;
}

.terms-section {
    margin-bottom: 3rem;
}

.terms-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.terms-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.terms-section p {
    font-size: 1.0625rem;
    color: #737373;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.terms-section ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.terms-section ul li {
    font-size: 1.0625rem;
    color: #737373;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.terms-section ul li:before {
    content: "•";
    color: var(--md-primary);
    font-weight: bold;
    font-size: 1.25rem;
    position: absolute;
    left: 0;
}

.terms-section strong {
    font-weight: 700;
    color: #000;
}

.terms-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.terms-section a:hover {
    text-decoration: underline;
}

.terms-warning {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.terms-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin: 4rem 0;
}

.terms-cta h3 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.terms-cta .home-btn-primary {
    background: white;
    color: var(--primary);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}

.terms-cta .home-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .terms-content {
        padding: 6rem 1.5rem 3rem 1.5rem;
    }

    .terms-title {
        font-size: 2rem;
    }

    .terms-section h2 {
        font-size: 1.25rem;
    }

    .terms-section p,
    .terms-section ul li {
        font-size: 0.9375rem;
    }

    .terms-cta {
        padding: 2rem 1.5rem;
    }

    .terms-cta h3 {
        font-size: 1.5rem;
    }
}

/* ============================================
   BLOCK USER FEATURE - M3 Coherent Styles
   Extends existing design patterns
   ============================================ */

/* 
   Chat Header Extensions for Menu
   Uses existing .chat-header styles, adds menu button
*/
.chat-header-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.chat-header-right {
    position: relative;
    display: flex;
    align-items: center;
}

/* Three Dots Menu Button - Minimal, just the icon */
.chat-menu-btn {
    background: transparent;
    border: none;
    color: var(--md-on-surface);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: var(--md-shape-md);
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-spring);
    position: relative;
}

.chat-menu-btn:hover {
    background: var(--md-primary-container);
    color: var(--md-primary);
}

.chat-menu-btn .material-symbols-outlined {
    font-size: 24px;
}

/* Chat Menu Dropdown - Matches Navigation Drawer design */
.chat-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: linear-gradient(180deg, var(--md-surface-bright) 0%, var(--md-surface-container) 100%);
    box-shadow: var(--md-elevation-5);
    z-index: 100;
    overflow: hidden;
    border-radius: var(--md-shape-xl);
    padding: 8px;
    animation: menuSlideIn var(--md-motion-duration-medium4) var(--md-motion-easing-emphasized-decelerate);
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chat Menu Item - Matches .menu-drawer-link design */
.chat-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--md-on-surface);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    gap: 16px;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-spring);
    font-size: 15px;
    letter-spacing: 0;
    border-radius: var(--md-shape-lg);
    min-height: 52px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.chat-menu-item:hover,
.chat-menu-item:active,
.chat-menu-item:focus {
    background: var(--md-primary-container) !important;
    color: var(--md-primary);
    transform: translateX(4px);
    outline: none;
}

.chat-menu-item .material-symbols-outlined {
    width: 24px;
    height: 24px;
    font-size: 24px;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    color: var(--md-on-surface-variant);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-menu-item:hover .material-symbols-outlined {
    color: var(--md-primary);
}

/* Danger variant */
.chat-menu-item-danger {
    color: var(--md-error);
}

.chat-menu-item-danger .material-symbols-outlined {
    color: var(--md-error);
}

.chat-menu-item-danger:hover {
    background: rgba(186, 26, 26, 0.12);
    color: var(--md-error);
}

.chat-menu-item-danger:hover .material-symbols-outlined {
    color: var(--md-error);
}

.chat-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--md-outline-variant), transparent);
    margin: 8px 16px;
}

/* Block Modal - Uses existing modal patterns */
.block-modal {
    max-width: 312px;
}

.block-modal .modal-body {
    text-align: center;
    padding: 24px;
}

.block-warning-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--md-error-container, rgba(186, 26, 26, 0.12));
    border-radius: var(--md-shape-full);
}

.block-warning-icon .material-symbols-outlined {
    font-size: 24px;
    color: var(--md-error);
}

.block-warning-text {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0.25px;
    color: var(--md-on-surface);
    margin: 0 0 8px 0;
}

.block-warning-details {
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    letter-spacing: 0.4px;
    color: var(--md-on-surface-variant);
    margin: 0;
}

.block-modal .modal-footer {
    padding: 16px 24px 24px;
    gap: 8px;
}

/* M3 Filled Button - Danger */
.confirm-block-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 24px;
    background: var(--md-error);
    color: var(--md-on-error);
    border: none;
    border-radius: var(--md-shape-full);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.confirm-block-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.confirm-block-button:hover::before {
    opacity: 0.08;
}

.confirm-block-button:active::before {
    opacity: 0.12;
}

.confirm-block-button:disabled {
    background: var(--md-on-surface);
    color: var(--md-surface);
    opacity: 0.38;
    cursor: not-allowed;
}

.confirm-block-button .material-symbols-outlined {
    font-size: 18px;
}

/* ============================================
   BLOCKED USERS SECTION
   Subtle, rarely-used feature
   ============================================ */

.blocked-users-section {
    padding: 16px 0;
}

/* Blocked Users Toggle - Just text, nothing else */
.blocked-users-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 8px 16px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

.blocked-users-toggle:hover,
.blocked-users-toggle:active,
.blocked-users-toggle:focus {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none;
}

.blocked-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-primary);
}

.blocked-toggle-icon {
    font-size: 18px;
    color: var(--md-primary);
    transition: transform var(--md-motion-duration-short4) var(--md-motion-easing-standard);
}

.blocked-users-toggle.expanded .blocked-toggle-icon {
    transform: rotate(180deg);
}

/* Blocked Users List */
.blocked-users-list {
    margin-top: 8px;
}

/* Blocked User Item - Same as chat list but muted */
.blocked-user-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 24px 8px 16px;
    min-height: 72px;
    opacity: 0.6;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.blocked-user-item:hover {
    opacity: 0.8;
}

/* Avatar */
.blocked-user-avatar {
    position: relative;
    flex-shrink: 0;
}

.blocked-user-avatar img {
    width: 56px;
    height: 56px;
    border-radius: var(--md-shape-full);
    object-fit: cover;
}

.blocked-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: var(--md-on-surface-variant);
    border-radius: var(--md-shape-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--md-surface);
}

.blocked-badge .material-symbols-outlined {
    font-size: 10px;
    color: var(--md-surface);
}

/* Content */
.blocked-user-content {
    flex: 1;
    min-width: 0;
}

.blocked-user-name {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: var(--md-on-surface);
    margin: 0;
}

.blocked-user-date {
    font-size: 14px;
    line-height: 20px;
    color: var(--md-on-surface-variant);
    margin: 0;
}

/* Unblock Button - Compact text button */
.unblock-button {
    padding: 6px 12px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--md-shape-full);
    color: var(--md-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.unblock-button:hover,
.unblock-button:active,
.unblock-button:focus {
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: underline;
}

.unblock-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.unblock-button .spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .blocked-user-item {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .blocked-user-avatar img {
        width: 48px;
        height: 48px;
    }
}
