/* ═══════════════════════════════════════════════════════════════════════════ */
/* WELL BEING AGENT — Enhanced Modern UI                                     */
/* ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* ── Brand Colors ────────────────────────────── */
    --primary-pink: #ff6b93;
    --primary-pink-light: #ff8fa9;
    --primary-pink-lighter: #ffb6c8;
    --primary-pink-lightest: #ffe8ee;
    --secondary-pink: #f8c9d4;
    --accent-pink: #ff4d7a;

    /* ── Semantic Colors ─────────────────────────── */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #6366f1;

    /* ── Neutral Palette ─────────────────────────── */
    --white: #ffffff;
    --white-soft: #fefefe;
    --white-softer: #fafafa;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --text-dark: #2d2d3a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* ── Typography Scale (8pt baseline) ────────── */
    --text-xs:   0.75rem;    /* 12px — timestamps, hints */
    --text-sm:   0.875rem;   /* 14px — secondary labels */
    --text-base: 1rem;       /* 16px — body text */
    --text-lg:   1.125rem;   /* 18px — card titles */
    --text-xl:   1.375rem;   /* 22px — section subheads */
    --text-2xl:  1.625rem;   /* 26px — panel headings */
    --text-3xl:  2rem;       /* 32px — page headings */
    --text-4xl:  2.5rem;     /* 40px — hero display */

    /* ── Spacing Scale (8px grid) ────────────────── */
    --space-1:  0.5rem;    /*  8px */
    --space-2:  1rem;      /* 16px */
    --space-3:  1.5rem;    /* 24px */
    --space-4:  2rem;      /* 32px */
    --space-5:  2.5rem;    /* 40px */
    --space-6:  3rem;      /* 48px */
    --space-8:  4rem;      /* 64px */

    /* ── Shadow Scale ────────────────────────────── */
    --shadow-xs:     0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-sm:     0 4px 12px rgba(255, 107, 147, 0.08);
    --shadow-soft:   0 8px 24px rgba(255, 107, 147, 0.10);
    --shadow-medium: 0 12px 32px rgba(255, 107, 147, 0.14);
    --shadow-strong: 0 20px 48px rgba(255, 107, 147, 0.16);
    --shadow-glow:   0 0 0 4px rgba(255, 107, 147, 0.12);

    /* ── Glass ───────────────────────────────────── */
    --glass-bg:     rgba(255, 255, 255, 0.70);
    --glass-border: rgba(255, 255, 255, 0.40);
    --glass-blur:   blur(20px);

    /* ── Border Radius ───────────────────────────── */
    --radius-sm:  12px;
    --radius-md:  16px;
    --radius-lg:  20px;
    --radius-xl:  24px;
    --radius-2xl: 32px;
    --border-radius: 24px;
    --border-radius-small: 16px;

    /* ── Animation System ────────────────────────── */
    --ease-out:    cubic-bezier(0, 0, 0.2, 1);
    --ease-in:     cubic-bezier(0.4, 0, 1, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --duration-fast:   150ms;
    --duration-base:   250ms;
    --duration-slow:   400ms;
    --transition:        all var(--duration-slow) var(--ease-spring);
    --transition-fast:   all var(--duration-fast) ease;
    --transition-smooth: all var(--duration-base) var(--ease-out);
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg,
        #fff0f3 0%,
        #fce4ec 30%,
        #ffb6c8 60%,
        #fce4ec 80%,
        #fff0f3 100%);
    background-size: 200% 200%;
    animation: gradientShift 30s ease-in-out infinite;
    color: var(--text-dark);
    position: relative;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* AI Particle Canvas                                                         */
/* ═══════════════════════════════════════════════════════════════════════════ */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Floating Background Container & Glow Orbs                                 */
/* ═══════════════════════════════════════════════════════════════════════════ */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-pink-lightest), var(--primary-pink-lighter));
    opacity: 0.4;
    animation: float 20s infinite linear;
    filter: blur(1px);
    box-shadow: 0 0 30px rgba(255, 107, 147, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.floating-element.el-1 {
    width: 180px;
    height: 180px;
    top: 8%;
    left: 3%;
    animation-duration: 25s;
}

.floating-element.el-2 {
    width: 130px;
    height: 130px;
    top: 55%;
    right: 8%;
    animation-duration: 20s;
    animation-direction: reverse;
}

.floating-element.el-3 {
    width: 90px;
    height: 90px;
    bottom: 15%;
    left: 12%;
    animation-duration: 30s;
}

.floating-element.el-4 {
    width: 110px;
    height: 110px;
    top: 18%;
    right: 18%;
    animation-duration: 35s;
    animation-direction: reverse;
}

.floating-element.el-5 {
    width: 70px;
    height: 70px;
    top: 75%;
    left: 5%;
    animation-duration: 28s;
}

.floating-element.el-6 {
    width: 140px;
    height: 140px;
    bottom: 5%;
    right: 25%;
    animation-duration: 32s;
    animation-direction: reverse;
}

.floating-element.el-7 {
    width: 50px;
    height: 50px;
    top: 30%;
    left: 70%;
    animation-duration: 24s;
}

.floating-element.el-8 {
    width: 95px;
    height: 95px;
    bottom: 35%;
    left: 45%;
    animation-duration: 40s;
    animation-direction: reverse;
}

/* Floating particles */
.floating-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: float-particle 20s infinite ease-in-out;
}

