* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, sans-serif;
  background: #111;
  color: #eee;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* join screen */
#join-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1.5rem;
  padding: 1rem;
}
#join-form { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
#room-input {
  font-size: 1.1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #555;
  border-radius: 6px;
  background: #222;
  color: #eee;
  min-width: 16rem;
}
button {
  font-size: 1.1rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  cursor: pointer;
}
button:hover { background: #1d4ed8; }
button.off { background: #b91c1c; }

.error { color: #f87171; }

/* call screen */
#call-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#videos {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
}
.tile {
  position: relative;
  flex: 1 1 40%;
  min-width: 280px;
  max-width: 640px;
}
.tile video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #000;
  border-radius: 8px;
}
.tile .label {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.tile .status {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  background: #92400e;
}
.tile .status.connected { background: #166534; }
.tile .status.failed { background: #b91c1c; }

#banner {
  text-align: center;
  padding: 0.5rem;
  background: #b91c1c;
}

#controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem;
}
