* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Float Button */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.chat-button svg {
    width: 28px;
    height: 28px;
    fill: white;
    transition: transform 0.3s ease;
}

.chat-button.active svg {
    transform: rotate(45deg);
}

/* Chat Container */
.chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
}

.chat-container.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.chat-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.chat-header p {
    font-size: 14px;
    opacity: 0.9;
}

.close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.chat-messages {
    height: 340px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.message {
    margin-bottom: 15px;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    text-align: left;
}

.message.ai {
    text-align: right;
}

.message-bubble {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    position: relative;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.message.ai .message-bubble {
    background: white;
    color: #333;
    border: 1px solid #e1e5e9;
}

.typing-indicator {
    display: none;
    text-align: right;
    margin-bottom: 15px;
}

.typing-indicator .message-bubble {
    background: white;
    border: 1px solid #e1e5e9;
    padding: 16px 20px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input */
.chat-input {
    padding: 20px;
    background: white;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.chat-input input:focus {
    border-color: #667eea;
}

.send-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1);
}

.send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 50px;
}

.welcome-message svg {
    width: 48px;
    height: 48px;
    fill: #ccc;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 480px) {
    .chat-container {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        height: 70vh;
    }

    .chat-button {
        right: 20px;
        bottom: 20px;
    }
}