:root {
  --bg: #0b1220;
  --card: #121a2b;
  --line: #243049;
  --title: #f8fafc;
  --muted: #94a3b8;
  --primary: #ff5000;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: var(--font); background: var(--bg); color: #e2e8f0; }
body {
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(255, 80, 0, 0.18), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(14, 165, 233, 0.12), transparent 50%),
    var(--bg);
}
a { color: var(--primary); text-decoration: none; }
.wrap { width: min(720px, 92%); margin: 0 auto; padding: 36px 0 64px; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.brand { font-size: 18px; font-weight: 800; color: var(--title); letter-spacing: 0.2px; }
.sub { margin: 6px 0 16px; color: var(--muted); font-size: 13px; }
.card {
  background: rgba(18, 26, 43, 0.92);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 220px; padding: 24px; text-align: center;
  border: 1.5px dashed #334155; border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}
.drop.drag, .drop:hover { border-color: var(--primary); background: rgba(255, 80, 0, 0.08); }
.drop strong { color: var(--title); font-size: 16px; }
.drop p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.hidden { display: none; }
label { display: block; font-size: 12px; font-weight: 700; margin: 0 0 6px; color: var(--title); }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #0b1220;
  color: var(--title);
  margin-bottom: 12px;
  font: inherit;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: none;
  cursor: pointer; font-weight: 700; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; width: auto; }
.btn-ghost { background: transparent; color: var(--title); border: 1px solid var(--line); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.progress { height: 8px; border-radius: 99px; background: #1e293b; overflow: hidden; margin-top: 16px; }
.bar { height: 100%; width: 0; background: linear-gradient(90deg, #ff5000, #fb923c); }
.result { margin-top: 18px; }
.linkbox {
  width: 100%; background: #0b1220; color: #f8fafc; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; word-break: break-all;
}
.msg { min-height: 20px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.err { color: #fb7185; }
.ok { color: #34d399; }
.player { width: 100%; max-height: min(78vh, 820px); border-radius: 16px; background: #000; display: block; margin: 0 auto; }
.player-card { padding: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.empty { text-align: center; padding: 48px 12px; color: var(--muted); }
.admin-wrap { width: min(980px, 94%); }
.toolbar { display: grid; grid-template-columns: 1fr 160px; gap: 10px; margin-bottom: 12px; padding: 14px; }
.toolbar input, .toolbar select { margin: 0; height: 40px; }
.media-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; margin-bottom: 12px; padding: 14px; }
.thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 12px; background: #0b1220; border: 1px solid var(--line); }
.video-thumb { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.media-name { color: var(--title); font-weight: 700; margin-bottom: 6px; word-break: break-all; }
.tiny { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.btn-danger { background: #7f1d1d; color: #fecaca; }
.login-card { width: min(100%, 380px); margin: 80px auto; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab {
  flex: 1; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer;
}
.tab.is-on { background: var(--primary); color: #fff; border-color: var(--primary); }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: #1e293b; color: var(--muted); vertical-align: middle;
}
.tag-link { background: rgba(14, 165, 233, 0.16); color: #38bdf8; }

@media (max-width: 640px) {
  .wrap { padding-top: 22px; }
  .card { padding: 16px; }
  .toolbar, .media-row { grid-template-columns: 1fr; }
  .thumb { width: 100%; height: 160px; }
}
