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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #a8c8f5 0%, #c8a8f5 50%, #f5d8e8 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    padding: 20px;
    text-align: center;
    color: #333;
}

.chat-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 600;
}

.chat-header p {
    font-size: 14px;
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

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

.message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.user-message .message-icon {
    background: linear-gradient(135deg, #e8f0fe 0%, #f0f4fd 100%);
    color: #2c3e50;
    border: 2px solid #a8c8f5;
}

.bot-message .message-icon {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.message-content {
    flex: 1;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 70%;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-icon {
    margin-right: 0;
    margin-left: 12px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #6c7b95 0%, #8892a8 100%);
    color: white;
}

.bot-message .message-content {
    background: white;
    color: #333;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

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

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#messageInput:focus {
    border-color: #a8c8f5;
}

#sendButton {
    padding: 12px 24px;
    background: linear-gradient(135deg, #a8c8f5 0%, #c8a8f5 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#sendButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 200, 245, 0.4);
}

#sendButton:active {
    transform: translateY(0);
}

#sendButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a8c8f5;
    animation: typing 1.4s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-10px); opacity: 1; }
}

@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-header h1 {
        font-size: 20px;
    }
}