.particle-1 {
    width: 60px;
    height: 60px;
    top: 15%;
    left: 10%;
    background: radial-gradient(circle, rgba(255,182,200,0.5) 0%, rgba(255,107,147,0.3) 50%, transparent 80%);
    animation-duration: 18s;
    animation-delay: -2s;
}
.particle-2 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 5%;
    background: radial-gradient(circle, rgba(255,182,200,0.4) 0%, rgba(255,107,147,0.25) 50%, transparent 80%);
    animation-duration: 25s;
    animation-delay: -5s;
}
.particle-3 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 20%;
    background: radial-gradient(circle, rgba(255,220,240,0.6) 0%, rgba(255,107,147,0.4) 50%, transparent 80%);
    animation-duration: 15s;
    animation-delay: -1s;
}
.particle-4 {
    width: 80px;
    height: 80px;
    bottom: 40%;
    right: 15%;
    background: radial-gradient(circle, rgba(255,200,220,0.45) 0%, rgba(255,107,147,0.3) 50%, transparent 80%);
    animation-duration: 22s;
}
.particle-5 {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 30%;
    background: radial-gradient(circle, rgba(255,200,220,0.35) 0%, rgba(255,107,147,0.2) 50%, transparent 80%);
    animation-duration: 30s;
    animation-delay: -10s;
}
.particle-6 {
    width: 35px;
    height: 35px;
    top: 25%;
    right: 30%;
    background: radial-gradient(circle, rgba(255,220,240,0.25) 0%, rgba(255,107,147,0.15) 50%, transparent 70%);
    animation-duration: 20s;
    animation-delay: -3s;
}
.particle-7 {
    width: 85px;
    height: 85px;
    bottom: 10%;
    left: 50%;
    background: radial-gradient(circle, rgba(255,210,230,0.2) 0%, transparent 70%);
    animation-duration: 27s;
    animation-delay: -7s;
}
.particle-8 {
    width: 55px;
    height: 55px;
    top: 60%;
    right: 40%;
    background: radial-gradient(circle, rgba(255,200,220,0.3) 0%, rgba(255,107,147,0.2) 50%, transparent 70%);
    animation-duration: 19s;
    animation-delay: -4s;
}
.particle-9 {
    width: 110px;
    height: 110px;
    top: 5%;
    left: 60%;
    background: radial-gradient(circle, rgba(255,190,210,0.18) 0%, transparent 70%);
    animation-duration: 33s;
    animation-delay: -12s;
}
.particle-10 {
    width: 45px;
    height: 45px;
    bottom: 50%;
    right: 10%;
    background: radial-gradient(circle, rgba(255,210,230,0.22) 0%, rgba(255,107,147,0.15) 50%, transparent 70%);
    animation-duration: 23s;
    animation-delay: -6s;
}
.particle-11 {
    width: 65px;
    height: 65px;
    top: 45%;
    left: 75%;
    background: radial-gradient(circle, rgba(255,175,195,0.35) 0%, transparent 70%);
    animation-duration: 21s;
    animation-delay: -8s;
}
.particle-12 {
    width: 90px;
    height: 90px;
    bottom: 25%;
    left: 65%;
    background: radial-gradient(circle, rgba(190,220,255,0.28) 0%, transparent 70%);
    animation-duration: 26s;
    animation-delay: -11s;
}
.particle-13 {
    width: 30px;
    height: 30px;
    top: 80%;
    right: 45%;
    background: radial-gradient(circle, rgba(255,225,235,0.4) 0%, transparent 70%);
    animation-duration: 17s;
    animation-delay: -2s;
}
.particle-14 {
    width: 75px;
    height: 75px;
    top: 10%;
    right: 60%;
    background: radial-gradient(circle, rgba(225,245,255,0.25) 0%, transparent 70%);
    animation-duration: 29s;
    animation-delay: -9s;
}
.particle-15 {
    width: 50px;
    height: 50px;
    bottom: 60%;
    left: 35%;
    background: radial-gradient(circle, rgba(255,205,215,0.32) 0%, transparent 70%);
    animation-duration: 24s;
    animation-delay: -5s;
}

