* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 30px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.test-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.test-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.test-section:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.test-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.test-title i {
    font-size: 24px;
}

.status {
    padding: 12px;
    border-radius: 10px;
    margin: 10px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-connecting { background: #fff3cd; color: #856404; }
.status-connected { background: #d4edda; color: #155724; }
.status-disconnected { background: #f8d7da; color: #721c24; }
.status-error { background: #f8d7da; color: #721c24; }

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.messages {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 13px;
}

.message {
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid;
}

.message-system { background: #f8f9fa; border-color: #6c757d; }
.message-user { background: #e7f1ff; border-color: #0d6efd; }
.message-ai { background: #d1e7dd; border-color: #198754; }
.message-error { background: #f8d7da; border-color: #dc3545; }
.message-ws { background: #fff3cd; border-color: #ffc107; }

.test-results {
    margin-top: 20px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    padding: 10px;
    border-radius: 8px;
    background: white;
}

.result-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.result-success { background: #d4edda; color: #155724; }
.result-fail { background: #f8d7da; color: #721c24; }
.result-pending { background: #fff3cd; color: #856404; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.call-section {
    grid-column: 1 / -1;
}

.call-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.call-status {
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    font-weight: bold;
    background: #e7f1ff;
    color: #0a58ca;
}

.call-active {
    background: #d1e7dd;
    color: #0f5132;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

.server-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.info-item {
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.info-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.log-area {
    background: #1a1a1a;
    color: #00ff00;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
}