:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #15191e;
  --panel-strong: #1d232a;
  --line: #2b333c;
  --text: #f5f7fa;
  --muted: #aab4bf;
  --flamingo: #ff5f8f;
  --lagoon: #24b6a8;
  --reed: #d9b45f;
  --green: #2fca77;
  --danger: #e84d4d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: auto auto auto 1fr;
  gap: 16px;
  min-height: 100vh;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(36, 182, 168, 0.12), transparent 32%),
    linear-gradient(315deg, rgba(255, 95, 143, 0.12), transparent 36%);
}

.topbar,
.controls,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--flamingo);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  line-height: 1.05;
}

h2 {
  font-size: 1rem;
}

.status-strip,
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.controls {
  grid-column: 1 / -1;
  padding: 12px;
}

.context-band {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-left: 4px solid var(--flamingo);
  background: rgba(36, 182, 168, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
}

.context-band strong {
  color: var(--text);
}

button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  background: var(--flamingo);
}

.secondary {
  background: var(--panel-strong);
  border-color: var(--line);
}

.message {
  margin: 0;
  min-height: 20px;
  color: var(--muted);
}

.broadcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-content: start;
  gap: 12px;
  min-height: 420px;
}

.feed,
.empty-feed {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050607;
}

.feed video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050607;
}

.feed-meta {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feed-label {
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 10px;
  font-size: 0.83rem;
  font-weight: 800;
}

.feed-kick {
  min-height: 32px;
  flex: 0 0 auto;
  border-color: #8d3753;
  background: rgba(49, 20, 22, 0.92);
  color: #ffd8d8;
  padding: 0 10px;
}

.empty-feed {
  display: grid;
  place-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.empty-feed strong {
  color: var(--text);
  font-size: 1.1rem;
}

.side-panel {
  grid-column: 2;
  grid-row: 4;
  padding: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.panel-head span {
  color: var(--muted);
  font-weight: 800;
}

.participant-list {
  display: grid;
  gap: 8px;
}

.participant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-strong);
  padding: 9px;
}

.participant-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.participant-state {
  color: var(--muted);
  font-size: 0.78rem;
}

.kick {
  min-height: 34px;
  padding: 0 11px;
  background: #311416;
  border-color: #8d3753;
  color: #ffd8d8;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