/* Floating dots - small, highly visible particles */
.floating-dot {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: dotFloat 15s infinite ease-in-out;
    box-shadow: 0 0 15px rgba(255, 107, 147, 0.8), 0 0 30px rgba(255, 107, 147, 0.4);
}

.dot-1 {
    width: 8px;
    height: 8px;
    top: 20%;
    left: 15%;
    background: linear-gradient(45deg, #ff6b93, #ff8fa9);
    animation-duration: 12s;
    animation-delay: 0s;
}
.dot-2 {
    width: 6px;
    height: 6px;
    top: 35%;
    right: 20%;
    background: linear-gradient(45deg, #d63384, #ff4d7a);
    animation-duration: 14s;
    animation-delay: -2s;
}
.dot-3 {
    width: 10px;
    height: 10px;
    bottom: 30%;
    left: 25%;
    background: linear-gradient(45deg, #c9184a, #e11d48);
    animation-duration: 16s;
    animation-delay: -4s;
}
.dot-4 {
    width: 7px;
    height: 7px;
    top: 50%;
    right: 35%;
    background: linear-gradient(45deg, #ff6b93, #fb7185);
    animation-duration: 13s;
    animation-delay: -1s;
}
.dot-5 {
    width: 9px;
    height: 9px;
    bottom: 45%;
    left: 40%;
    background: linear-gradient(45deg, #d63384, #ec4899);
    animation-duration: 15s;
    animation-delay: -3s;
}
.dot-6 {
    width: 5px;
    height: 5px;
    top: 65%;
    right: 50%;
    background: linear-gradient(45deg, #c9184a, #f472b6);
    animation-duration: 11s;
    animation-delay: -5s;
}
.dot-7 {
    width: 11px;
    height: 11px;
    bottom: 15%;
    right: 25%;
    background: linear-gradient(45deg, #ff6b93, #ec4899);
    animation-duration: 17s;
    animation-delay: -6s;
}
.dot-8 {
    width: 6px;
    height: 6px;
    top: 25%;
    left: 55%;
    background: linear-gradient(45deg, #d63384, #ff8fa9);
    animation-duration: 14s;
    animation-delay: -7s;
}
.dot-9 {
    width: 8px;
    height: 8px;
    bottom: 55%;
    right: 15%;
    background: linear-gradient(45deg, #c9184a, #fb7185);
    animation-duration: 13s;
    animation-delay: -8s;
}
.dot-10 {
    width: 7px;
    height: 7px;
    top: 40%;
    left: 70%;
    background: linear-gradient(45deg, #ff6b93, #f472b6);
    animation-duration: 15s;
    animation-delay: -9s;
}
.dot-11 {
    width: 9px;
    height: 9px;
    bottom: 35%;
    left: 10%;
    background: linear-gradient(45deg, #d63384, #f472b6);
    animation-duration: 16s;
    animation-delay: -10s;
}
.dot-12 {
    width: 6px;
    height: 6px;
    top: 55%;
    right: 40%;
    background: linear-gradient(45deg, #c9184a, #ff4d7a);
    animation-duration: 12s;
    animation-delay: -11s;
}
.dot-13 {
    width: 10px;
    height: 10px;
    bottom: 20%;
    right: 60%;
    background: linear-gradient(45deg, #ff6b93, #fb7185);
    animation-duration: 18s;
    animation-delay: -12s;
}
.dot-14 {
    width: 5px;
    height: 5px;
    top: 30%;
    left: 35%;
    background: linear-gradient(45deg, #d63384, #fb7185);
    animation-duration: 14s;
    animation-delay: -13s;
}
.dot-15 {
    width: 8px;
    height: 8px;
    bottom: 50%;
    left: 80%;
    background: linear-gradient(45deg, #c9184a, #ec4899);
    animation-duration: 16s;
    animation-delay: -14s;
}

/* Glow Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.55;
    animation: orbFloat 22s ease-in-out infinite;
}
.orb-1 {
    width: 300px; height: 300px;
    top: -5%; left: -5%;
    background: rgba(255, 107, 147, 0.25);
    animation-duration: 18s;
}
.orb-2 {
    width: 250px; height: 250px;
    bottom: -5%; right: -5%;
    background: rgba(255, 107, 147, 0.2);
    animation-duration: 22s;
    animation-delay: -5s;
}
.orb-3 {
    width: 200px; height: 200px;
    top: 40%; left: 50%;
    background: rgba(255, 107, 147, 0.18);
    animation-duration: 25s;
    animation-delay: -10s;
}
.orb-4 {
    width: 180px; height: 180px;
    top: 10%; right: 5%;
    background: rgba(255, 107, 147, 0.22);
    animation-duration: 28s;
    animation-delay: -8s;
}
.orb-5 {
    width: 220px; height: 220px;
    bottom: 20%; left: 25%;
    background: rgba(255, 107, 147, 0.15);
    animation-duration: 31s;
    animation-delay: -15s;
}


@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(20px, -15px) scale(1.03); }
    66%  { transform: translate(-15px, 20px) scale(0.97); }
}

@keyframes float-particle {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    20% { transform: translate(40px, -30px) rotate(72deg) scale(1.1); }
    40% { transform: translate(-20px, -50px) rotate(144deg) scale(0.9); }
    60% { transform: translate(30px, 20px) rotate(216deg) scale(1.05); }
    80% { transform: translate(-40px, 40px) rotate(288deg) scale(0.95); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

@keyframes dotFloat {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.9; }
    25% { transform: translate(25px, -20px) scale(1.4) rotate(90deg); opacity: 1; }
    50% { transform: translate(-15px, -35px) scale(0.7) rotate(180deg); opacity: 0.7; }
    75% { transform: translate(20px, 15px) scale(1.2) rotate(270deg); opacity: 0.95; }
    100% { transform: translate(0, 0) scale(1) rotate(360deg); opacity: 0.9; }
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-40px) rotate(90deg) scale(1.05); }
    50% { transform: translateY(-20px) rotate(180deg) scale(0.95); }
    75% { transform: translateY(-60px) rotate(270deg) scale(1.02); }
    100% { transform: translateY(0) rotate(360deg) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Container & Layout — Full Viewport, No Scroll                             */
/* ═══════════════════════════════════════════════════════════════════════════ */
.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    animation: containerFadeIn 1.5s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Header — Compact                                                           */
/* ═══════════════════════════════════════════════════════════════════════════ */
.header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.8rem 1.5rem;
    margin-bottom: 0.8rem;
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.5);
    flex-shrink: 0;
}

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

.header-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-text {
    text-align: left;
}

.logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--white);
    box-shadow: 0 8px 25px rgba(255, 107, 147, 0.35);
    animation: logoPulse 3s infinite ease-in-out;
    will-change: transform;
    flex-shrink: 0;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(255, 107, 147, 0.35); }
    50% { transform: scale(1.08); box-shadow: 0 12px 40px rgba(255, 107, 147, 0.6); }
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-pink), #d63384, var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.compassion-message {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    max-width: 600px;
    margin: 0.3rem auto 0;
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Main Content — Fills Remaining Space                                       */
/* ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.2rem;
    flex: 1;
    min-height: 0; /* critical for flex child overflow */
    animation: fadeInUp 0.8s ease-out 0.2s both;
    width: 100%;
}

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

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Quick Questions Sidebar                                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */
.quick-questions {
    animation: slideInLeft 0.8s ease-out 0.3s both;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: var(--shadow-medium), inset 0 1px 0 rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.section-header {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.decoration-line {
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-pink), var(--accent-pink));
    border-radius: 2px;
}

.tabs-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 0.8rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
    font-size: 0.8rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 147, 0.3);
}

.tab-btn:hover:not(.active) {
    background: var(--primary-pink-lightest);
    color: var(--primary-pink);
}

.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease;
}

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

.questions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-pink-lighter) transparent;
}

.questions-grid::-webkit-scrollbar { width: 4px; }
.questions-grid::-webkit-scrollbar-track { background: transparent; }
.questions-grid::-webkit-scrollbar-thumb { background: var(--primary-pink-lighter); border-radius: 2px; }

.question-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 147, 0.12);
    border-radius: 14px;
    padding: 0.9rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 10px rgba(255, 107, 147, 0.06);
    position: relative;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,107,147,0.05), rgba(168,85,247,0.03));
    opacity: 0;
    transition: opacity 0.3s;
}

