/* ================================================================
   LIAM GUARD - PREMIUM AI INSURANCE CONSULTANT DESIGN
   Modern, Elegant, Professional Insurance Theme
   ================================================================ */

/* ============== ROOT VARIABLES ============== */
:root {
    /* Premium Color Palette - Insurance Professional Theme */
    --color-primary: #10b981;
    --color-primary-dark: #059669;
    --color-primary-light: #34d399;
    --color-secondary: #3b82f6;
    --color-secondary-dark: #2563eb;
    --color-secondary-light: #60a5fa;
    --color-accent: #8b5cf6;
    --color-accent-dark: #7c3aed;
    --color-accent-light: #a78bfa;

    /* Background Colors - Dark Premium Theme */
    --color-bg-primary: #0a0e1a;
    --color-bg-secondary: #111827;
    --color-bg-tertiary: #1f2937;
    --color-bg-card: #1a1f2e;
    --color-bg-elevated: #252d3f;

    /* Text Colors */
    --color-text-primary: #f9fafb;
    --color-text-secondary: #d1d5db;
    --color-text-tertiary: #9ca3af;
    --color-text-muted: #6b7280;

    /* Status Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 50%, #111827 100%);
    --gradient-card: linear-gradient(145deg, rgba(26, 31, 46, 0.9), rgba(17, 24, 39, 0.8));
    --gradient-orb: radial-gradient(circle at center, rgba(16, 185, 129, 0.15), transparent 70%);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.3);
    --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.3);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-primary: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    --font-secondary: 'Sora', 'Inter', system-ui, sans-serif;
}

/* ============== GLOBAL RESET ============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* ============== PREMIUM BACKGROUND ============== */
.premium-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--gradient-hero);
    overflow: hidden;
}

.gradient-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-orb);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
    top: 50%;
    right: -150px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
    bottom: -100px;
    left: 30%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

/* ============== APP WRAPPER ============== */
.app-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============== TOP NAVIGATION ============== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-2xl);
    background: rgba(26, 31, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.brand-icon {
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    font-weight: 500;
}

.nav-actions {
    display: flex;
    gap: var(--space-sm);
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ============== MAIN GRID LAYOUT ============== */
.main-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--space-xl);
    padding: var(--space-2xl);
    flex: 1;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* ============== ASSISTANT PANEL (LEFT) ============== */
.assistant-panel {
    background: var(--gradient-card);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-2xl);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

/* AI Profile */
.ai-profile {
    text-align: center;
}

.avatar-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto var(--space-lg);
}

.avatar-glow {
    position: absolute;
    inset: -20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

.avatar-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(16, 185, 129, 0.3);
    box-shadow: var(--shadow-glow);
}

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

.avatar-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--color-success);
    border-radius: 50%;
    border: 3px solid var(--color-bg-card);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.avatar-status.online {
    animation: pulse 2s ease-in-out infinite;
}

.status-pulse {
    position: absolute;
    inset: -4px;
    background: var(--color-success);
    border-radius: 50%;
    opacity: 0.4;
    animation: ping 2s ease-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

@keyframes ping {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.profile-role {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    color: var(--color-primary-light);
    font-size: 0.8rem;
    font-weight: 600;
    margin: var(--space-sm) auto 0;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

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

.stat-label {
    font-size: 0.7rem;
    color: var(--color-text-tertiary);
    text-align: center;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.features-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.feature-text span {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

/* ============== CONSULTATION PANEL (RIGHT) ============== */
.consultation-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: var(--space-md);
    background: var(--gradient-card);
    padding: var(--space-sm);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--color-text-tertiary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.mode-tab:hover {
    color: var(--color-text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.mode-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: var(--shadow-glow);
}

.mode-tab svg {
    width: 20px;
    height: 20px;
}

/* Consultation Content */
.consultation-content {
    display: none;
    flex-direction: column;
    gap: var(--space-xl);
    background: var(--gradient-card);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-2xl);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    min-height: 600px;
}

.consultation-content.active {
    display: flex;
}

/* Status Header */
.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text-tertiary);
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.connected .status-dot {
    background: var(--color-success);
}

.status-indicator.connecting .status-dot {
    background: var(--color-warning);
}

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

.help-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
}

/* Conversation Area */
.conversation-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    overflow-y: auto;
    max-height: 500px;
    padding-right: var(--space-sm);
}

.conversation-area::-webkit-scrollbar {
    width: 6px;
}

.conversation-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-full);
}

