:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --background-color: #f9fafb;
    --chat-bg: #ffffff;
    --user-message-bg: #e0e7ff;
    --ai-message-bg: #f3f4f6;
    --text-color: #1f2937;
    --footer-text-color: #6b7280;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
}

.chat-container {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--chat-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.conversation {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 1rem;
    border-radius: 1rem;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
    word-wrap: break-word;
}

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

.message.user {
    background: var(--user-message-bg);
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
}

.message.ai {
    background: var(--ai-message-bg);
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
}

.message-time {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.input-area {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 1rem 1rem;
    flex-shrink: 0;
}

.voice-input {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-record {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-record i {
    font-size: 1.5rem;
}

.btn-record.recording {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    50% { transform: scale(1.1); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.input-group {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-control {
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.btn-send {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-send:hover {
    background: var(--secondary-color);
}

.status-bar {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    border: 1px solid transparent;
}

.status-bar i {
    font-size: 0.8rem;
    line-height: 1;
}

.status-bar.connected {
    background: #dcfce7;
    color: #166534;
    border-color: #a7f3d0;
}

.status-bar.disconnected {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--ai-message-bg);
    border-radius: 1rem;
    align-self: flex-start;
    margin: 0 1.5rem 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    height: 24px;
}

.typing-indicator.visible {
    opacity: 1;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #6b7280;
    border-radius: 50%;
    animation: typingAnimation 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 typingAnimation {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

.config-section {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1.5rem 1.5rem 0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.config-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer {
    text-align: center;
    padding: 1rem;
    color: var(--footer-text-color);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }

    .chat-container {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        width: 100%;
        box-shadow: none;
    }

    .chat-header {
        padding: 0.75rem 1rem;
        border-radius: 0;
    }

    .conversation {
        padding: 1rem;
    }
    
    .config-section, .input-area {
        padding: 1rem;
        margin: 1rem;
    }
    
    .input-area {
        border-radius: 0;
        border-top: 1px solid #e5e7eb;
        background: #fff;
        margin: 0;
    }

    .message {
        max-width: 90%;
        padding: 0.75rem;
    }
} 