/* ============ 企业简约风 · 主题变量 ============
   参考 design.md：浅灰蓝底、单一企业蓝、白卡极浅描边、12px 圆角、克制动效 */
:root {
  /* Colors */
  --color-corporate-blue: #1e40af;
  --color-slate-mist: #f8fafc;
  --color-action-blue: #3b82f6;
  --color-slate: #64748b;
  --color-confirm-green: #10b981;
  --color-hint-violet: #c559f0;

  /* Semantic aliases used across the app */
  --bg: var(--color-slate-mist);
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0f172a;
  --text-dim: var(--color-slate);
  --text-faint: #94a3b8;
  --accent: var(--color-corporate-blue);
  --accent-soft: #eff6ff;
  --gold: #d97706;
  --success: var(--color-confirm-green);
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  /* Radius */
  --radius: 12px;
  --radius-sm: 8px;

  /* Elevation */
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --focus-ring: 0 0 0 2px var(--color-slate-mist), 0 0 0 4px var(--color-action-blue);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
::selection { background: #dbeafe; }

/* ============ 启动画面 ============ */
.boot-screen {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px; background: var(--bg);
}
.boot-logo { font-size: 56px; animation: float 2.4s ease-in-out infinite; }
.boot-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============ 布局 ============ */
.app-shell { min-height: 100vh; padding-bottom: 88px; }
.container { width: min(1120px, 100% - 40px); margin: 0 auto; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  width: min(1120px, 100% - 40px); margin: 0 auto;
  height: 64px; display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--accent); font-size: 19px; box-shadow: var(--shadow); overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { color: var(--text); }
.topbar-spacer { flex: 1; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 14px;
  transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.user-chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); font-weight: 600; font-size: 14px; color: var(--accent);
  overflow: hidden; flex: none; border: 1px solid var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.role-tag { font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; font-weight: 500; }

/* ============ 底部导航 ============ */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav-inner {
  width: min(560px, 100%); margin: 0 auto; height: 62px;
  display: flex; align-items: stretch; justify-content: space-around;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-faint); font-size: 11px; font-weight: 500; transition: color .15s ease-out;
  position: relative;
}
.nav-item .nav-icon { font-size: 22px; line-height: 1; }
.nav-item.active { color: var(--accent); }
.nav-item.active::before {
  content: ""; position: absolute; top: 0; width: 28px; height: 3px;
  border-radius: 0 0 4px 4px; background: var(--accent);
}
.admin-dot {
  position: absolute; top: 8px; right: calc(50% - 20px);
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ============ 页面标题 ============ */
.page-head { padding: 32px 0 8px; }
.page-title { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.page-sub { color: var(--text-dim); font-size: 14px; margin-top: 6px; }

/* ============ 搜索框 ============ */
.searchbar { position: relative; margin: 20px 0 8px; }
.searchbar input {
  width: 100%; padding: 10px 16px 10px 46px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong); outline: none;
  font-size: 14px; transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.searchbar input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.searchbar input::placeholder { color: var(--text-faint); }
.searchbar .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 18px; }

/* ============ 海报墙 ============ */
.movie-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px; padding: 20px 0 40px;
}
.movie-card { cursor: pointer; group: relative; }
.poster {
  position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border); transition: transform .15s ease-out, box-shadow .15s ease-out, border-color .15s ease-out;
  box-shadow: var(--shadow);
}
.movie-card:hover .poster { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--color-action-blue); }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-fallback {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; text-align: center;
  background: var(--surface-2);
}
.poster-fallback .pf-title { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--text); }
.poster-fallback .pf-mark { font-size: 34px; opacity: .55; margin-bottom: 10px; }
.poster-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px; background: linear-gradient(to top, rgba(15,23,42,.85), transparent 55%);
  opacity: 0; transition: opacity .15s ease-out;
}
.movie-card:hover .poster-overlay { opacity: 1; }
.play-pill {
  align-self: flex-start; margin-bottom: auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--accent); font-size: 18px; padding-left: 3px;
  box-shadow: 0 4px 12px rgba(15,23,42,.2); transform: scale(.7); transition: transform .15s ease-out;
}
.movie-card:hover .play-pill { transform: scale(1); }
.movie-meta { padding: 11px 2px 0; }
.movie-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-info { font-size: 12px; color: var(--text-dim); margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.rating { color: var(--gold); font-weight: 600; }

/* ============ 空状态 ============ */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 70px 20px; color: var(--text-dim); gap: 14px;
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty-icon { font-size: 54px; line-height: 1; }
.empty-icon img { width: 72px; height: 72px; object-fit: contain; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--text); }
.empty-text { font-size: 14px; line-height: 1.6; max-width: 320px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 500; font-size: 14px;
  transition: transform .15s ease-out, box-shadow .15s ease-out, background .15s ease-out, border-color .15s ease-out;
  white-space: nowrap; box-shadow: var(--shadow);
}
.btn:active { transform: scale(.98); box-shadow: none; }
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { background: #1a38a0; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============ 心愿单 ============ */
.wish-list { display: flex; flex-direction: column; gap: 12px; padding: 20px 0 40px; }
.wish-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow);
}
.wish-status-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex: none; display: grid; place-items: center; font-size: 18px;
  background: #fef3c7;
}
.wish-card.fulfilled .wish-status-icon { background: #d1fae5; }
.wish-card.declined .wish-status-icon { background: var(--danger-soft); }
.wish-body { flex: 1; min-width: 0; }
.wish-title { font-size: 16px; font-weight: 600; }
.wish-note { font-size: 13px; color: var(--text-dim); margin-top: 5px; line-height: 1.5; word-break: break-word; }
.wish-foot { font-size: 12px; color: var(--text-faint); margin-top: 9px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.status-badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { background: #fef3c7; color: #b45309; }
.status-fulfilled { background: #d1fae5; color: #047857; }
.status-declined { background: var(--danger-soft); color: var(--danger); }
.wish-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.wish-form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-top: 8px; box-shadow: var(--shadow);
}
.wish-form-title { font-weight: 600; font-size: 15px; margin-bottom: 14px; }

/* ============ 表单 ============ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--text); margin-bottom: 7px; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong); outline: none;
  font-size: 16px; transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.65; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }

/* ============ 登录页 ============ */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 32px; box-shadow: var(--shadow-md);
}
.auth-logo { text-align: center; margin-bottom: 8px; }
.auth-logo img { width: 72px; height: 72px; object-fit: contain; }
.auth-title { text-align: center; font-size: 30px; font-weight: 600; margin: 8px 0 4px; letter-spacing: -0.01em; }
.auth-sub { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: var(--radius-sm); margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 8px; border-radius: 6px; font-weight: 500; font-size: 14px; color: var(--text-dim); }
.auth-tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.auth-note { font-size: 12px; color: var(--text-faint); text-align: center; margin-top: 18px; line-height: 1.6; }

/* ============ 管理后台 ============ */
.admin-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 18px 0; box-shadow: var(--shadow); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-title { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.section-desc { font-size: 13px; color: var(--text-dim); margin-top: 4px; font-weight: 400; }
.stat-row { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 110px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.stat-num { font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.file-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; margin-top: 12px; }
.file-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .15s ease-out, background .15s ease-out;
}
.file-item:hover { border-color: var(--color-action-blue); }
.file-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.file-icon { font-size: 20px; }
.file-name { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 12px; color: var(--text-faint); }
.poster-preview {
  width: 90px; height: 135px; border-radius: var(--radius-sm); object-fit: cover;
  border: 1px solid var(--border); background: var(--bg-soft);
}
.poster-upload-row { display: flex; gap: 14px; align-items: center; }
.upload-label {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-dim); font-size: 13px; transition: border-color .15s ease-out, color .15s ease-out;
}
.upload-label:hover { border-color: var(--accent); color: var(--accent); }

.admin-movie-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.admin-movie-row:last-child { border-bottom: none; }
.admin-movie-thumb { width: 42px; height: 60px; border-radius: 6px; object-fit: cover; background: var(--bg-soft); flex: none; }
.admin-movie-name { flex: 1; font-size: 14px; font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-movie-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); font-size: 14px;
  transition: border-color .15s ease-out, color .15s ease-out;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ============ 播放页（保持深色，观影体验） ============ */
.player-screen { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; }
.player-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 18px 22px;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,.75), transparent);
}
.back-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 20px; backdrop-filter: blur(8px); }
.player-title-strip { flex: 1; min-width: 0; }
.player-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.player-sub { font-size: 12px; color: #b9b2c9; margin-top: 2px; }
.player-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.player-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.player-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.player-loading .boot-spinner { width: 48px; height: 48px; }

/* ============ Toast ============ */
.toast-root { position: fixed; top: 80px; left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--surface); border: 1px solid var(--border); padding: 10px 18px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); font-size: 14px; font-weight: 500;
  animation: toastIn .18s ease, toastOut .18s ease 2.4s forwards;
}
.toast.error { border-color: #fecaca; color: var(--danger); }
.toast.success { border-color: #a7f3d0; color: #047857; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

/* ============ Modal ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(15,23,42,.5);
  backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px;
  animation: fadeIn .15s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-md); animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 20px; font-weight: 600; }
.modal-close { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--bg-soft); display: grid; place-items: center; font-size: 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* ============ 账号菜单 ============ */
.chip-caret { color: var(--text-faint); font-size: 14px; margin-left: 2px; }
.account-card { display: flex; flex-direction: column; align-items: center; padding: 10px 0 22px; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }
.account-name { font-size: 18px; font-weight: 600; margin-top: 12px; }
.account-meta { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--border); font-size: 14px; font-weight: 500; text-align: left;
  transition: border-color .15s ease-out, background .15s ease-out;
}
.menu-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.menu-row span:first-child { font-size: 18px; }
.menu-arrow { margin-left: auto; color: var(--text-faint); font-size: 20px; }
.menu-row.danger { color: var(--danger); }
.menu-row.danger:hover { border-color: var(--danger); background: var(--danger-soft); }

/* ============ 管理后台布局 ============ */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex: none; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px; border-bottom: 1px solid var(--border); }
.admin-brand-title { font-weight: 600; font-size: 16px; }
.admin-brand-sub { font-size: 11px; color: var(--accent); margin-top: 2px; }
.admin-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  color: var(--text-dim); text-align: left; transition: background .15s ease-out, color .15s ease-out;
}
.admin-nav-item span { font-size: 18px; }
.admin-nav-item:hover { background: var(--bg-soft); color: var(--text); }
.admin-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.admin-sidebar-foot { padding: 12px 10px; border-top: 1px solid var(--border); }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.admin-topbar-title { font-size: 18px; font-weight: 600; }
.admin-content { padding: 8px 28px 60px; max-width: 1120px; }

