:root {
    --primary-color: #25D366; /* WhatsApp Green */
    --primary-dark: #128C7E;
    --bg-color: #f0f2f5;
    --chat-bg: #efeae2;
    --bot-msg-bg: #ffffff;
    --user-msg-bg: #d9fdd3;
    --text-primary: #111b21;
    --text-secondary: #667781;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Lighter purple gradient */
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow: hidden; /* Prevent scroll bars from background */
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.wave {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    width: 200%;
    height: 200%;
    border-radius: 40%;
    animation: wave 25s infinite linear;
    top: -50%;
    left: -50%;
}

.wave.wave1 {
    animation-duration: 18s;
    opacity: 0.3;
}

.wave.wave2 {
    animation-duration: 24s;
    opacity: 0.2;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 45%;
}

.wave.wave3 {
    animation-duration: 30s;
    opacity: 0.1;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 35%;
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.main-container {
    width: 100%;
    max-width: 450px;
    background-color: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 85vh;
    max-height: 800px;
    position: relative;
}

header {
    background-color: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Removed .back-btn styles */

.header-profile {
    position: relative;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.header-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Removed .header-status styles */

.chat-interface {
    flex: 1;
    background-color: var(--chat-bg);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 15h10v10H15zm20 20h10v10H35zm20 20h10v10H55zm20 20h10v10H75z' fill='%23e5e0d8' fill-opacity='0.4'/%3E%3C/svg%3E"); /* Subtle pattern */
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 80px; /* Space for CTA */
}

.message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-size: 0.95rem;
    line-height: 1.4;
}

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

/* Bot Message Styles */
.message.bot {
    align-self: flex-start;
    background-color: var(--bot-msg-bg);
    color: var(--text-primary);
    border-top-left-radius: 0;
}

/* User Message Styles */
.message.user {
    align-self: flex-end;
    background-color: var(--user-msg-bg);
    color: var(--text-primary);
    border-top-right-radius: 0;
}

.message-content {
    word-wrap: break-word;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 4px;
}

/* Image Styles */
.image-content img {
    width: 100%;
    border-radius: 8px;
    display: block;
    max-height: 250px;
    object-fit: cover;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #b4b4b4;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

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

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

/* CTA Button */
.cta-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(to top, rgba(255,255,255,1) 80%, rgba(255,255,255,0));
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cta-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 600;
    width: 100%;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    background-color: var(--primary-dark);
}

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

