:root {
  --bg: #0f1115;
  --card: #181b22;
  --line: #272b35;
  --text: #e6e8ee;
  --muted: #8b90a0;
  --accent: #e11d48;
  --ok: #22c55e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, "Segoe UI", sans-serif;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

h1 { font-size: 22px; margin: 0 0 4px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.narrow { width: 100%; max-width: 340px; }

.muted { color: var(--muted); font-size: 13px; text-decoration: none; }

.row { display: flex; gap: 10px; margin-top: 12px; }
.row-between { display: flex; justify-content: space-between; margin-top: 10px; }

input, select, button, .button-link {
  font: inherit;
  border-radius: 8px;
  padding: 11px 14px;
  border: 1px solid var(--line);
}

input, select {
  flex: 1;
  min-width: 0;
  background: #0f1219;
  color: var(--text);
}

input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

button, .button-link {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
}

button:hover, .button-link:hover { filter: brightness(1.12); }
button:disabled { opacity: .5; cursor: default; filter: none; }

.narrow input, .narrow button { width: 100%; margin-top: 12px; }
.narrow input:disabled, .narrow button:disabled { opacity: .45; }

.hint { margin: 14px 0 0; line-height: 1.45; }
.hint code {
  background: #0f1219;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

.alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(225, 29, 72, .12);
  border: 1px solid rgba(225, 29, 72, .4);
  font-size: 14px;
}

.alert.warn {
  background: rgba(234, 179, 8, .1);
  border-color: rgba(234, 179, 8, .4);
}

.video-head { display: flex; gap: 14px; align-items: flex-start; }
.video-head img { width: 160px; border-radius: 8px; background: #000; }
.title { font-weight: 600; margin-bottom: 4px; }

.bar {
  height: 8px;
  border-radius: 99px;
  background: #0f1219;
  overflow: hidden;
}

.bar > div {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .3s;
}

.bar > div.done { background: var(--ok); }

.head { margin-top: 0; align-items: center; gap: 12px; }
.head h2 { font-size: 16px; margin: 0; min-width: 0; }

#stage-player video {
  width: 100%;
  max-height: 70vh;
  margin-top: 12px;
  border-radius: 8px;
  background: #000;
  display: block;
}

#stage-player audio {
  width: 100%;
  margin-top: 12px;
  display: block;
}

.files { list-style: none; margin: 12px 0 0; padding: 0; }

.files li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.files li:first-child { border-top: none; }

.files .info { flex: 1; min-width: 0; }

.files .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files .fresh { color: var(--ok); }

.files button, .files .button-link, .head button {
  padding: 7px 12px;
  font-size: 13px;
  margin: 0;
  flex-shrink: 0;
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.ghost:hover { color: #fff; border-color: var(--accent); filter: none; }

@media (max-width: 520px) {
  .files li { flex-wrap: wrap; }
  .files .info { flex-basis: 100%; }
}

@media (max-width: 520px) {
  .row { flex-direction: column; }
  .video-head { flex-direction: column; }
  .video-head img { width: 100%; }
}
