/* UI change: moved styles from index.html into separate stylesheet */
body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top, #eef4ff 0%, #f7f9fc 45%, #f3f6fb 100%);
    color: #111827;
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.card {
    width: min(92vw, 560px);
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    border: 1px solid #e8edf5;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

h2, h3 {
    margin: 0 0 14px;
    letter-spacing: 0.2px;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.55rem;
    font-weight: 650;
}

.inputs {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d8dfeb;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
}

.call-progress {
    min-height: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

button {
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: white;
    transition: transform 0.15s ease, filter 0.2s ease;
}

button:hover {
    filter: brightness(0.98);
}

button:active {
    transform: translateY(1px);
}

/* UI change: green call button, red hangup state */
#callBtn {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

#callBtn:hover {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

#callBtn.in-call {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

#callBtn.in-call:hover {
    background: linear-gradient(135deg, #f87171, #dc2626);
}

/* UI change: mute button is neutral gray */
#muteBtn {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

#muteBtn:hover {
    background: linear-gradient(135deg, #9ca3af, #4b5563);
}

/* UI change: hide controls until needed */
.hidden {
    display: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.incoming-call {
    border: 1px solid #d8dfeb;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
    margin-bottom: 18px;
}

.incoming-call p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #1f2937;
}

.incoming-actions {
    display: flex;
    gap: 10px;
}

.accept-btn {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.decline-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

#logs {
    border: 1px solid #d8dfeb;
    border-radius: 10px;
    background: #f8fbff;
    height: 200px;
    overflow: auto;
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

audio {
    width: 100%;
    margin-top: 12px;
}
