:root {
    --primary: #00B894;
    --primary-dark: #00A685;
    --secondary: #0984E3;
    --accent: #FD79A8;
    --bg-gradient: linear-gradient(135deg, #F0FFF4 0%, #E6F7FF 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --border: 1px solid rgba(255, 255, 255, 0.18);
    --text-main: #2D3436;
    --text-light: #636E72;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 500px;
    height: 95vh;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    border: var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* WhatsApp Mode Override */
body.whatsapp-mode {
    background: #E5DDD5;
}

body.whatsapp-mode .app-container {
    background: #E5DDD5;
    border-radius: 0;
    height: 100vh;
    max-width: 100%;
}

body.whatsapp-mode .glass-header {
    background: #075E54;
    color: white;
    border: none;
}

body.whatsapp-mode .brand-text h1 {
    color: white;
}

body.whatsapp-mode .brand-text p {
    color: rgba(255,255,255,0.8);
}

body.whatsapp-mode .logo-icon {
    display: none; /* Hide logo in WA mode */
}

body.whatsapp-mode .chat-body {
    background: #E5DDD5 url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
}

body.whatsapp-mode .user-msg .message-content {
    background: #DCF8C6;
    color: #000;
    border-radius: 7.5px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

body.whatsapp-mode .bot-msg .message-content {
    background: white;
    color: #000;
    border-radius: 7.5px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

body.whatsapp-mode .input-area {
    background: #F0F0F0;
}

/* Header */
.glass-header {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

#lang-select {
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: white;
    color: var(--text-main);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 184, 148, 0.3);
}

.brand-text h1 {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.brand-text p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

/* Chat Area */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 85%;
    animation: slideUp 0.3s ease-out;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.bot-msg { align-self: flex-start; }
.bot-msg .message-content {
    background: white;
    color: var(--text-main);
    border-top-left-radius: 4px;
    border: 1px solid #f0f0f0;
}

.user-msg { align-self: flex-end; }
.user-msg .message-content {
    background: var(--primary);
    color: white;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.25);
}

/* Input Area */
.input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #F0F2F5;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #F9FAFB;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

button.send-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

button.send-btn:hover { transform: scale(1.05); }

/* Chips */
.chips-container {
    display: flex;
    gap: 8px;
    padding: 0 15px 10px 15px;
    overflow-x: auto;
}

.chip {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 184, 148, 0.05);
}

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

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.typing .dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.typing {
    display: flex; gap: 4px; padding: 10px 15px;
    background: white; border-radius: 15px;
    width: fit-content; margin-bottom: 10px; display: none;
}
