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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: #007bff;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 24px;
}

.header-buttons {
    display: flex;
    gap: 8px;
}

.robot-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.robot-btn:hover {
    background: rgba(255,255,255,0.3);
}

.robot-btn.connected {
    background: #28a745;
}

.continuous-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.continuous-btn:hover {
    background: rgba(255,255,255,0.3);
}

.voice-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.voice-btn:hover {
    background: rgba(255,255,255,0.3);
}

.settings-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.settings-btn:hover {
    background: rgba(255,255,255,0.3);
}

.chat-container {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
}

.message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 80%;
}

.message.user {
    background: #007bff;
    color: white;
    margin-left: auto;
}

.message.assistant {
    background: white;
    border: 1px solid #e0e0e0;
}

.message.system {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    font-size: 14px;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.controls {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.mic-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #28a745;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.mic-btn:hover:not(:disabled) {
    background: #218838;
}

.mic-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.mic-btn.recording {
    background: #dc3545;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.clear-btn {
    padding: 12px 24px;
    border: none;
    background: #6c757d;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.clear-btn:hover {
    background: #5a6268;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.model-info {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.cost-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #495057;
}

.cost-info strong {
    color: #007bff;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.status {
    text-align: center;
    padding: 10px;
    color: #6c757d;
    font-size: 14px;
}

.status.error {
    color: #dc3545;
}
