* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.container {
    width: 100%;
    max-width: 580px;
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 999px;
    color: #38bdf8;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-top: 4px;
}

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

.clinic-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.clinic-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
}

.clinic-info p {
    font-size: 13px;
    color: #10b981;
    margin-top: 4px;
}

.voice-visualizer {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 28px auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-avatar {
    font-size: 40px;
    background: #334155;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border: 2px solid #38bdf8;
    transition: transform 0.2s ease;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.4);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.voice-visualizer.active .pulse-ring {
    animation: pulse 1.6s infinite ease-out;
}

.voice-visualizer.active .agent-avatar {
    transform: scale(1.06);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
}

.voice-visualizer.speaking .agent-avatar {
    transform: scale(1.15);
    border-color: #10b981;
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.8);
}

.voice-visualizer.speaking .pulse-ring {
    border-color: rgba(16, 185, 129, 0.8);
    animation: pulse 0.7s infinite ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.85);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #94a3b8;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64748b;
}

.status-dot.connected {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-dot.connecting {
    background: #f59e0b;
}

.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #0284c7;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0369a1;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.metrics-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.metric-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #38bdf8;
}

.transcript-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 16px;
}

.transcript-box h4 {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.messages {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.msg {
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.4;
}

.msg.agent, .msg-agent {
    background: #1e3a8a;
    color: #e0f2fe;
    align-self: flex-start;
    border-left: 3px solid #38bdf8;
}

.msg.caller, .msg.user, .msg-user {
    background: #334155;
    color: #f8fafc;
    align-self: flex-end;
    border-right: 3px solid #10b981;
}

.msg.system {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    font-size: 13px;
    text-align: center;
    border: 1px dashed rgba(56, 189, 248, 0.3);
}

.system-msg {
    color: #64748b;
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}
