/* Base Variables and Reset */
:root {
    --primary-color: #ff4b82;
    --secondary-color: #ff8ca3;
    --accent-color: #9d4edd;
    --bg-gradient-1: #ffb7b2;
    --bg-gradient-2: #e2b0ff;
    --bg-gradient-3: #ff9cb7;
    --text-dark: #3a0ca3;
    --text-light: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(255, 75, 130, 0.2);
    --nav-height: 70px;
}

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

body.app-body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    /* Allow scrolling within main but keep body fixed */
    height: 100vh;
    overflow: hidden; 
    background: linear-gradient(-45deg, var(--bg-gradient-1), var(--bg-gradient-2), var(--bg-gradient-3), #ffc8dd);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .quote-text { font-family: 'Playfair Display', serif; }

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

#heart-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 1; overflow: hidden;
}

.floating-heart {
    position: absolute; color: #ff4b82;
    filter: drop-shadow(0 0 5px rgba(255, 75, 130, 0.5));
    animation: floatUp linear forwards; opacity: 0;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100px) scale(1.5) rotate(360deg); opacity: 0; }
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

/* APP LAYOUT */
.app-header {
    height: 60px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.nav-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--primary-color); }
.music-toggle { cursor: pointer; font-weight: 500; background: rgba(255, 255, 255, 0.6); padding: 0.4rem 1rem; border-radius: 20px; transition: 0.3s; }
.music-toggle:hover { background: white; transform: scale(1.05); }

.app-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + 2rem);
    position: relative;
    z-index: 2;
    scroll-behavior: smooth;
}

/* TABS */
.tab-pane {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}
.tab-pane.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease forwards;
}
/* Bank & Store tabs need full width for grid to fill the screen */
#tab-bank, #tab-store {
    max-width: 100%;
    width: 100%;
    padding: 1.5rem;
}
#tab-bank.active, #tab-store.active {
    align-items: stretch;
}

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

/* BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.nav-btn {
    background: transparent; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    color: var(--text-dark); transition: 0.3s;
    width: 25%; padding: 0.5rem;
}
.nav-icon { font-size: 1.5rem; margin-bottom: 4px; transition: 0.3s; filter: grayscale(1); opacity: 0.7;}
.nav-label { font-size: 0.75rem; font-weight: 600; font-family: 'Poppins'; opacity: 0.7; }

.nav-btn.active .nav-icon { filter: grayscale(0); opacity: 1; transform: translateY(-3px) scale(1.1); }
.nav-btn.active .nav-label { opacity: 1; color: var(--primary-color); }

/* --- HOME TAB --- */
.landing-content { padding: 3rem 2rem; text-align: center; width: 100%; }
.landing-title { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--primary-color); margin-bottom: 0.5rem; }
.landing-subtitle { font-size: 1.1rem; margin-bottom: 2rem; }

.heartbeat-envelope {
    margin: 0 auto 2rem; width: 100px; height: 100px;
    display: flex; justify-content: center; align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%; box-shadow: 0 10px 30px rgba(255, 75, 130, 0.4);
    animation: heartbeat 1.5s ease-in-out infinite both; cursor: pointer;
}
.envelope .emoji { font-size: 3rem; }

@keyframes heartbeat {
    from { transform: scale(1); }
    10% { transform: scale(0.91); }
    17% { transform: scale(0.98); }
    33% { transform: scale(0.87); }
    45% { transform: scale(1); }
}

.primary-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none; padding: 1rem 2rem; border-radius: 50px;
    color: white; font-size: 1.1rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 75, 130, 0.3); transition: 0.3s;
}
.primary-button:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(255, 75, 130, 0.5); }