/* ============ 上传区 ============ */
.upload-dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 44px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  cursor: pointer; transition: border-color .15s ease-out, background .15s ease-out;
}
.upload-dropzone:hover, .upload-dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { font-size: 46px; }
.dz-title { font-size: 16px; font-weight: 600; }
.dz-sub { font-size: 13px; color: var(--text-dim); }
.upload-card {
  margin-top: 18px; padding: 18px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--border);
}
.upload-card-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.upload-filename { font-weight: 600; font-size: 14px; word-break: break-all; }
.upload-size { color: var(--text-dim); font-size: 13px; flex: none; }
.progress { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .15s ease-out; }
.upload-status { font-size: 13px; color: var(--text-dim); margin-top: 10px; }
.upload-actions { margin-top: 12px; }
.pending-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px;
}
.pending-info { flex: 1; min-width: 0; }
.pending-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-meta { font-size: 12px; color: var(--text-faint); margin-top: 3px; }

/* ============ 用户列表 ============ */
.user-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.user-form .btn { grid-column: 1 / -1; justify-self: start; }
.user-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.user-row:last-child { border-bottom: none; }
.user-row-main { flex: 1; min-width: 0; }
.user-row-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.user-row-meta { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.user-row-actions { display: flex; gap: 8px; flex: none; }

/* ============ 头像角色选择 ============ */
.avatar-picker { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.avatar-option {
  width: 68px; height: 68px; border-radius: var(--radius-sm); border: 2px solid var(--border);
  background: var(--bg-soft); display: grid; place-items: center; cursor: pointer; overflow: hidden;
  transition: border-color .15s ease-out, transform .15s ease-out, box-shadow .15s ease-out;
}
.avatar-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-option:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.avatar-option.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--color-action-blue); }
.avatar-option-label { font-size: 11px; text-align: center; color: var(--text-dim); margin-top: 4px; }

