:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --surface-2: #232e3a;
  --border: #2c3a49;
  --text: #e6edf3;
  --muted: #8b98a5;
  --primary: #2f81f7;
  --primary-hover: #4c94ff;
  --green: #2ea043;
  --green-hover: #3fb950;
  --red: #da3633;
  --red-hover: #f14e4b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.view {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 16px;
}

.card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.logo {
  font-size: 44px;
  text-align: center;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  letter-spacing: 0.5px;
}

.subtitle {
  margin: -8px 0 8px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: var(--primary);
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  background: var(--surface-2);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-accept {
  background: var(--green);
}
.btn-accept:hover {
  background: var(--green-hover);
}

.btn-reject,
.btn-hangup {
  background: var(--red);
}
.btn-reject:hover,
.btn-hangup:hover {
  background: var(--red-hover);
}

.btn-mute {
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.linkbtn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
}

.linkbtn:hover {
  color: var(--text);
}

.error {
  color: var(--red-hover);
  font-size: 13px;
  min-height: 18px;
  margin: 0;
  text-align: center;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  text-align: center;
}

/* 主界面顶栏 */
.topbar {
  width: 100%;
  max-width: 380px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.me b {
  color: var(--text);
}

.status {
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
}

/* 通话浮层 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 16, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.call-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.call-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.call-peer {
  font-size: 24px;
  font-weight: 700;
}

.call-state {
  color: var(--muted);
  font-size: 15px;
  min-height: 20px;
}

.sas-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 4px;
}

.sas-label {
  font-size: 11px;
  color: var(--muted);
}

.sas {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  font-variant-numeric: tabular-nums;
  color: var(--green-hover);
}

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

.call-actions .btn {
  min-width: 96px;
}