/* --- MEMORIES TAB --- */
.section-title { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 2rem; text-align: center; }
.quotes-container { display: flex; flex-direction: column; gap: 2rem; width: 100%; }
.quote-card { padding: 2rem; position: relative; transition: 0.4s; }
.quote-card:hover { transform: translateY(-5px); }
.quote-icon { position: absolute; top: -15px; left: 20px; font-size: 4rem; color: var(--primary-color); opacity: 0.2; line-height: 1; }
.quote-text { font-size: 1.4rem; line-height: 1.6; margin-bottom: 1.5rem; position: relative; z-index: 2; color: #222; }
.quote-footer { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.author { color: var(--accent-color); font-style: italic; }

/* --- GAME TAB --- */
.game-subtitle { text-align: center; margin-bottom: 2rem; font-size: 1.1rem; }
.game-container { padding: 2rem; width: 100%; max-width: 600px; text-align: center; position: relative; }
.progress-bar { width: 100%; height: 8px; background: rgba(255,255,255,0.5); border-radius: 4px; margin-bottom: 2rem; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary-color); width: 0%; transition: width 0.3s ease; }
.question-text { font-size: 1.5rem; margin-bottom: 2rem; color: #333; }
.options-grid { display: grid; gap: 1rem; }
.option-btn {
    background: rgba(255, 255, 255, 0.6); border: 2px solid transparent;
    padding: 1rem; border-radius: 15px; font-size: 1.1rem; font-family: 'Poppins';
    cursor: pointer; transition: 0.3s; color: var(--text-dark);
}
.option-btn:hover { background: white; border-color: var(--secondary-color); transform: scale(1.02); }
.option-btn.correct { background: #d4edda; border-color: #28a745; color: #155724; }
.option-btn.wrong { background: #f8d7da; border-color: #dc3545; color: #721c24; animation: shake 0.4s; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.game-feedback { margin-top: 2rem; padding: 1rem; border-radius: 12px; font-weight: 600; font-size: 1.2rem; }
.hidden { display: none !important; }

/* --- MESSAGE TAB --- */
.form-container { padding: 2rem; width: 100%; max-width: 500px; text-align: center; }
.form-container p { margin-bottom: 1.5rem; font-size: 1.1rem; }
.glass-input {
    width: 100%; background: rgba(255, 255, 255, 0.5); border: 1px solid var(--glass-border);
    border-radius: 15px; padding: 1rem; font-family: 'Poppins'; font-size: 1rem;
    color: var(--text-dark); margin-bottom: 1.5rem; resize: none; outline: none; transition: 0.3s;
}
.glass-input:focus { background: rgba(255, 255, 255, 0.8); box-shadow: 0 0 10px rgba(255,75,130,0.3); }
.success-msg { margin-top: 1rem; color: var(--primary-color); font-weight: 600; animation: fadeIn 0.5s; background: rgba(255,255,255,0.7); padding:1rem; border-radius: 10px;}

/* --- LOGIN OVERLAY --- */
.login-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(255, 183, 178, 0.3);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease;
}
.login-overlay.hidden { opacity: 0; pointer-events: none; transform: scale(1.1); }
.login-card { 
    padding: 3.5rem 2.5rem; max-width: 400px; width: 90%; text-align: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.3));
    border: 2px solid rgba(255,105,180,0.4);
    box-shadow: 0 15px 35px rgba(255,75,130,0.4), inset 0 0 20px rgba(255,255,255,0.5);
    border-radius: 30px; position: relative; overflow: hidden;
}
.login-card::before {
    content: '🔐'; position: absolute; top: -30px; right: -30px;
    font-size: 8rem; opacity: 0.1; transform: rotate(15deg); pointer-events: none;
}
.login-title { color: var(--primary-color); margin-bottom: 1rem; font-size: 2.2rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
.login-subtitle { margin-bottom: 1.5rem; font-weight: 500; color: #555; }
.checkbox-container { 
    margin: 1.5rem 0; text-align: left; display: flex; align-items: flex-start; gap: 0.8rem; 
    font-size: 0.95rem; font-weight: 600; padding: 1rem; background: rgba(255,75,130,0.1);
    border-radius: 12px; cursor: pointer; transition: 0.3s;
}
.checkbox-container:hover { background: rgba(255,75,130,0.2); transform: scale(1.02); }
.checkbox-container input { margin-top: 4px; transform: scale(1.2); }
.login-input { margin-bottom: 1.5rem; font-size: 1.1rem; text-align: center; border: 2px solid rgba(255,75,130,0.3); }
.login-input:focus { border-color: var(--primary-color); }
.error-msg { margin-bottom: 1rem; color: #dc3545; font-weight: 600; font-size: 1rem; animation: shake 0.4s; }

.login-btn {
    width: 100%; font-size: 1.2rem; padding: 1.2rem;
    animation: pulsingHeart 2s infinite;
}

@keyframes pulsingHeart {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(255,75,130,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,75,130,0.8); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(255,75,130,0); }
}

/* --- MEMORY IMAGES --- */
.memory-img {
    width: 100%; height: auto;
    border-radius: 15px; margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.memory-img:hover { transform: scale(1.05); }

/* --- BUBU BANK CARD GRID --- */
.earnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 0.8rem;
    padding: 0.5rem 0;
    width: 100%;
}

.bank-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.7rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.bank-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(255,75,130,0.25); }
.bank-card:active { transform: scale(0.97); }
.bank-card.disabled { opacity: 0.45; pointer-events: none; filter: grayscale(0.5); }

.bank-emoji { font-size: 2.2rem; margin-bottom: 0.5rem; }
.bank-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem; color: #333; }
.bank-desc { font-size: 0.75rem; color: #777; margin-bottom: 0.5rem; line-height: 1.3; }
.bank-reward {
    font-weight: 800; color: var(--primary-color); font-size: 1rem;
    background: rgba(255,75,130,0.1); padding: 0.3rem 0.8rem; border-radius: 20px;
}

/* --- BUBU STORE PRODUCT GRID --- */
.store-grid { display: flex; flex-direction: column; gap: 0; width: 100%; }

.store-cat-header {
    font-size: 1.2rem; font-weight: 800; color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    padding: 0.8rem 0.5rem 0.4rem;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    margin-bottom: 0.8rem;
}

.store-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.store-product-card {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}
.store-product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(255,75,130,0.3); }
.store-product-card:active { transform: scale(0.96); }

.product-emoji { font-size: 2.2rem; margin-bottom: 0.3rem; }
.product-name { font-size: 0.8rem; font-weight: 700; color: #333; margin-bottom: 0.2rem; }
.product-desc { font-size: 0.65rem; color: #888; line-height: 1.3; margin-bottom: 0.4rem; min-height: 2em; }
.product-price {
    font-weight: 800; color: var(--primary-color); font-size: 0.95rem;
    margin-bottom: 0.4rem;
}
.add-cart-btn {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--primary-color);
    background: rgba(255,75,130,0.1);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.add-cart-btn:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 380px) {
    .earnings-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .store-cat-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

.app-content { 
    transition: opacity 0.8s ease; 
    opacity: 1; 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    width: 100vw; 
}
.app-content.hidden { opacity: 0; pointer-events: none; }

/* --- CART UI --- */
.floating-cart {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    box-shadow: 0 10px 25px rgba(255,75,130,0.3);
    border-radius: 50px;
    padding: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s;
}
.floating-cart:hover {
    transform: scale(1.1);
}
.floating-cart .badge {
    position: absolute;
    top: -5px; right: -5px;
    background: #dc3545;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.cart-item-info { flex: 1; text-align: left; margin-right: 1rem; }
.cart-item-cost { font-weight: bold; color: var(--primary-color); }
.remove-btn {
    background: none; border: none; font-size: 1.2rem;
    cursor: pointer; opacity: 0.6; transition: 0.2s;
}
.remove-btn:hover { opacity: 1; color: #dc3545; }

/* --- MODAL OVERLAY --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(135deg, rgba(255,100,150,0.4), rgba(120,80,220,0.4));
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.3s ease;
}
.modal-overlay.hidden { display: none; }
.modal-content {
    max-width: 450px; width: 92%;
    padding: 2rem;
    max-height: 85vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,240,245,0.9));
    border: 2px solid rgba(255,105,180,0.3);
    box-shadow: 0 20px 50px rgba(255,75,130,0.35), inset 0 0 30px rgba(255,255,255,0.5);
    border-radius: 25px;
}

/* --- MODAL BUTTONS --- */
.modal-close-btn {
    flex: 1;
    padding: 0.9rem;
    border: 2px solid rgba(255,75,130,0.4);
    background: linear-gradient(135deg, #fff0f5, #ffe0ec);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
}
.modal-close-btn:hover {
    background: linear-gradient(135deg, #ffe0ec, #ffd0e0);
    box-shadow: 0 4px 12px rgba(255,75,130,0.2);
    transform: translateY(-2px);
}

.modal-checkout-btn {
    flex: 2;
    padding: 0.9rem;
    background: linear-gradient(135deg, #ff4b82, #ff6b9d);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(255,75,130,0.4);
}
.modal-checkout-btn:hover {
    background: linear-gradient(135deg, #ff3070, #ff5090);
    box-shadow: 0 6px 20px rgba(255,75,130,0.6);
    transform: translateY(-2px);
}

.modal-approve-btn {
    width: 100%; margin-bottom: 1rem; font-size: 1.1rem; padding: 1rem;
    background: linear-gradient(135deg, #28a745, #34d058);
    color: white; border: none; border-radius: 15px;
    font-weight: 700; cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(40,167,69,0.4);
}
.modal-approve-btn:hover {
    background: linear-gradient(135deg, #218838, #28a745);
    box-shadow: 0 6px 20px rgba(40,167,69,0.6);
    transform: translateY(-2px);
}

.modal-reject-btn {
    width: 100%; padding: 1rem;
    background: linear-gradient(135deg, #fff0f5, #ffe0ec);
    color: #dc3545; border: 2px solid rgba(220,53,69,0.3);
    border-radius: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.modal-reject-btn:hover {
    background: linear-gradient(135deg, #ffe0ec, #ffd0d5);
    transform: translateY(-2px);
}


/* =============================================
   BUBU SUPPORT TAB
   ============================================= */

/* Header */
.support-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1.5px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--glass-shadow);
}
.support-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.support-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4b82, #e040fb);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(255,75,130,0.4);
}
.support-pulse {
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 50%;
    border: 2px solid rgba(255,75,130,0.5);
    animation: supportPulse 2s ease-in-out infinite;
}
@keyframes supportPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.12); opacity: 0.2; }
}
.support-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}
.support-status {
    font-size: 0.78rem;
    color: var(--text-dark);
    opacity: 0.7;
}

/* Role selector */
.support-role-selector {
    text-align: center;
    padding: 1rem 0;
}
.role-hint {
    font-size: 0.9rem;
    color: var(--text-dark);
    opacity: 0.75;
    margin-bottom: 1.2rem;
    font-style: italic;
}
.role-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.role-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
    min-width: 140px;
    transition: all 0.25s;
    box-shadow: var(--glass-shadow);
}
.role-btn:hover, .role-btn.selected {
    background: linear-gradient(135deg, rgba(255,75,130,0.2), rgba(224,64,251,0.15));
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,75,130,0.35);
}
.role-emoji { font-size: 2rem; }
.role-name { font-weight: 700; color: var(--text-dark); font-size: 0.9rem; }
.role-sub { font-size: 0.72rem; color: var(--primary-color); }

/* Chat area */
.support-chat-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 340px);
    min-height: 280px;
}
.support-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.support-messages::-webkit-scrollbar { width: 4px; }
.support-messages::-webkit-scrollbar-thumb { background: rgba(255,75,130,0.3); border-radius: 4px; }

/* Message bubbles */
.msg-bubble {
    max-width: 80%;
    padding: 0.7rem 1rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.45;
    animation: bubblePop 0.25s ease;
}
@keyframes bubblePop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.msg-bubble.from-ai {
    align-self: flex-start;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
    border: 1.5px solid var(--glass-border);
    color: var(--text-dark);
    border-bottom-left-radius: 5px;
}
.msg-bubble.from-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary-color), #e040fb);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.msg-time {
    font-size: 0.65rem;
    opacity: 0.55;
    margin-top: 0.3rem;
    display: block;
}

/* Typing indicator */
.support-typing {
    align-self: flex-start;
    display: flex; gap: 5px;
    align-items: center;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.6);
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    margin-bottom: 0.3rem;
    border: 1.5px solid var(--glass-border);
}
.support-typing span {
    width: 7px; height: 7px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingDot 1.2s ease-in-out infinite;
}
.support-typing span:nth-child(2) { animation-delay: 0.2s; }
.support-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Input bar */
.support-input-bar {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.6rem;
    padding: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1.5px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: var(--glass-shadow);
}
.support-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-dark);
    padding: 0 0.5rem;
    font-family: 'Poppins', sans-serif;
}
.support-input::placeholder { opacity: 0.5; }
.support-send-btn {
    background: linear-gradient(135deg, var(--primary-color), #e040fb);
    border: none;
    border-radius: 50%;
    width: 40px; height: 40px;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.support-send-btn:hover { transform: scale(1.1); }

.support-reset-btn {
    margin-top: 0.6rem;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.7;
    text-align: center;
    width: 100%;
    padding: 0.3rem;
}
.support-reset-btn:hover { opacity: 1; }
