* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif;
  background: #14161a;
  color: #eee;
  min-height: 100vh;
}
.screen { min-height: 100vh; }
.hidden { display: none !important; }

#joinScreen {
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  background: #1f2229;
  padding: 32px;
  border-radius: 12px;
  width: 320px;
}
.card h1 { font-size: 20px; margin: 0 0 20px; }
.card label {
  display: block;
  font-size: 13px;
  color: #9aa0aa;
  margin-bottom: 14px;
}
.card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #14161a;
  color: #eee;
  font-size: 14px;
}
.card button, header button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  background: #4a7dff;
  color: #fff;
}
.card button { width: 100%; margin-top: 8px; }
.hint { font-size: 12px; color: #666; margin-top: 14px; text-align: center; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #1f2229;
  border-bottom: 1px solid #2a2d35;
}
#roomLabel { font-size: 14px; color: #9aa0aa; }
.controls { display: flex; gap: 8px; }
.controls button.active { background: #ff5c5c; }
.controls button.danger { background: #333; }

.participants {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
}
.participant {
  background: #1f2229;
  border: 1px solid #2a2d35;
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 140px;
  text-align: center;
  position: relative;
}
.participant.speaking { border-color: #4a7dff; }
.participant .name { font-size: 14px; }
.participant .badge {
  font-size: 11px;
  color: #9aa0aa;
  margin-top: 4px;
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  padding: 0 20px 20px;
}
.screen-grid video {
  width: 100%;
  border-radius: 10px;
  background: #000;
}
.screen-tile { position: relative; }
.screen-tile .label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}
