:root {
  --bg: #0f1115;
  --card: #181b22;
  --line: #2a2f3a;
  --text: #e8eaf0;
  --muted: #9aa1b2;
  --accent: #e5484d;
  --ok: #3fb950;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header { padding: 24px 24px 0; max-width: 1200px; margin: auto; }
h1 { margin: 0 0 4px; font-size: 1.5rem; }
.sub { margin: 0; color: var(--muted); }

main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  padding: 20px 24px 40px;
  max-width: 1200px;
  margin: auto;
}
@media (max-width: 860px) { main { grid-template-columns: 1fr; padding: 16px; } }

.player-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; align-self: start; }
video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.now-playing { padding: 12px 16px; color: var(--muted); font-size: .95rem; word-break: break-all; }

aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.upload { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.drop {
  border: 2px dashed var(--line); border-radius: 10px; padding: 24px 12px;
  text-align: center; color: var(--muted); cursor: pointer; word-break: break-all;
}
.drop.over { border-color: var(--accent); color: var(--text); }
button {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 14px; font-weight: 600; cursor: pointer;
}
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; color: var(--muted); padding: 4px; font-weight: 500; }
button.link:hover { color: var(--text); }

.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.status { font-size: .9rem; color: var(--muted); min-height: 1.2em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--accent); }

.list-head { display: flex; justify-content: space-between; align-items: center; }
.list-head h2 { margin: 0; font-size: 1.1rem; }
.video-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.video-list li {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; display: flex; gap: 8px; align-items: center; cursor: pointer;
}
.video-list li:hover, .video-list li.active { border-color: var(--accent); }
.video-list .meta { flex: 1; min-width: 0; }
.video-list .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-list .info { color: var(--muted); font-size: .8rem; }
.video-list .empty { cursor: default; color: var(--muted); justify-content: center; }
