:root {
  --bg: #f4f5f7; --card: #fff; --text: #1d2129; --muted: #86909c; --line: #e5e6eb;
  --accent: #1f6feb; --accent-weak: #e8f0fe; --danger: #d4380d; --ok: #2b8a3e; --warn: #d48806;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* 顶栏 */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  height: 48px; padding: 0 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.bar .title { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .link { color: var(--muted); font-size: 14px; background: none; border: 0; padding: 0; }

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* 卡片 / 列表 */
.card { display: block; background: var(--card); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px;
  color: var(--text); border: 1px solid var(--line); }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card);
  border-bottom: 1px solid var(--line); color: var(--text); }
.item:first-child { border-radius: 10px 10px 0 0; }
.item:last-child { border-radius: 0 0 10px 10px; border-bottom: 0; }
.item .no { width: 24px; color: var(--muted); font-variant-numeric: tabular-nums; }
.item .name { flex: 1; min-width: 0; }
.item .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.item.current { background: var(--accent-weak); }
.item.disabled { color: var(--muted); pointer-events: none; }

/* 登录 */
.login { max-width: 360px; margin: 12vh auto 0; padding: 0 16px; }
.login h1 { font-size: 22px; margin: 0 0 24px; text-align: center; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.btn { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--danger); border-color: #ffccc7; }
.btn.block { display: block; width: 100%; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.err { color: var(--danger); font-size: 13px; min-height: 20px; margin: 8px 0; }

/* 播放器 */
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.stage .big-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 26px; display: flex;
  align-items: center; justify-content: center; z-index: 3; padding-left: 4px; }
.stage .ctrl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: center;
  gap: 8px; padding: 18px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff;
  font-size: 12px; transition: opacity .25s; }
.stage .ctrl.off { opacity: 0; pointer-events: none; }
.stage .ctrl button { background: none; border: 0; color: #fff; padding: 4px 6px; font-size: 14px; min-width: 32px; }
.stage .ctrl input[type=range] { flex: 1; padding: 0; border: 0; background: transparent; accent-color: #fff; min-width: 0; }
.stage .ctrl .t { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage .msg { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.8); color: #fff;
  text-align: center; font-size: 14px; }
.stage .msg button { padding: 6px 18px; border-radius: 16px; border: 1px solid #fff; background: none; color: #fff; }
.stage.pseudo-fs { position: fixed; inset: 0; z-index: 100; width: 100vw; height: 100vh; aspect-ratio: auto; }
.stage.pseudo-fs.rot { inset: auto; top: 0; left: 100vw; width: 100vh; height: 100vw;
  transform-origin: 0 0; transform: rotate(90deg); }
.play-info { padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.play-info h2 { margin: 0; font-size: 16px; }
.play-info p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.section-title { padding: 16px 16px 8px; color: var(--muted); font-size: 13px; }
