/* General Styles */
body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    border-bottom: 0;
}

/* Chat Container Styles */
.chat-container {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Message Styles */
.system-message, .user-message, .transcription-message, .partial-message {
    margin-bottom: 15px;
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    clear: both;
}

.system-message {
    background-color: #e9ecef;
    color: #495057;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    border-radius: 12px;
    max-width: 90%;
}

.user-message {
    background-color: #007bff;
    color: white;
    float: right;
    border-bottom-right-radius: 4px;
}

.transcription-message {
    background-color: #28a745;
    color: white;
    float: left;
    border-bottom-left-radius: 4px;
}

.partial-message {
    background-color: #6c757d;
    color: white;
    float: left;
    border-bottom-left-radius: 4px;
    opacity: 0.8;
}

.message-content {
    word-wrap: break-word;
}

.timestamp {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    text-align: right;
}

/* Clear float after messages */
.chat-container::after {
    content: "";
    display: table;
    clear: both;
}

/* Recording Indicator Styles */
.recording-indicator {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    font-weight: bold;
    color: #dc3545;
}

.recording-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #dc3545;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

/* Button Styles */
.btn {
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 500;
}

/* API Key Toggle Button */
#toggleApiKey {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Status Bar */
#statusBar {
    transition: background-color 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .system-message, .user-message, .transcription-message, .partial-message {
        max-width: 90%;
    }
}