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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.status-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label {
    font-weight: 600;
    color: #555;
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.status.connected {
    background: #d4edda;
    color: #155724;
}

.status.disconnected {
    background: #f8d7da;
    color: #721c24;
}

.status.enabled {
    background: #d1ecf1;
    color: #0c5460;
}

.status.disabled {
    background: #e2e3e5;
    color: #6c757d;
}

.control-panel {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.control-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.control-btn.start {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.control-btn.start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.control-btn.stop {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.control-btn.stop:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.conversation-panel {
    margin-bottom: 30px;
}

.conversation {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 75%;
    display: flex;
    flex-direction: column;
    position: relative;
    word-wrap: break-word;
}

.message.user {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.message.user::before {
    content: "🎤";
    position: absolute;
    top: -8px;
    right: 12px;
    font-size: 12px;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.message.bot {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #333;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.bot::before {
    content: "🤖";
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 12px;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.message .timestamp {
    font-size: 0.75em;
    opacity: 0.6;
    margin-top: 8px;
    font-style: italic;
}

.debug-panel {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.debug-panel h3 {
    margin-bottom: 15px;
    color: #555;
}

.debug-log {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    max-height: 200px;
    overflow-y: auto;
}

.debug-entry {
    margin-bottom: 5px;
    padding: 2px 0;
}

.debug-entry.error {
    color: #fc8181;
}

.debug-entry.warning {
    color: #f6e05e;
}

.debug-entry.info {
    color: #63b3ed;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    main {
        padding: 20px;
    }
    
    .status-panel {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 300px;
    }
}