.question-card:hover::before { opacity: 1; }

.question-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 30px rgba(255, 107, 147, 0.18);
    border-color: rgba(255, 107, 147, 0.3);
}

.question-card:active {
    transform: translateY(-1px) scale(0.99);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-pink-lightest), var(--secondary-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.question-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    color: white;
}

.card-content h3 {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Urdu question cards */
.urdu-text.question-card {
    border-left: none;
    border-right: 3px solid var(--primary-pink);
}

.urdu-text.question-card:hover {
    transform: translateX(-3px) translateY(-3px) scale(1.01);
}

/* Card icon color overrides */
.card-icon.symptoms { background: linear-gradient(135deg, #4CAF50, #45a049) !important; color: white !important; }
.card-icon.pain { background: linear-gradient(135deg, #FF6B6B, #FF5252) !important; color: white !important; }
.card-icon.emotional { background: linear-gradient(135deg, #FFD93D, #FFCD38) !important; color: white !important; }
.card-icon.exercise { background: linear-gradient(135deg, #6BCF7F, #4CAF50) !important; color: white !important; }
.card-icon.nutrition { background: linear-gradient(135deg, #A78BFA, #8B5CF6) !important; color: white !important; }
.card-icon.general { background: linear-gradient(135deg, #4FC3F7, #29B6F6) !important; color: white !important; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Urdu Language Styling                                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */
.urdu-text {
    font-family: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', 'Scheherazade New', 'Lateef', 'Amiri', serif !important;
    line-height: 1.8 !important;
    font-size: 1em !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    word-spacing: normal !important;
}

.urdu-text:not(.message) {
    direction: rtl !important;
    text-align: right !important;
}

.message.urdu-text { direction: ltr; }

.message.urdu-text .message-content,
.message.urdu-text .urdu-content {
    direction: rtl;
    text-align: right;
}

.message.urdu-text .message-content p {
    font-family: 'Noto Nastaliq Urdu', 'Scheherazade New', 'Lateef', serif !important;
    font-size: 1em !important;
    line-height: 2.0 !important;
    text-align: right !important;
    direction: rtl !important;
    margin: 0 !important;
    padding: 0 !important;
    font-feature-settings: "kern" 1, "liga" 1, "clig" 1, "calt" 1;
}

#userInput[style*="direction: rtl"],
#userInput[style*="text-align: right"] {
    font-family: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', 'Scheherazade New', 'Segoe UI', Tahoma, sans-serif !important;
    font-size: 1em !important;
    direction: rtl !important;
    text-align: right !important;
    line-height: 1.8 !important;
}

#urdu-tab .questions-grid,
.urdu-questions .question-card {
    font-family: 'Noto Nastaliq Urdu', 'Scheherazade New', 'Lateef', Tahoma, sans-serif !important;
    font-size: 1em !important;
    line-height: 1.8 !important;
    direction: rtl !important;
    text-align: right !important;
}

#urdu-tab .empty-state {
    font-family: 'Noto Nastaliq Urdu', 'Scheherazade New', 'Lateef', Tahoma, sans-serif !important;
    direction: rtl !important;
    font-size: 1em !important;
    line-height: 1.8 !important;
}

.language-badge {
    font-family: 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif !important;
    font-size: 0.75em !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    margin-top: 8px !important;
    display: inline-block !important;
}

.urdu-text,
[lang="ur"],
[dir="rtl"] {
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-feature-settings: "kern" 1, "liga" 1, "clig" 1, "calt" 1;
}

.tab-btn[data-tab="urdu"] {
    font-family: 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
}

.urdu-text .card-content {
    text-align: right !important;
    direction: rtl !important;
}

.urdu-text.question-card {
    border-left: none !important;
    border-right: 3px solid var(--primary-pink) !important;
}

.urdu-text.question-card:hover {
    transform: translateX(-3px) translateY(-3px) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Source Citations                                                           */
/* ═══════════════════════════════════════════════════════════════════════════ */
.sources-container {
    margin-top: 10px;
    padding: 10px 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0 0 12px 12px;
}

.sources-label {
    font-size: 0.72em;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sources-label i { color: #e91e8c; font-size: 0.9em; }

.sources-list { display: flex; flex-wrap: wrap; gap: 6px; }

.source-badge,
.source-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7em;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    color: #9d174d;
    border: 1px solid rgba(236, 72, 153, 0.15);
    transition: all 0.2s ease;
    cursor: default;
}

.source-badge:hover,
.source-tag:hover {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    border-color: rgba(236, 72, 153, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.15);
}

.source-badge i, .source-tag i { font-size: 0.8em; opacity: 0.7; }

.system-message .sources-container { border-top-color: rgba(0, 0, 0, 0.05); }
.urdu-text .sources-container { direction: ltr; }
.urdu-text .sources-label { direction: rtl; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Chat Section                                                               */
/* ═══════════════════════════════════════════════════════════════════════════ */
.chat-section {
    animation: slideInRight 0.8s ease-out 0.3s both;
    width: 100%;
    min-height: 0;
    display: flex;
}

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

.chat-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255,255,255,0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    flex: 1;
}

/* Chat Header */
.chat-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 107, 147, 0.08);
    flex-shrink: 0;
    gap: 1rem;
}

.chat-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    min-width: 0;
}

.profile-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    box-shadow: 0 6px 20px rgba(255, 107, 147, 0.3);
    flex-shrink: 0;
}

.online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 2.5px solid var(--white);
    border-radius: 50%;
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.profile-info { min-width: 0; }

.profile-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-stats {
    display: flex;
    gap: 1.2rem;
    flex-shrink: 0;
}

.stat { text-align: center; }

.stat-number {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-pink);
}

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

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(255,245,247,0.3) 0%, rgba(255,255,255,0.1) 100%);
    width: 100%;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: 0.8rem;
    max-width: min(80%, 640px);
    animation: messageSlideIn 0.35s var(--ease-spring);
    width: fit-content;
}

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

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 0.3rem;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 107, 147, 0.3);
}

.system-message .message-avatar {
    background: linear-gradient(135deg, #f0f4ff, #e8eeff);
    color: var(--primary-pink);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.message-content {
    background: var(--white);
    padding: 1rem 1.2rem;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
    transition: var(--transition-fast);
    max-width: 100%;
    word-wrap: break-word;
}

.message-content:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.user-message .message-content {
    background: linear-gradient(135deg, #ff6b93, #ff85a8);
    box-shadow: 0 6px 20px rgba(255, 107, 147, 0.3);
    color: var(--white);
    border-bottom-right-radius: 6px;
}

.system-message .message-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    color: var(--text-dark);
    border-bottom-left-radius: 6px;
}

.message-content p {
    line-height: 1.6;
    margin-bottom: 0.3rem;
    word-wrap: break-word;
    font-size: 0.9rem;
}

.message-time {
    display: block;
    margin-top: 4px;
    font-size: 0.68rem;
    opacity: 0.5;
    text-align: right;
}

.user-message .message-time {
    color: rgba(255,255,255,0.7);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Typing Indicator — Enhanced                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 245, 247, 0.6);
    border-top: 1px solid rgba(255, 107, 147, 0.06);
    flex-shrink: 0;
}

.typing-indicator.visible {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

.typing-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0f4ff, #e8eeff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--primary-pink);
    flex-shrink: 0;
}

.typing-bubble {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.8);
    padding: 0.5rem 0.9rem;
    border-radius: 14px;
    box-shadow: var(--shadow-xs);
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

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

@keyframes typingBounce {
    0%, 80%, 100% { 
        transform: scale(0.7) translateY(0); 
        opacity: 0.4; 
    }
    40% { 
        transform: scale(1) translateY(-5px); 
        opacity: 1; 
    }
}

.typing-indicator p {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Chat Input                                                                 */
/* ═══════════════════════════════════════════════════════════════════════════ */
.chat-input-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 107, 147, 0.06);
    background: rgba(255,255,255,0.8);
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    width: 100%;
}

#userInput {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.9rem 1.2rem;
    font-size: var(--text-sm);
    background: rgba(245, 245, 250, 0.9);
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    border: 2px solid rgba(0, 0, 0, 0.07);
    min-width: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

#userInput:focus {
    border-color: var(--primary-pink-light);
    box-shadow: 0 0 0 4px rgba(255, 107, 147, 0.08), inset 0 1px 3px rgba(0, 0, 0, 0.04);
    background: white;
    outline: none;
}

.send-button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1.4rem;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    color: var(--white);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(255, 107, 147, 0.3);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.send-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.7);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.send-button:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% { transform: scale(0, 0); opacity: 0.5; }
    100% { transform: scale(40, 40); opacity: 0; }
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 147, 0.4);
}

