:root {
  --bg0: #071a1c;
  --bg1: #0d3d42;
  --teal: #1aa6a6;
  --danger: #e24b4b;
  --text: #f4fffe;
  --muted: rgba(244, 255, 254, 0.72);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg1), var(--bg0));
  color: var(--text);
}

.call-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  text-align: center;
  position: relative;
  overflow: hidden;
}

.call-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 166, 166, 0.35), transparent 70%);
  top: 18%;
  pointer-events: none;
  animation: glow 2.4s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.call-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.call-brand {
  margin: 0 0 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.call-status {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
}

.call-sub {
  margin: 8px 0 0;
  max-width: 28rem;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.call-pulse {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 36px 0 20px;
  display: grid;
  place-items: center;
}

.call-pulse span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(26, 166, 166, 0.45);
  animation: ring 2s ease-out infinite;
}
.call-pulse span:nth-child(2) { animation-delay: 0.45s; }
.call-pulse span:nth-child(3) { animation-delay: 0.9s; }

@keyframes ring {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.25); opacity: 0; }
}

.call-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1aa6a6, #0b6e74);
  display: grid;
  place-items: center;
  font-size: 2rem;
  box-shadow: 0 10px 30px rgba(8, 80, 84, 0.45);
  z-index: 1;
}

.call-shell.is-connected .call-pulse span { animation: none; opacity: 0; }
.call-shell.is-ended .call-pulse { opacity: 0.45; }

.call-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 18px;
}

.call-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.call-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  min-width: 140px;
}

.call-btn-start {
  background: #229ed9;
  color: #fff;
}
.call-btn-end {
  background: var(--danger);
  color: #fff;
}
.call-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.call-error {
  margin-top: 16px;
  color: #ffb4b4;
  max-width: 24rem;
  line-height: 1.4;
}
