:root {
  --bg: #0f141b;
  --panel: #16202b;
  --accent: #2fd6b5;
  --text: #e6edf3;
  --muted: #9fb2c4;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #1c2a3a, #0f141b 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(10, 15, 22, 0.9);
  border-bottom: 1px solid #223244;
}

.brand {
  font-size: 20px;
  font-weight: 600;
}

.controls {
  display: flex;
  gap: 8px;
}

input, button {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a3a4d;
  background: #0f1822;
  color: var(--text);
}

button {
  background: var(--accent);
  color: #07211b;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  background: #3a4a5a;
  cursor: not-allowed;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  padding: 24px;
  flex: 1;
}

.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #223244;
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1118;
  border-radius: 12px;
  overflow: hidden;
}

video, canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.hidden {
  display: none;
}

.room-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.room-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.room-list li {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #223244;
  background: #0f1822;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.room-list .empty {
  justify-content: center;
  color: var(--muted);
  border-style: dashed;
}

.footer {
  padding: 12px 24px 20px;
  color: var(--muted);
  font-size: 12px;
}
