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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #111b21;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.whatsapp-container {
    width: 100%;
    max-width: 600px;
    height: 90vh;
    background: #0b141a;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Header */
.chat-header {
    background: #202c33;
    padding: 10px 16px;
    border-bottom: 1px solid #2a3942;
}

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

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #00a884;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.header-info h3 {
    color: #e9edef;
    font-size: 16px;
    font-weight: 400;
}

.status {
    color: #8696a0;
    font-size: 13px;
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cGF0dGVybiBpZD0icGF0dGVybiIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiPjxwYXRoIGQ9Ik0yNSA1MGwxNSAxNSAxNS0xNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMWYyYzMzIiBzdHJva2Utd2lkdGg9IjIiIG9wYWNpdHk9IjAuMDUiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjcGF0dGVybikiLz48L3N2Zz4=');
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 20px;
}

.welcome-logo {
    margin-bottom: 24px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a884, #008069);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 168, 132, 0.3);
}

.welcome-screen h2 {
    color: #e9edef;
    font-size: 24px;
    margin-bottom: 12px;
}

.welcome-screen p {
    color: #8696a0;
    font-size: 14px;
    margin-bottom: 32px;
}

.mobile-input-container {
    width: 100%;
    max-width: 350px;
}

.input-group {
    display: flex;
    background: #2a3942;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.country-code {
    background: #1f2c34;
    color: #e9edef;
    padding: 14px 16px;
    font-size: 16px;
    border-right: 1px solid #3b4a54;
}

#mobileInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 16px;
    color: #e9edef;
    font-size: 16px;
}

#mobileInput::placeholder {
    color: #667781;
}

.start-btn {
    width: 100%;
    padding: 14px;
    background: #00a884;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.start-btn:hover {
    background: #008069;
}

.start-btn:disabled {
    background: #2a3942;
    color: #667781;
    cursor: not-allowed;
}

.error-message {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

/* Message Bubbles */
.message {
    display: flex;
    margin-bottom: 12px;
    animation: messageSlide 0.3s ease-out;
}

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

.message.sent {
    justify-content: flex-end;
}

.message.received {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 8px;
    word-wrap: break-word;
}

.message.sent .message-bubble {
    background: #005c4b;
    color: #e9edef;
    border-radius: 8px 8px 0 8px;
}

.message.received .message-bubble {
    background: #202c33;
    color: #e9edef;
    border-radius: 8px 8px 8px 0;
}

.message-text {
    font-size: 14.2px;
    line-height: 19px;
    white-space: pre-wrap;
}

.message-time {
    font-size: 11px;
    color: #8696a0;
    text-align: right;
    margin-top: 4px;
}

/* Quick Reply Buttons */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.quick-reply-btn {
    background: #1f2c34;
    color: #00a884;
    border: 1px solid #00a884;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background: #00a884;
    color: white;
}

/* List Messages */
.list-container {
    background: #1f2c34;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.list-item {
    padding: 12px;
    border-bottom: 1px solid #2a3942;
    cursor: pointer;
    transition: background 0.2s;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: #2a3942;
}

.list-item-title {
    color: #e9edef;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.list-item-subtitle {
    color: #8696a0;
    font-size: 13px;
}

/* Chat Input */
.chat-input {
    background: #202c33;
    padding: 10px 16px;
    border-top: 1px solid #2a3942;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#messageInput {
    flex: 1;
    background: #2a3942;
    border: none;
    outline: none;
    padding: 12px 16px;
    border-radius: 8px;
    color: #e9edef;
    font-size: 15px;
}

#messageInput::placeholder {
    color: #667781;
}

.send-btn {
    background: #00a884;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background 0.2s;
}

.send-btn:hover {
    background: #008069;
}

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

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8696a0;
    animation: typingBounce 1.4s infinite;
}

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

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

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #374045;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #4a5458;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 0;
    }

    .whatsapp-container {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}
