:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #1d2528;
  --muted: #6d777c;
  --line: #dce2dd;
  --green: #14b66f;
  --blue: #2563eb;
  --red: #dc2626;
  --shadow: 0 18px 48px rgba(33, 44, 48, .12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(20,182,111,.12), transparent 32rem), var(--bg);
}
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  transition: transform .15s ease, opacity .15s ease;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
button.ghost { background: #eef2ef; color: var(--ink); }
button.primary { background: var(--green); }
button.blue { background: var(--blue); }
button.danger { background: var(--red); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 72px; resize: vertical; }
.shell { max-width: 1180px; margin: 0 auto; padding: 28px 18px 54px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }
.logo-mark, .brand-dot { width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, var(--green), #f59e0b); }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: minmax(340px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel, .card, .login-box, .watch-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.panel { padding: 18px; }
.panel h2, .login-box h1 { margin: 0 0 14px; font-size: 20px; }
.form-row { display: grid; gap: 10px; margin-bottom: 12px; }
.file-drop {
  border: 1.5px dashed #aab8b0;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
}
.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
}
.file-pick {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 86px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
  cursor: pointer;
  padding: 16px;
}
.file-pick strong { font-size: 16px; }
.file-pick span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.file-name {
  min-height: 42px;
  border-radius: 8px;
  background: #eef2ef;
  color: var(--ink);
  padding: 11px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hint, .muted { color: var(--muted); font-size: 13px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.list-head h2 { margin: 0; font-size: 20px; }
.cards { display: grid; gap: 12px; }
.card { padding: 14px; box-shadow: none; }
.card-main { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.card h3 { margin: 0 0 6px; font-size: 17px; overflow-wrap: anywhere; }
.meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.qr { width: 104px; height: 104px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.progress { height: 8px; border-radius: 99px; background: #e9eee9; overflow: hidden; margin: 12px 0; display: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s ease; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { width: min(420px, 100%); padding: 26px; }
.login-box p { color: var(--muted); margin: -4px 0 20px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button { background: #eef2ef; color: var(--ink); }
.tabs button.active { background: var(--ink); color: #fff; }
.users { display: grid; gap: 10px; }
.user-row { display: grid; grid-template-columns: 1fr 110px 110px auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); z-index: 5; }
.watch { background: #101615; color: #fff; }
.watch-shell { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.watch-panel { width: min(880px, 100%); padding: 18px; background: #151d1b; border-color: rgba(255,255,255,.12); }
.watch-panel h1 { margin: 12px 0 8px; font-size: clamp(22px, 5vw, 34px); overflow-wrap: anywhere; }
.watch-panel p, .watch-tip { color: rgba(255,255,255,.7); }
.watch-panel video { width: 100%; max-height: 72vh; border-radius: 8px; background: #000; margin-top: 12px; }
.poster-preview { position: fixed; inset: 0; background: rgba(0,0,0,.64); display: grid; place-items: center; padding: 18px; z-index: 10; }
.poster-box { width: min(420px, 100%); background: #fff; border-radius: 8px; padding: 14px; }
.poster-box canvas { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.poster-box .actions { justify-content: center; }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .card-main { grid-template-columns: 1fr; }
  .qr { width: 132px; height: 132px; }
  .user-row { grid-template-columns: 1fr; }
}
