* {
    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%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4444;
    animation: pulse 2s infinite;
}

.status-indicator.connected {
    background: #44ff44;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Configuration Panel */
.config-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.config-panel h2 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.4rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.btn-secondary:hover {
    background: #4a5568;
}

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

.btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 87, 108, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

.audio-visualizer {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

#visualizer {
    max-width: 100%;
    height: auto;
}

.transcript-container {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
}

.transcript-container h2 {
    margin-bottom: 15px;
    color: #333;
}

.transcript {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
}

.transcript .placeholder {
    color: #999;
    font-style: italic;
}

.transcript-item {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
}

.transcript-item.user {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.transcript-item.ai {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
}

.transcript-item .label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.transcript-item.user .label {
    color: #2196f3;
}

.transcript-item.ai .label {
    color: #9c27b0;
}

footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

#server-info {
    font-weight: 600;
    color: #333;
}

/* Scrollbar styling */
.transcript::-webkit-scrollbar {
    width: 8px;
}

.transcript::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.transcript::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.transcript::-webkit-scrollbar-thumb:hover {
    background: #555;
}