* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0f1115;
  color: #e8e8e8;
  margin: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #262a33;
}
main { padding: 24px; max-width: 720px; margin: 0 auto; }
h1 { font-size: 1.3rem; margin: 0; }
h2 { font-size: 1rem; color: #a8adba; }
.muted { color: #8a8f9c; font-size: 0.9rem; }
.error { color: #ff6b6b; min-height: 1.2em; }

.center-box {
  max-width: 340px;
  margin: 15vh auto;
  padding: 32px;
  background: #171a21;
  border-radius: 12px;
}
form { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.85rem; color: #a8adba; margin-top: 8px; }
input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2c3140;
  background: #0f1115;
  color: #e8e8e8;
  font-size: 1rem;
}
button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #3d6bff;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 14px;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
.link-btn { background: none; color: #8a8f9c; text-decoration: underline; margin: 0; padding: 0; }

#contacts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#contacts li button { width: 100%; text-align: left; background: #1c2130; margin: 0; }

.hidden { display: none !important; }
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
}
.overlay-box {
  background: #171a21; padding: 32px; border-radius: 12px; text-align: center;
}
.overlay-box button { margin: 8px; }
.accept { background: #2fbf71; }
.reject { background: #e05252; }

.video-grid { position: relative; margin-top: 16px; }
#remote-video {
  width: 100%; border-radius: 12px; background: #000; aspect-ratio: 16/9;
}
#local-video {
  position: absolute; bottom: 12px; right: 12px;
  width: 30%; border-radius: 8px; background: #000; border: 2px solid #171a21;
}
