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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e8eef3;
}

.chat-header {
    background: #1e73be;
    color: white;
    padding: 25px;
    text-align: center;
}

.company-logo {
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.95;
    filter: brightness(0) invert(1);
}

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

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

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

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

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

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

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

.message-content {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
}

.message.user .message-content {
    background: #1e73be;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-timestamp {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 70px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #1e73be;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: typing 1.4s infinite;
}

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

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

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

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

#chatForm {
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

#messageInput:focus {
    border-color: #1e73be;
}

#sendButton {
    width: 50px;
    height: 50px;
    border: none;
    background: #1e73be;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

#sendButton:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(30, 115, 190, 0.3);
    background: #166ba8;
}

#sendButton:active {
    transform: scale(0.95);
}

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

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

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

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

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #166ba8;
}

.error-message {
    background: #ff4444 !important;
    color: white !important;
}