.send-button:active {
    transform: translateY(0) scale(0.98);
}

.send-button.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.voice-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    background: rgba(255, 232, 238, 0.8);
    color: var(--primary-pink);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(255, 107, 147, 0.1);
    flex-shrink: 0;
    font-size: 1rem;
}

.voice-button.recording {
    background: linear-gradient(135deg, #ff4d7a, #ff6b93);
    color: white;
    animation: voicePulse 1.5s infinite;
}

.voice-button:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(255, 107, 147, 0.2);
}

@keyframes voicePulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 122, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(255, 77, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 122, 0); }
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding-left: 0.5rem;
    flex-wrap: wrap;
    opacity: 0.7;
}

.input-hint i {
    color: var(--primary-pink);
}

/* Scrollbar for chat */
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--primary-pink-lighter); border-radius: 3px; }
.chat-messages::-webkit-scrollbar-thumb:hover { background: var(--primary-pink-light); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-4) var(--space-2);
    color: var(--text-secondary);
    width: 100%;
    animation: fadeInUp 0.3s var(--ease-out);
}

.empty-state i {
    font-size: 1.75rem;
    margin-bottom: var(--space-1);
    color: var(--primary-pink-light);
    opacity: 0.65;
    display: block;
}

.empty-state p {
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* Retry button inside empty state */
.retry-btn {
    display: inline-block;
    margin-top: var(--space-1);
    padding: 0.3rem 0.9rem;
    background: var(--primary-pink-lightest);
    color: var(--primary-pink);
    border: 1px solid var(--primary-pink-lighter);
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.retry-btn:hover {
    background: var(--primary-pink-lighter);
    transform: translateY(-1px);
}

#activeLanguage { color: var(--primary-pink); font-weight: 600; }
#currentLanguageDisplay { color: var(--primary-pink); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Audio Messages                                                             */
/* ═══════════════════════════════════════════════════════════════════════════ */
.audio-message { margin: 10px 0; }

.audio-message-container {
    background: var(--gray-100);
    border-radius: 18px;
    padding: 12px 16px;
    max-width: 280px;
    border: 1px solid var(--gray-200);
}

.user-audio .audio-message-container {
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    color: white;
    border-color: transparent;
}

.audio-player-wrapper { display: flex; align-items: center; gap: 12px; }

.voice-note-player {
    flex: 1;
    height: 32px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--gray-300);
}

.user-audio .voice-note-player {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.3);
}

