:root {
  --bg: #0f1220;
  --panel: #1a1f33;
  --accent: #5b8cff;
  --green: #34c759;
  --red: #ff3b30;
  --muted: #8b93a7;
  --text: #f2f4fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, #1c2340, var(--bg));
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

h1 { font-size: 1.15rem; margin: 0 0 4px; }
.subtitle { color: var(--muted); font-size: 0.8rem; margin-bottom: 20px; }

/* Device frames -----------------------------------------------------------*/
.device {
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* Watch: squircle */
.device--watch {
  width: 300px;
  height: 340px;
  border-radius: 64px;
  padding: 28px;
}

/* Phone: tall rounded rectangle */
.device--phone {
  width: 340px;
  height: 620px;
  border-radius: 44px;
  padding: 28px;
}

.device { display: flex; flex-direction: column; }

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}

/* Status pill -------------------------------------------------------------*/
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); transition: background 0.2s;
}
.dot.online { background: var(--green); }

.big-name { font-size: 1.4rem; font-weight: 600; }
.state-label { color: var(--muted); font-size: 0.85rem; min-height: 1.2em; }
.timer { font-variant-numeric: tabular-nums; color: var(--accent); font-size: 1rem; }

/* Buttons -----------------------------------------------------------------*/
.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: transform 0.08s, opacity 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--call { background: var(--green); }
.btn--hangup { background: var(--red); }
.btn--accent { background: var(--accent); }
.btn--ghost { background: #2a3150; }

.btn-round {
  width: 64px; height: 64px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.btn-row { display: flex; gap: 18px; justify-content: center; }

/* Peer list (parent app) --------------------------------------------------*/
.peer-list { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.peer {
  display: flex; align-items: center; justify-content: space-between;
  background: #232a45; border-radius: 16px; padding: 12px 16px;
}
.peer__name { font-weight: 600; }
.peer__role { color: var(--muted); font-size: 0.72rem; }

.hidden { display: none !important; }

/* Connection-path indicator + cellular toggle -----------------------------*/
.conn-path {
  font-size: 0.72rem;
  color: var(--muted);
  min-height: 1.1em;
}
.conn-path.relayed { color: #ffb84d; }
.conn-path.direct { color: var(--green); }

.toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; color: var(--muted);
  margin-top: 14px; cursor: pointer;
  user-select: none;
}
.toggle input { accent-color: var(--accent); width: 15px; height: 15px; }

/* Landing page ------------------------------------------------------------*/
.landing { max-width: 520px; text-align: center; }
.landing a { color: var(--accent); }
.card-links { display: flex; gap: 16px; margin-top: 24px; justify-content: center; }
.card-links a {
  background: var(--panel); padding: 20px 28px; border-radius: 18px;
  text-decoration: none; color: var(--text); font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.hint { color: var(--muted); font-size: 0.8rem; margin-top: 24px; line-height: 1.5; }

audio { display: none; }
