﻿:root {
    --primary: #2A9D8F;
    --secondary: #264653;
    --accent: #E9C46A;
    --bg: #F8F9FA;
    --text: #212529;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

.chat-header {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

    .chat-header h3 {
        color: var(--secondary);
        font-size: 2rem;
        letter-spacing: -0.5px;
        margin: 0;
    }

.chat-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    padding: 1.5rem;
    height: 60vh;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.message-input {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

#userMessage {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    #userMessage:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(42,157,143,0.2);
    }

.voice-control {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 1rem;
    width: 100%;
    max-width: 800px;
    margin: 1rem auto 0;
}

.voice-button {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .voice-button svg {
        width: 24px;
        height: 24px;
        fill: currentColor;
    }

    .voice-button:hover {
        background: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(42,157,143,0.3);
    }

    .voice-button:active {
        transform: translateY(0);
    }

#sendButton {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.user-message {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 15px 15px 0 15px;
    margin: 0.5rem 0;
    max-width: 80%;
    float: right;
    clear: both;
}

.assistant-message {
    background: #e9ecef;
    color: var(--text);
    padding: 0.8rem 1.2rem;
    border-radius: 15px 15px 15px 0;
    margin: 0.5rem 0;
    max-width: 80%;
    float: left;
    clear: both;
}

.typing-indicator {
    display: inline-block;
    padding: 1rem;
}

.typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 3px;
    background: #ced4da;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes bounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }
}

.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

    .chat-box::-webkit-scrollbar-thumb:hover {
        background: var(--primary);
    }

@media (max-width: 768px) {
    .chat-box {
        height: 50vh;
        padding: 1rem;
    }

    .voice-button {
        width: 44px;
        height: 44px;
    }

        .voice-button svg {
            width: 20px;
            height: 20px;
        }
}
