*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at 20% 0%, #1a1030 0%, #06060c 55%);
  color: #eaeaf2;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.wrap { width: 100%; max-width: 520px; }
header { text-align: center; margin-bottom: 24px; }
h1 {
  font-size: 3rem; margin: 0; font-weight: 900; letter-spacing: -0.03em;
  background: linear-gradient(90deg, #ff4d9d 0%, #a259ff 50%, #4d7dff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 span { font-weight: 300; }
.tag { color: #9a9ab0; margin: 8px 0 0; font-size: 0.95rem; }

.card {
  background: rgba(20, 20, 32, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #2a2a44;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.hidden { display: none !important; }

.row { margin-bottom: 16px; }
.row label { display: block; }
.row label > span {
  display: block; font-size: 0.85rem; color: #a5a5c0;
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em;
}
.tel { display: flex; gap: 8px; }
.tel input {
  background: #0f0f1c; border: 1px solid #2a2a44;
  color: #fff; padding: 12px 14px; border-radius: 10px;
  font-size: 1rem; font-family: inherit; outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.tel input:focus { border-color: #a259ff; box-shadow: 0 0 0 3px rgba(162,89,255,0.25); }
#ccA, #ccB { width: 70px; text-align: center; }
#numA, #numB { flex: 1; }

.go {
  width: 100%; padding: 14px; margin-top: 8px;
  font-size: 1.05rem; font-weight: 700;
  border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, #ff4d9d 0%, #a259ff 100%);
  color: #fff; letter-spacing: 0.02em;
  transition: transform 100ms, box-shadow 120ms, opacity 120ms;
  box-shadow: 0 12px 24px -8px rgba(162,89,255,0.5);
}
.go:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -8px rgba(162,89,255,0.65); }
.go:active { transform: translateY(0); }
.go[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.hang {
  width: 100%; padding: 14px; margin-top: 12px;
  font-size: 1.05rem; font-weight: 700;
  border: none; border-radius: 12px; cursor: pointer;
  background: #331420; color: #ff8fa0; border: 1px solid #6a1c2f;
}
.hang:hover { background: #451826; }

.status { margin-top: 14px; min-height: 20px; font-size: 0.9rem; text-align: center; }
.status.ok { color: #6ee089; }
.status.err { color: #ff6b7a; }
.status.pending { color: #ffd166; }

.share { margin-top: 20px; display: grid; gap: 14px; }
.share .link-card {
  background: #0f0f1c; border: 1px solid #2a2a44; border-radius: 12px;
  padding: 14px;
}
.share .link-card h3 {
  margin: 0 0 8px; font-size: 0.85rem; color: #a5a5c0;
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}
.share .link-card .num { color: #ff9ecf; font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.share .link-card .url {
  background: #06060c; padding: 10px 12px; border-radius: 8px;
  font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 0.85rem; color: #d5d5ea; word-break: break-all;
  border: 1px solid #1a1a2e; user-select: all;
}
.share .link-card .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.share .link-card .actions a, .share .link-card .actions button {
  flex: 1; padding: 10px; text-align: center; text-decoration: none;
  background: #1a1a2e; color: #eaeaf2; border-radius: 8px;
  border: 1px solid #2a2a44; font-size: 0.85rem; font-family: inherit;
  cursor: pointer; font-weight: 600;
}
.share .link-card .actions a:hover, .share .link-card .actions button:hover {
  background: #2a2a44; border-color: #a259ff;
}

.calling { text-align: center; padding: 20px 0; }
.calling h2 { margin: 20px 0 8px; font-size: 1.4rem; font-weight: 700; }
.calling .sub { color: #9a9ab0; margin: 0 0 20px; font-size: 0.9rem; }
.ring {
  width: 100px; height: 100px; margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4d9d 0%, #a259ff 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 0 rgba(162,89,255,0.6);
  animation: pulse 1.6s infinite;
  position: relative;
}
.ring::before {
  content: "☎"; font-size: 3rem; color: #fff;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(162,89,255,0.6); }
  70% { box-shadow: 0 0 0 30px rgba(162,89,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(162,89,255,0); }
}
.ring.connected { animation: none; background: linear-gradient(135deg, #6ee089 0%, #4dbf6e 100%); }
.ring.connected::before { content: "🔊"; }

footer { text-align: center; margin-top: 20px; color: #626282; font-size: 0.8rem; }
