* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f5f5f5;
}

/* Floating Chat Button */
.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Chat Container */
.chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 80vh;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.chat-container.active {
    transform: translateY(0);
    opacity: 1;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.header-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.header-text p {
    font-size: 12px;
    opacity: 0.9;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Message Bubbles */
.message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.incoming {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.outgoing {
    background: #25D366;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message-content {
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

/* Welcome Message */
.welcome-message {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.welcome-message p {
    color: #128C7E;
    font-weight: 500;
    margin-bottom: 5px;
}

.welcome-message small {
    color: #666;
    font-size: 11px;
}

/* Chat Input Area */
.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#messageInput:focus {
    border-color: #25D366;
}

#sendButton {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sendButton:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.chat-notice {
    text-align: center;
    color: #666;
    font-size: 12px;
}

.chat-notice i {
    margin-right: 5px;
    color: #25D366;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        width: 95vw;
        right: 2.5vw;
        bottom: 80px;
        height: 70vh;
    }
    
    .floating-chat-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        height: 65vh;
    }
    
    .message {
        max-width: 90%;
    }
}