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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 400px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
}

.login-container h2 {
    color: #075e54;
    margin-bottom: 20px;
}

.login-button {
    background: #075e54;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.login-button:hover {
    background: #128c7e;
    transform: translateY(-2px);
}

.logout-button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.user-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #333;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-size: 18px;
    color: #333;
}

.chat-container {
    width: 400px;
    height: 600px;
    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: #075e54;
    color: white;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #e5ddd5;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="a" patternUnits="userSpaceOnUse" width="20" height="20"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23a)"/></svg>');
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-end;
}

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

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: #dcf8c6;
    border-bottom-right-radius: 5px;
}

.message.ai .message-bubble {
    background: white;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-time {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    max-width: 80px;
    margin-bottom: 15px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

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

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input {
    padding: 20px;
    background: #f0f0f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-field {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    outline: none;
    font-size: 16px;
    background: white;
}

.send-button {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #25d366;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.send-button:hover {
    background: #128c7e;
    transform: scale(1.1);
}

.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.status-indicator {
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
}

.error {
    color: #e74c3c;
}

.success {
    color: #27ae60;
}