* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0b1220;
  color: #e5e7eb;
}

.app {
  width: min(900px, 92vw);
  margin: 24px auto;
  display: grid;
  gap: 16px;
}

.header h1 {
  margin: 0;
  font-size: 32px;
}

.header p {
  margin: 8px 0 0;
  color: #9ca3af;
}

.mode-switch {
  display: flex;
  gap: 10px;
}

.tab {
  border: 1px solid #334155;
  background: #111827;
  color: #e5e7eb;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.tab.active {
  background: #2563eb;
  border-color: #2563eb;
}

.panel,
.context-controls,
.result {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 14px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

video {
  width: 100%;
  background: #000;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#liveStatus {
  margin: 12px 0 0;
  color: #93c5fd;
  font-size: 14px;
}

button {
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

button.secondary {
  background: #374151;
}

.file-input {
  display: inline-block;
  margin-bottom: 12px;
}

.file-input span {
  display: block;
  margin-bottom: 8px;
  color: #d1d5db;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #374151;
  border-radius: 10px;
  background: #0f172a;
  color: #e5e7eb;
  padding: 10px;
}

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

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #cbd5e1;
}

pre {
  margin: 0;
  background: #0f172a;
  border: 1px solid #1f2937;
  padding: 12px;
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
