* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    background: #4285f4;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100% - 120px);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    display: flex;
}

.user-message {
    align-self: flex-end;
}

.bot-message {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}

.user-message .message-content {
    background: #007bff;
    color: white;
}

.bot-message .message-content {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e9ecef;
}

.input-container {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    background: #ffffff;
}

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#messageInput:focus {
    border-color: #007bff;
}

#sendButton {
    padding: 12px 24px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

#sendButton:hover {
    background: #218838;
    transform: translateY(-1px);
}

#sendButton:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    align-self: flex-start;
    max-width: 80px;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 18px;
    border: 1px solid #e9ecef;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typing 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        width: 95%;
        height: 90vh;
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .input-container {
        padding: 15px;
    }
}

/* Status indicators for different types of messages */
.bot-message.positive .message-content {
    border-left: 4px solid #28a745;
}

.bot-message.neutral .message-content {
    border-left: 4px solid #007bff;
}

.bot-message.negative .message-content {
    border-left: 4px solid #dc3545;
}

.bot-message.mixed .message-content {
    border-left: 4px solid #ffc107;
}