/* 角色可爱小装饰：页面角落/标题旁 */
.char-buddy { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }

/* ============ 响应式 ============ */
@media (max-width: 600px) {
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
  .page-title { font-size: 24px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .auth-card { padding: 30px 22px; }
  .container, .topbar-inner { width: calc(100% - 32px); }
  .stat-box { min-width: calc(50% - 6px); }
}

/* ============ 移动端：管理后台 ============ */
@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: column; }
  .admin-brand { padding: 14px 18px; }
  .admin-nav { flex-direction: row; overflow-x: auto; padding: 8px 10px; gap: 6px; }
  .admin-nav-item { width: auto; white-space: nowrap; padding: 10px 12px; font-size: 13px; }
  .admin-sidebar-foot { display: flex; gap: 8px; padding: 6px 10px 10px; border-top: none; }
  .admin-sidebar-foot .admin-nav-item { width: auto; }
  .admin-topbar { padding: 0 18px; height: 56px; }
  .admin-content { padding: 8px 16px 50px; }
  .user-form { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .user-row-actions { flex-direction: column; }
  .file-list { max-height: 240px; }
}

/* ============ 剧集：片库卡片角标与进度 ============ */
.card-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(30,64,175,.92); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 6px; letter-spacing: .2px;
}
.card-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: rgba(0,0,0,.25); z-index: 3;
}
.card-progress > div { height: 100%; background: var(--accent, #1e40af); }
.watched-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #16a34a; margin-left: 7px; vertical-align: middle;
}
.ep-count { color: var(--accent, #1e40af); font-weight: 600; }

/* ============ 剧集详情页 ============ */
.back-link {
  display: inline-block; margin: 0 0 18px; padding: 8px 14px;
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  border-radius: 8px; background: var(--bg-soft);
}
.back-link:hover { color: var(--accent, #1e40af); }
.series-detail {
  display: flex; gap: 28px; padding: 24px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); margin-bottom: 28px;
}
.series-cover { width: 180px; flex: none; }
.series-cover .poster { width: 180px; height: 260px; border-radius: 10px; overflow: hidden; }
.series-cover .poster img { width: 100%; height: 100%; object-fit: cover; }
.series-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.series-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-dim); font-size: 14px; }
.series-desc { color: var(--text-dim); font-size: 14px; line-height: 1.8; margin: 4px 0; }
.series-info .btn { align-self: flex-start; }
.section-title-series { font-size: 17px; font-weight: 800; margin: 8px 0 16px; }
.series-ep-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.series-ep-card {
  position: relative; text-align: left; padding: 0; overflow: hidden;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: border-color .2s, transform .2s;
}
.series-ep-card:hover { border-color: var(--accent, #1e40af); transform: translateY(-2px); }
.series-ep-thumb {
  height: 84px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--text-dim); font-size: 13px; font-weight: 700;
  padding: 0 10px; text-align: center;
}
.series-ep-num { padding: 10px 12px 4px; font-size: 14px; font-weight: 700; }
.series-ep-status { padding: 0 12px 12px; font-size: 12px; color: var(--text-dim); }
.series-ep-status.done { color: #16a34a; font-weight: 600; }

/* ============ 播放器选集面板 ============ */
.player-body { display: flex; height: calc(100vh - 66px); }
.player-stage {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  background: #000; position: relative;
}
.player-stage video { width: 100%; height: 100%; object-fit: contain; }
.ep-panel {
  width: 300px; flex: none; background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.ep-panel-head {
  padding: 16px; font-size: 15px; font-weight: 800;
  border-bottom: 1px solid var(--border); flex: none;
}
.ep-grid { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ep-btn {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border-radius: 8px; background: var(--bg-soft);
  border: 1px solid transparent; text-align: left; font-size: 14px;
}
.ep-btn:hover { border-color: var(--accent, #1e40af); }
.ep-btn.active { background: var(--accent-soft, #eff6ff); border-color: var(--accent, #1e40af); }
.ep-num {
  width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--surface);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.ep-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-done { color: #16a34a; font-weight: 700; flex: none; }
.ep-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: transparent;
}
.ep-bar i { display: block; height: 100%; background: var(--accent, #1e40af); border-radius: 2px; }
.player-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* ============ 管理后台：剧集扫描卡片 ============ */
.series-tag {
  margin-left: 10px; font-size: 12px; font-weight: 600; color: var(--accent, #1e40af);
  background: var(--accent-soft, #eff6ff); padding: 2px 8px; border-radius: 6px;
}
.scan-card {
  padding: 16px; border-radius: 12px; background: var(--bg-soft);
  border: 1px solid var(--border); margin-bottom: 12px;
}
.scan-card.already { opacity: .65; }
.scan-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.scan-folder { font-size: 15px; font-weight: 700; }
.scan-epcount { font-size: 13px; color: var(--text-dim); }
.scan-epnames { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
.scan-already { font-size: 13px; color: #16a34a; font-weight: 600; }
.scan-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scan-form input.scan-title { flex: 2; min-width: 140px; }
.scan-form input.scan-year { width: 90px; }
.scan-form input.scan-genre { flex: 1; min-width: 110px; }
.scan-poster { margin: 0; }
.se-eps { display: flex; flex-direction: column; gap: 6px; }
.se-ep-row { display: flex; align-items: center; gap: 8px; }
.se-ep-row > span { width: 48px; flex: none; font-size: 13px; color: var(--text-dim); }
.se-ep-no { width: 80px; }
.se-ep-title { flex: 1; }

/* ============ 移动端适配 ============ */
@media (max-width: 860px) {
  .series-detail { flex-direction: column; gap: 18px; }
  .series-cover, .series-cover .poster { width: 140px; }
  .series-cover .poster { height: 200px; }
  .player-body { flex-direction: column; height: auto; }
  .player-stage { height: 56vw; min-height: 220px; }
  .ep-panel { width: 100%; height: 300px; border-left: none; border-top: 1px solid var(--border); }
}