.audio-duration { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-align: center; }
.user-audio .audio-duration { color: rgba(255, 255, 255, 0.85); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Voice Preview                                                              */
/* ═══════════════════════════════════════════════════════════════════════════ */
.voice-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.06), rgba(168, 85, 247, 0.06));
    border: 1px solid rgba(236, 72, 153, 0.15);
    border-radius: 12px;
    margin-bottom: 8px;
    animation: slideDown 0.2s ease-out;
}

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

.voice-preview audio { flex: 1; height: 36px; min-width: 0; }

.voice-preview-actions { display: flex; gap: 6px; flex-shrink: 0; }

.voice-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.voice-preview-btn.send-voice {
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-pink));
    color: #fff;
}
.voice-preview-btn.send-voice:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3); }

.voice-preview-btn.re-record { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.voice-preview-btn.re-record:hover { background: rgba(99, 102, 241, 0.2); }

.voice-preview-btn.cancel-voice { background: rgba(239, 68, 68, 0.1); color: #ef4444; padding: 6px 8px; }
.voice-preview-btn.cancel-voice:hover { background: rgba(239, 68, 68, 0.2); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Responsive — Desktop stays full viewport                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .container {
        height: auto;
        min-height: 100vh;
        overflow: auto;
        padding: 1rem;
    }

    body {
        overflow: auto;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .quick-questions {
        max-height: 300px;
    }

    .chat-container {
        height: 600px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
    }
    
    .header {
        padding: 0.6rem 1rem;
        border-radius: 16px;
    }

    .logo-container {
        flex-direction: row;
        gap: 0.6rem;
    }

    .logo {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 12px;
    }

    .title { font-size: 1.3rem; }
    .subtitle { font-size: 0.75rem; }
    .compassion-message { display: none; }

    .chat-header {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
    }

    .chat-container {
        height: 500px;
        border-radius: 16px;
    }

    .chat-messages { padding: 1rem; gap: 0.8rem; }

    .message { max-width: 90%; }

    .chat-input-container { padding: 0.8rem 1rem; }

    .input-wrapper { gap: 0.4rem; }

    .tabs {
        flex-direction: column;
        gap: 4px;
    }

    .tab-btn { padding: 0.5rem 0.8rem; text-align: center; }

    .voice-preview {
        flex-wrap: wrap;
    }
    .voice-preview audio { width: 100%; }
    .voice-preview-actions { width: 100%; justify-content: center; }

    .quick-questions, .chat-container, .header {
        background: rgba(255, 255, 255, 0.92);
    }
}

@media (max-width: 480px) {
    .container { padding: 0.5rem; }
    .header { margin-bottom: 0.5rem; }
    .chat-container { height: 450px; border-radius: 14px; }
    .profile-avatar { width: 38px; height: 38px; font-size: 1rem; border-radius: 12px; }
    .message-avatar { width: 30px; height: 30px; font-size: 0.8rem; border-radius: 10px; }
    .message-content { padding: 0.8rem 1rem; border-radius: 14px; }
    .floating-element { display: none; }
    .floating-element.el-1, .floating-element.el-2 { display: block; width: 80px; height: 80px; }
}

@media (max-width: 360px) {
    .chat-container { height: 400px; }
    .chat-header { padding: 0.6rem; }
    .profile-avatar { width: 34px; height: 34px; }
    .chat-stats { gap: 0.8rem; }
}

/* Ripple effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%) scale(0);
    animation: rippleAnim 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleAnim {
    to { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

@media print {
    .floating-elements, #particleCanvas,
    .send-button, .typing-indicator, .chat-input-container {
        display: none !important;
    }
    .chat-container { box-shadow: none; height: auto; }
    .chat-messages { overflow: visible; }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Accessibility Utilities                                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus-visible ring — keyboard only */
:focus-visible {
    outline: 2px solid var(--primary-pink);
    outline-offset: 3px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Skeleton Loading                                                           */
/* ═══════════════════════════════════════════════════════════════════════════ */
@keyframes skeletonShimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}

.skeleton-card {
    height: 58px;
    border-radius: var(--radius-md);
    background: linear-gradient(
        90deg,
        rgba(255, 182, 200, 0.18) 25%,
        rgba(255, 182, 200, 0.38) 50%,
        rgba(255, 182, 200, 0.18) 75%
    );
    background-size: 800px 100%;
    animation: skeletonShimmer 1.5s infinite linear;
    border: 1px solid rgba(255, 107, 147, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Reduced Motion — Respect User Preferences                                  */
/* ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-elements,
    #particleCanvas {
        display: none !important;
    }

    html { scroll-behavior: auto; }
}
