* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0b0d10;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

.screen { height: 100%; width: 100%; }
.hidden { display: none !important; }

/* ---- Lobby ---- */
#lobby {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lobby-card {
  max-width: 420px;
  width: 90%;
  text-align: center;
  background: #14171c;
  padding: 32px 28px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.lobby-card h1 { font-size: 22px; margin: 0 0 12px; }
.lobby-card p { color: #9aa2ad; font-size: 14px; line-height: 1.5; }
.lobby-card .hint { font-size: 12px; margin-top: 20px; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  background: #4f7cff;
  color: white;
  font-weight: 600;
  margin: 6px 4px;
}
button:disabled { opacity: 0.5; cursor: default; }
button.secondary { background: #2a2f38; color: #ddd; }
button.danger { background: #e64c4c; }

/* ---- Call screen ---- */
#call { position: relative; background: #000; }

#remoteVideo {
  /* contain, not cover: show her full camera frame instead of cropping/zooming to fill */
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

#localVideo {
  position: absolute;
  bottom: 100px;
  right: 20px;
  width: 22vw;
  max-width: 200px;
  min-width: 110px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.25);
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.status {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: #ddd;
  backdrop-filter: blur(6px);
}

.controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20,23,28,0.75);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border-radius: 999px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 92vw;
}

.ctrl-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  background: #2a2f38;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.ctrl-btn.active-off { background: #e64c4c; }
.ctrl-btn.active-on { background: #4f7cff; }

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1c2027;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
}
.volume-wrap input[type="range"] {
  width: 100px;
}
#volumeLabel { width: 40px; text-align: right; color: #9aa2ad; font-size: 12px; }

.quality {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9aa2ad;
  padding: 6px 10px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #888;
  display: inline-block;
}
.dot.good { background: #3ecf6e; }
.dot.ok { background: #e8c94c; }
.dot.poor { background: #e64c4c; }

@media (max-width: 560px) {
  .volume-wrap input[type="range"] { width: 60px; }
  #localVideo { bottom: 130px; }
}