.conversation-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

.conversation-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Welcome Card */
.welcome-card {
    text-align: center;
    padding: var(--space-2xl);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
}

.welcome-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-lg);
}

.welcome-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(16, 185, 129, 0.3);
    box-shadow: var(--shadow-glow);
}

.wave-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    animation: ripple 3s ease-out infinite;
}

.ring:nth-child(1) {
    animation-delay: 0s;
}

.ring:nth-child(2) {
    animation-delay: 1s;
}

.ring:nth-child(3) {
    animation-delay: 2s;
}

@keyframes ripple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.6;
    }
    100% {
        width: 150%;
        height: 150%;
        opacity: 0;
    }
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-message {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.feature-badge {
    padding: var(--space-xs) var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    color: var(--color-primary-light);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Messages Container */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.message {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    max-width: 80%;
    animation: messageSlideIn 0.3s ease-out;
}

.message.user {
    background: var(--gradient-secondary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: var(--space-xs);
}

.message.ai {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    align-self: flex-start;
    border-bottom-left-radius: var(--space-xs);
}

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

/* Control Panel */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
}

.audio-visualizer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 50px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.audio-visualizer.active {
    opacity: 1;
}

.wave-bar {
    width: 4px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% {
        height: 20px;
    }
    50% {
        height: 40px;
    }
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.control-btn:hover::before {
    transform: translateX(0);
}

.control-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.control-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.4);
}

.control-btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.control-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

.control-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

.control-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Camera Request */
.camera-request {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.request-content {
    text-align: center;
    max-width: 400px;
}

.request-icon {
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
}

.request-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.request-desc {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

/* Video Chat Area */
.video-chat-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.video-box {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-bg-tertiary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.video-box video,
.ai-video-display {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-video-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-card);
}

.ai-video-display img {
    width: 60%;
    height: 60%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(16, 185, 129, 0.3);
}

.video-label {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.video-controls-overlay {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    display: flex;
    gap: var(--space-sm);
}

.video-ctrl-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.video-ctrl-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.speaking-indicator {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.speaking-indicator.active {
    opacity: 1;
}

.camera-off-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    color: var(--color-text-tertiary);
    gap: var(--space-md);
}

.video-action-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* Upload Panel */
.upload-panel {
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
}

.upload-zone {
    padding: var(--space-2xl);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.upload-zone:hover {
    border-color: var(--color-primary);
    background: rgba(16, 185, 129, 0.05);
}

.upload-zone h4 {
    margin: var(--space-md) 0 var(--space-sm);
    color: var(--color-text-primary);
}

.upload-zone p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
}

.file-input {
    display: none;
}

.uploaded-files {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.uploaded-file {
    padding: var(--space-sm) var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Footer */
.app-footer {
    display: flex;
    justify-content: center; /* Centers content horizontally */
    align-items: center;      /* Centers vertically */
    padding: var(--space-lg) var(--space-2xl);
    background: rgba(26, 31, 46, 0.6);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-tertiary);
    font-size: 0.85rem;
    text-align: center;       /* Ensures text is centered if it wraps */
}

.app-footer a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.app-footer a:hover {
    color: var(--color-primary-light);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    z-index: 1000;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    border-top-color: var(--color-secondary);
    animation-delay: 0.3s;
}

.spinner-ring:nth-child(3) {
    border-top-color: var(--color-accent);
    animation-delay: 0.6s;
}

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

.loading-text {
    color: var(--color-text-secondary);
    font-weight: 600;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-xl);
    min-width: 300px;
    animation: toastSlideIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-error);
}

.toast.warning {
    border-left: 4px solid var(--color-warning);
}

.toast.info {
    border-left: 4px solid var(--color-info);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============== RESPONSIVE DESIGN ============== */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 320px 1fr;
    }
}

@media (max-width: 968px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .assistant-panel {
        position: relative;
        top: 0;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .top-nav {
        padding: var(--space-md);
    }

    .main-grid {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .consultation-content {
        padding: var(--space-md);
    }

    .mode-tabs {
        flex-direction: column;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   CHAT SUPPORT STYLES
   ========================================== */

/* Chat Messages Area */
.chat-messages-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.5rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), transparent);
}

/* Chat Welcome Card */
.chat-welcome-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    margin-bottom: 2rem;
    animation: slideInUp 0.6s ease-out;
}

.chat-welcome-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

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

.chat-welcome-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f9fafb;
    margin: 0 0 0.5rem 0;
}

.chat-welcome-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

/* Quick Topics */
.chat-quick-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-chip {
    padding: 0.4rem 0.9rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.topic-chip:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

/* Chat Messages Container */
.chat-messages-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Message Bubble */
.chat-message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlideIn 0.4s ease-out;
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.user-message .message-avatar {
    border-color: rgba(59, 130, 246, 0.3);
}

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

.message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-message .message-content {
    align-items: flex-end;
}

.message-bubble {
    padding: 0.875rem 1.125rem;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
}

/* AI Message Bubble */
.ai-message .message-bubble {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #f9fafb;
    border-bottom-left-radius: 4px;
}

/* User Message Bubble */
.user-message .message-bubble {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #f9fafb;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 0.5rem;
}

.message-status {
    font-size: 0.75rem;
    color: rgba(16, 185, 129, 0.6);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.typing-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

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

.typing-bubble {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    border-bottom-left-radius: 4px;
}

.typing-dots {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: rgba(16, 185, 129, 0.6);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Chat Input Area */
.chat-input-area {
    padding: 1.5rem;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.chat-attachment-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-attachment-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f9fafb;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    resize: none;
    max-height: 120px;
    line-height: 1.5;
    padding: 0.5rem 0;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-send-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0 0.25rem;
}

.chat-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.chat-session-info {
    font-size: 0.8rem;
    color: rgba(16, 185, 129, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Status Dot Modifier */
.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Animations */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    30% {
        transform: scale(1.3);
        opacity: 1;
    }
}

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

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

/* File Upload Section */
.chat-file-upload-section {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chat-file-preview {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    max-width: 250px;
    animation: slideInUp 0.3s ease-out;
}

.chat-file-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    color: #10b981;
    font-size: 1.25rem;
}

.chat-file-info {
    flex: 1;
    min-width: 0;
}

.chat-file-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #f9fafb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.chat-file-size {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.chat-file-remove {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-file-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

/* Image Preview */
.chat-file-preview.image-preview {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem;
}

.chat-file-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.chat-file-preview.image-preview .chat-file-info {
    width: 100%;
}

.chat-file-preview.image-preview .chat-file-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* File Upload Progress */
.chat-file-uploading {
    opacity: 0.6;
    pointer-events: none;
}

.chat-file-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.chat-file-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Message with File Attachment */
.message-attachment {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-attachment:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}

.message-attachment.image {
    padding: 0;
    overflow: hidden;
}

.message-attachment-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    display: block;
}

.message-attachment-file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-attachment-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    color: #10b981;
    font-size: 1.1rem;
}

.message-attachment-info {
    flex: 1;
}

.message-attachment-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #f9fafb;
}

.message-attachment-size {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.125rem;
}

.message-attachment-download {
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive Design for Chat */
@media (max-width: 768px) {
    .chat-welcome-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .message-content {
        max-width: 85%;
    }

    .chat-input-wrapper {
        padding: 0.5rem;
    }

    .chat-attachment-btn,
    .chat-send-btn {
        width: 36px;
        height: 36px;
    }

    .chat-file-preview {
        max-width: 100%;
    }

    .message-attachment-image {
        max-width: 100%;
    }
}
