:root {
  --bg: #0b0d10;
  --panel: #15181d;
  --border: #262a31;
  --text: #e9edf1;
  --muted: #8b94a3;
  --accent: #e11d2e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.status {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.status.live {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.hidden-video {
  position: absolute;
  width: 2px;
  height: 2px;
  opacity: 0;
  pointer-events: none;
}

.stage-col canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.stage-controls {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.level-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.level-meter {
  flex: 1;
  height: 10px;
  background: #0f1216;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.level-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ecc71, #f1c40f 70%, #e11d2e 90%);
  transition: width 0.05s linear;
}

.scene-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn.scene {
  flex: 1;
  text-align: center;
}

.btn.scene.active {
  border-color: var(--accent);
  color: var(--accent);
}

input[type="file"] {
  font-size: 12px;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

.checkline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  display: flex;
}

input[type="text"],
input[type="password"],
select {
  background: #0f1216;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.btn {
  background: #1c2129;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.btn:hover { border-color: #3a4048; }
.btn:disabled { opacity: 0.5; cursor: default; }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.stats {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.error {
  font-size: 12px;
  color: #ff6b6b;
  white-space: pre-wrap;
}
