/* ============================================================
 * 私人影院 - 设计系统
 * 现代深色影院风: 深黑基底 + 影院金 + 玻璃拟态
 * ============================================================ */

/* ---------- 变量与重置 ---------- */
:root {
  --bg-0: #07070b;
  --bg-1: #0d0d13;
  --bg-2: #13131b;
  --bg-3: #1b1b26;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --brd: rgba(255, 255, 255, 0.08);
  --brd-gold: rgba(230, 180, 90, 0.38);
  --gold: #e6b45a;
  --gold-2: #f5d9a0;
  --gold-deep: #b98a33;
  --gold-glow: rgba(230, 180, 90, 0.4);
  --text: #efece4;
  --text-2: #b3aea3;
  --text-3: #7d786e;
  --danger: #e06060;
  --ok: #6fce8f;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: Consolas, "SF Mono", "Courier New", monospace;
  --topbar-h: 60px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }
body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 500px at 70% -10%, rgba(230, 180, 90, 0.07), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(80, 110, 180, 0.06), transparent 60%);
  z-index: 0;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; color: inherit; }
a { color: var(--gold); text-decoration: none; cursor: pointer; }
a:hover { color: var(--gold-2); }
img { display: block; }
[hidden] { display: none !important; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a36; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--brd);
  z-index: 60;
}
.hamburger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--brd);
  background: var(--glass);
  color: var(--text-2);
  font-size: 13px;
  transition: all 0.25s;
}
.hamburger:hover { border-color: var(--brd-gold); color: var(--gold); box-shadow: 0 0 18px rgba(230, 180, 90, 0.15); }
.hb-icon { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.hb-icon i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: all 0.3s; }
.hb-icon i:nth-child(2) { width: 70%; }
.hamburger:hover .hb-icon i:nth-child(2) { width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.brand-ico { width: 30px; height: 30px; color: var(--gold); filter: drop-shadow(0 0 8px rgba(230, 180, 90, 0.45)); }
.brand-logo { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex: none; }
.brand-txt b {
  display: block;
  font-size: 17px;
  letter-spacing: 2px;
  background: linear-gradient(120deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-txt small { display: block; font-size: 10.5px; color: var(--text-3); letter-spacing: 1px; margin-top: 1px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-clock { font-family: var(--mono); font-size: 13px; color: var(--text-3); letter-spacing: 1px; }
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-2);
  transition: all 0.22s;
  flex: none;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--glass-2); color: var(--gold); }
.txt-btn { width: auto; padding: 0 12px; border-radius: 999px; font-size: 13px; font-family: var(--mono); }

/* ---------- 抽屉菜单 ---------- */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 70;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 300px;
  max-width: 86vw;
  background: rgba(13, 13, 19, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--brd);
  transform: translateX(-102%);
  transition: transform 0.34s cubic-bezier(0.22, 0.9, 0.24, 1);
  z-index: 80;
  display: flex;
  flex-direction: column;
}
.drawer.show { transform: translateX(0); box-shadow: 40px 0 90px rgba(0, 0, 0, 0.6); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--brd);
}
.drawer-head b { font-size: 15px; letter-spacing: 2px; color: var(--gold); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 14px 24px; }
.dsec { margin-top: 16px; }
.dsec h4 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 3px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.dsec h4::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--brd), transparent); }
.dsearch { display: flex; gap: 8px; }
.dsearch input {
  flex: 1;
  min-width: 0;
  background: var(--glass);
  border: 1px solid var(--brd);
  border-radius: var(--radius-s);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dsearch input:focus { border-color: var(--brd-gold); box-shadow: 0 0 0 3px rgba(230, 180, 90, 0.12); }
.dsearch input::placeholder { color: var(--text-3); }
.dsearch button {
  flex: none;
  padding: 0 14px;
  border-radius: var(--radius-s);
  font-size: 13px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1a1206;
  font-weight: 700;
  transition: filter 0.2s, transform 0.15s;
}
.dsearch button:hover { filter: brightness(1.1); }
.dsearch button:active { transform: scale(0.97); }
.line-list { display: flex; flex-direction: column; gap: 4px; }
.line-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  font-size: 13.5px;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.line-item:hover { background: var(--glass); color: var(--text); }
.line-item.active {
  background: rgba(230, 180, 90, 0.09);
  border-color: var(--brd-gold);
  color: var(--gold);
}
.line-item .li-check { width: 16px; flex: none; opacity: 0; color: var(--gold); font-weight: 700; transition: opacity 0.2s; }
.line-item.active .li-check { opacity: 1; }
.line-item .li-name { flex: 1; }
.line-item .li-tag {
  font-size: 10.5px;
  color: var(--text-3);
  border: 1px solid var(--brd);
  padding: 1px 7px;
  border-radius: 999px;
}
.line-note { font-size: 11.5px; color: var(--text-3); line-height: 1.7; padding: 6px 12px 0; }

/* ---------- 视图容器 ---------- */
#main { position: relative; z-index: 1; padding-top: var(--topbar-h); min-height: 100vh; }
.view { display: none; padding: 26px clamp(16px, 4vw, 44px) 60px; max-width: 1440px; margin: 0 auto; }
.view.active { display: block; animation: viewIn 0.4s ease both; }
.view-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.vh-txt h2 { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.vh-txt p { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.back { border: 1px solid var(--brd); background: var(--glass); }

/* ---------- 影院大厅 ---------- */
.lobby-hero { text-align: center; padding: 48px 0 30px; }
.clock {
  font-family: var(--mono);
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 700;
  letter-spacing: 6px;
  color: #f7ecd4;
  text-shadow: 0 0 24px rgba(230, 180, 90, 0.5), 0 0 70px rgba(230, 180, 90, 0.22);
  animation: clockPulse 4s ease-in-out infinite;
}
.clock-date { margin-top: 10px; color: var(--text-3); font-size: 14px; letter-spacing: 3px; }
.hero-search {
  max-width: 660px;
  margin: 34px auto 0;
  display: flex;
  gap: 10px;
  padding: 8px;
  background: var(--glass);
  border: 1px solid var(--brd);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.hero-search:focus-within { border-color: var(--brd-gold); box-shadow: 0 0 0 4px rgba(230, 180, 90, 0.1), 0 10px 40px rgba(0, 0, 0, 0.4); }
.hero-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 10px 8px 10px 18px;
}
.hero-search input::placeholder { color: var(--text-3); }
.hero-search button {
  flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 45%, var(--gold-deep));
  color: #1a1206;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 6px 24px rgba(230, 180, 90, 0.25);
}
.hero-search button svg { width: 17px; height: 17px; }
.hero-search button:hover { filter: brightness(1.08); box-shadow: 0 8px 30px rgba(230, 180, 90, 0.4); }
.hero-search button:active { transform: scale(0.97); }
.hero-hint { margin-top: 14px; font-size: 12.5px; color: var(--text-3); letter-spacing: 0.5px; }
.quick-chips { margin-top: 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.runtime { margin-top: 26px; font-size: 12px; color: var(--text-3); letter-spacing: 1px; }
.runtime b { color: var(--gold); font-weight: 600; }

/* ---------- 首页站长简介卡片 ---------- */
.brief-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px 30px;
  border-radius: var(--radius);
  border: 1px solid var(--brd);
  background: linear-gradient(120deg, rgba(230, 180, 90, 0.06), var(--glass) 55%);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.brief-card:hover {
  border-color: var(--brd-gold);
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5), 0 0 30px rgba(230, 180, 90, 0.12);
}
.brief-avatar {
  width: 96px; height: 96px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--brd-gold);
  background: linear-gradient(145deg, var(--bg-2), var(--bg-3));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 26px rgba(230, 180, 90, 0.16);
}
.brief-avatar img { width: 100%; height: 100%; object-fit: cover; }
.brief-avatar span { font-size: 38px; font-weight: 700; color: var(--gold); }
.brief-main { flex: 1; min-width: 0; }
.brief-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-2);
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.brief-name small { font-size: 12.5px; font-weight: 400; color: var(--gold); letter-spacing: 1px; }
.brief-text {
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 2;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.brief-more {
  flex: none;
  font-size: 13px;
  color: var(--gold);
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.brief-more svg { width: 15px; height: 15px; transition: transform 0.25s; }
.brief-card:hover .brief-more svg { transform: translateX(4px); }

.sec { margin-top: 34px; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sec-head h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  display: flex; align-items: center; gap: 10px;
}
.sec-head h3::before { content: ""; width: 4px; height: 17px; border-radius: 2px; background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); box-shadow: 0 0 10px var(--gold-glow); }
.sec-head .btn-ghost { margin-left: auto; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--brd);
  background: var(--glass);
  color: var(--text-2);
  font-size: 13px;
  transition: all 0.22s;
}
.btn-ghost:hover { border-color: var(--brd-gold); color: var(--gold); }
.btn-ghost svg { width: 15px; height: 15px; }
.btn-gold {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1a1206;
  font-weight: 700;
  font-size: 13.5px;
  transition: filter 0.2s, transform 0.15s;
}
.btn-gold:hover { filter: brightness(1.1); }
.btn-gold:active { transform: scale(0.97); }
.footer {
  margin-top: 60px;
  padding-top: 22px;
  border-top: 1px solid var(--brd);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-3);
}
.footer a { color: var(--text-2); margin-left: 2px; }
.footer a:hover { color: var(--gold); }

/* ---------- 网格 & 影片卡片 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 20px 16px;
}
.mcard {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--brd);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
  outline: none;
}
.mcard:hover, .mcard:focus-visible {
  transform: translateY(-5px);
  border-color: var(--brd-gold);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55), 0 0 26px rgba(230, 180, 90, 0.16);
}
.mcard:focus-visible { box-shadow: 0 0 0 3px rgba(230, 180, 90, 0.4), 0 20px 44px rgba(0, 0, 0, 0.55); }
.mcard-poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--bg-3); }
.mcard-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.3, 1); }
.mcard:hover .mcard-poster img { transform: scale(1.07); }
.mcard-poster.no-pic::after {
  content: "🎬";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  opacity: 0.35;
}
.mcard-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--gold-2);
  max-width: 76%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mcard-strip {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 10px 9px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88));
}
.mcard-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mcard-meta { margin-top: 4px; font-size: 11px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.mcard-meta .dot { color: var(--text-3); }
.mcard-srcs { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.src-badge {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid var(--brd-gold);
  color: var(--gold);
  background: rgba(230, 180, 90, 0.08);
  white-space: nowrap;
}
.src-badge.dim { border-color: var(--brd); color: var(--text-3); background: var(--glass); }

/* 骨架屏 */
.skel { pointer-events: none; }
.skel .mcard-poster::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skel .mcard-strip { visibility: hidden; }

/* ---------- 筛选 chips ---------- */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.chip {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  border: 1px solid var(--brd);
  background: var(--glass);
  color: var(--text-2);
  transition: all 0.2s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--brd-gold); color: var(--gold); }
.chip.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent;
  color: #1a1206;
  font-weight: 700;
}
.chip.err { border-color: rgba(224, 96, 96, 0.4); color: var(--danger); }
.chip.static { cursor: default; }
.lib-cats { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.lib-cats::-webkit-scrollbar { height: 0; }

/* ---------- 空状态 & 分页 ---------- */
.empty { text-align: center; padding: 70px 20px; color: var(--text-3); }
.empty .em-ico { font-size: 44px; opacity: 0.5; }
.empty p { margin-top: 14px; font-size: 14px; line-height: 2; }
.empty b { color: var(--text-2); }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; }
.pager span { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.pager .btn-ghost:disabled { opacity: 0.35; pointer-events: none; }

/* ---------- 直播列表 ---------- */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.live-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--brd);
  background: var(--glass);
  transition: all 0.25s;
  text-align: left;
}
.live-card:hover { border-color: var(--brd-gold); background: rgba(230, 180, 90, 0.07); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); }
.live-card .lc-ico { width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(230, 180, 90, 0.1); color: var(--gold); }
.live-card .lc-ico svg { width: 21px; height: 21px; }
.live-card .lc-txt b { display: block; font-size: 14px; }
.live-card .lc-txt small { display: block; margin-top: 3px; color: var(--text-3); font-size: 11.5px; }
.live-card .lc-live {
  margin-left: auto;
  font-size: 10px;
  color: #ff8a7a;
  border: 1px solid rgba(255, 138, 122, 0.45);
  padding: 2px 8px;
  border-radius: 999px;
  animation: livePulse 1.8s ease-in-out infinite;
}

/* ---------- 播放器 ---------- */
.player-view {
  position: fixed; inset: 0;
  background: #000;
  z-index: 100;
  display: none;
  flex-direction: column;
  opacity: 1;
}
.player-view.hide-cursor { cursor: none; }
.p-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent);
  z-index: 12;
  transition: opacity 0.3s;
}
.p-title { font-size: 14.5px; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.p-title b { color: var(--gold); }
.p-title small { color: var(--text-2); margin-left: 8px; }
.p-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live-badge {
  font-size: 11px;
  color: #ff8a7a;
  border: 1px solid rgba(255, 138, 122, 0.5);
  border-radius: 999px;
  padding: 3px 10px;
  animation: livePulse 1.8s ease-in-out infinite;
}
.p-body { flex: 1; display: flex; min-height: 0; }
.p-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; position: relative; }
.video-box { position: relative; width: 100%; height: 100%; max-width: 100%; max-height: 100%; }
.video-box video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; position: relative; z-index: 5; }
#dmCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.p-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-2);
  font-size: 13px;
}
.ring {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(230, 180, 90, 0.18);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
.p-error {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(0, 0, 0, 0.72);
  text-align: center;
  padding: 20px;
}
.pe-title { font-size: 17px; font-weight: 700; color: var(--danger); }
.pe-msg { font-size: 12.5px; color: var(--text-3); max-width: 420px; line-height: 1.8; }
.pe-btns { display: flex; gap: 12px; margin-top: 14px; }
.p-toast {
  position: absolute; left: 50%; top: 76px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--brd-gold);
  color: var(--gold-2);
  font-size: 12.5px;
  padding: 8px 18px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  z-index: 15;
  animation: toastIn 0.3s ease both;
}
/* 右侧面板 */
.ppanel {
  width: 360px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: rgba(13, 13, 19, 0.94);
  border-left: 1px solid var(--brd);
  transition: margin-right 0.3s cubic-bezier(0.22, 0.9, 0.24, 1);
  z-index: 11;
}
.ppanel.closed { margin-right: -361px; }
.pp-tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--brd);
}
.pp-tab {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  transition: all 0.2s;
}
.pp-tab:hover { color: var(--gold); }
.pp-tab.active { background: rgba(230, 180, 90, 0.12); color: var(--gold); font-weight: 700; }
.pp-close { margin-left: auto; width: 32px; height: 32px; }
.pp-body { flex: 1; overflow-y: auto; padding: 14px; }
.pp-pane { display: none; }
.pp-pane.active { display: block; animation: viewIn 0.25s ease both; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.epbtn {
  padding: 9px 6px;
  font-size: 12.5px;
  border-radius: 8px;
  border: 1px solid var(--brd);
  background: var(--glass);
  color: var(--text-2);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: all 0.2s;
}
.epbtn:hover { border-color: var(--brd-gold); color: var(--gold); }
.epbtn.active { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #1a1206; font-weight: 700; border-color: transparent; }
.pp-sub { font-size: 11px; letter-spacing: 3px; color: var(--text-3); margin: 14px 2px 9px; display: flex; align-items: center; gap: 9px; }
.pp-sub::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--brd), transparent); }
.pp-sub:first-child { margin-top: 2px; }
.line-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  margin-bottom: 8px;
  border-radius: var(--radius-s);
  border: 1px solid var(--brd);
  background: var(--glass);
  font-size: 13px;
  color: var(--text-2);
  transition: all 0.2s;
}
.line-btn:hover { border-color: var(--brd-gold); color: var(--text); }
.line-btn.active { border-color: var(--gold); background: rgba(230, 180, 90, 0.1); color: var(--gold); }
.line-btn .lb-tag { margin-left: auto; font-size: 10.5px; color: var(--text-3); }
.line-btn.active .lb-tag { color: var(--gold-2); }
.dm-item { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; transition: background 0.2s; cursor: pointer; }
.dm-item:hover { background: var(--glass); }
.dm-item .dmi-time { font-family: var(--mono); font-size: 11.5px; color: var(--gold-deep); flex: none; margin-top: 2px; }
.dm-item .dmi-text { color: var(--text-2); word-break: break-all; }
.pp-empty { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 40px 10px; line-height: 2; }

/* 控制栏 */
.p-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 18px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent);
  z-index: 12;
  transition: opacity 0.3s, transform 0.3s;
}
.player-view.ui-hidden .p-controls, .player-view.ui-hidden .p-top { opacity: 0; pointer-events: none; }
.send-bar {
  display: flex; align-items: center; gap: 10px;
  max-width: 760px;
  margin: 0 auto 12px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(13, 13, 19, 0.92);
  border: 1px solid var(--brd);
  backdrop-filter: blur(10px);
}
.send-bar input[type="text"], .send-bar #dmInput {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-size: 13.5px;
  padding: 6px 8px;
  color: var(--text);
}
.send-bar input::placeholder { color: var(--text-3); }
.dm-color { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); flex: none; }
.dm-color input[type="color"] { width: 26px; height: 26px; border: none; background: none; padding: 0; border-radius: 6px; overflow: hidden; cursor: pointer; }
.send-bar select {
  background: var(--glass); border: 1px solid var(--brd); color: var(--text-2);
  border-radius: 8px; padding: 6px 8px; font-size: 12.5px; outline: none;
}
.progress { position: relative; padding: 9px 0; cursor: pointer; }
.pg-bg { position: relative; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); overflow: visible; }
.pg-buf { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: rgba(255, 255, 255, 0.24); }
.pg-cur { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.pg-dot {
  position: absolute; top: 50%; left: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--gold-2);
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 0 12px var(--gold-glow);
  transition: transform 0.18s;
}
.progress:hover .pg-dot { transform: translate(-50%, -50%) scale(1); }
.pg-tip {
  position: absolute; bottom: 22px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--brd);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.progress:hover .pg-tip { opacity: 1; }
.ctrl-row { display: flex; align-items: center; gap: 4px; }
.ctrl-row .time-txt { font-family: var(--mono); font-size: 12px; color: var(--text-2); margin-left: 8px; letter-spacing: 0.5px; }
.ctrl-row .spacer { flex: 1; }
.vol-wrap { display: flex; align-items: center; gap: 4px; }
.vol-wrap input[type="range"] {
  width: 72px; height: 4px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px; outline: none; cursor: pointer;
}
.vol-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}
.pop-wrap { position: relative; }
.pop {
  position: absolute;
  bottom: 48px; right: 0;
  min-width: 170px;
  background: rgba(18, 18, 26, 0.97);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  display: none;
  z-index: 20;
}
.pop.show { display: block; animation: toastIn 0.2s ease both; }
.pop .pop-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  transition: all 0.15s;
  text-align: left;
}
.pop .pop-item:hover { background: var(--glass-2); color: var(--text); }
.pop .pop-item.on { color: var(--gold); }
.pop .pop-sep { height: 1px; background: var(--brd); margin: 6px 4px; }
.pop .pop-label { font-size: 11px; color: var(--text-3); letter-spacing: 2px; padding: 6px 12px 2px; }
.pop .pop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 12.5px; color: var(--text-2); }
.pop input[type="number"] {
  width: 64px;
  background: var(--glass); border: 1px solid var(--brd); border-radius: 7px;
  padding: 5px 8px; font-size: 12.5px; outline: none; text-align: center;
}
.pop input[type="range"] { width: 110px; accent-color: var(--gold); }
.pop .sw {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
  transition: background 0.2s;
  flex: none;
}
.pop .sw::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.pop .sw.on { background: var(--gold); }
.pop .sw.on::after { transform: translateX(16px); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 120;
  animation: fadeIn 0.25s ease both;
}
.modal {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  display: flex; flex-direction: column;
  background: rgba(16, 16, 24, 0.97);
  border: 1px solid var(--brd);
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--brd);
}
.modal-head h3 { font-size: 16px; letter-spacing: 2px; color: var(--gold); }
.modal-body { padding: 18px 22px 24px; overflow-y: auto; font-size: 13.5px; line-height: 2; color: var(--text-2); }
.modal-body b { color: var(--text); }
.modal-body .mb-line { display: flex; gap: 10px; padding: 7px 0; }
.modal-body .mb-num {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(230, 180, 90, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}
.modal-body .mb-hl { color: var(--gold); }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: rgba(18, 18, 26, 0.96);
  border: 1px solid var(--brd-gold);
  color: var(--text);
  font-size: 13px;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: toastIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  max-width: 82vw;
  text-align: center;
}
.toast.err { border-color: rgba(224, 96, 96, 0.55); color: #f3c1c1; }
.toast.out { animation: toastOut 0.3s ease both; }

/* ---------- 动画 ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes clockPulse { 0%, 100% { text-shadow: 0 0 24px rgba(230, 180, 90, 0.5), 0 0 70px rgba(230, 180, 90, 0.22); } 50% { text-shadow: 0 0 34px rgba(230, 180, 90, 0.65), 0 0 90px rgba(230, 180, 90, 0.3); } }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .ppanel {
    position: absolute;
    top: 52px; right: 0; bottom: 0;
    width: min(360px, 88vw);
    background: rgba(10, 10, 15, 0.97);
    border-left: 1px solid var(--brd);
    box-shadow: -30px 0 70px rgba(0, 0, 0, 0.5);
  }
  .ppanel.closed { margin-right: 0; transform: translateX(102%); }
  .ppanel { transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.24, 1); }
}
@media (max-width: 760px) {
  :root { --topbar-h: 54px; }
  .hb-text { display: none; }
  .hamburger { padding: 9px 12px; }
  .brand-txt b { font-size: 15px; letter-spacing: 1px; }
  .brand-txt small { display: none; }
  .top-clock { display: none; }
  .view { padding: 18px 14px 50px; }
  .lobby-hero { padding: 28px 0 16px; }
  .clock { letter-spacing: 3px; }
  .clock-date { font-size: 12px; letter-spacing: 2px; }
  .hero-search { margin-top: 24px; flex-direction: column; border-radius: 22px; padding: 10px; }
  .hero-search input { padding: 10px 12px; text-align: center; }
  .hero-search button { justify-content: center; padding: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(114px, 1fr)); gap: 14px 10px; }
  .mcard-name { font-size: 12px; }
  .mcard-meta { font-size: 10px; }
  .mcard-strip { padding: 18px 8px 7px; }
  .src-badge { font-size: 9px; padding: 0 5px; }
  .live-grid { grid-template-columns: 1fr; }
  .brief-card { flex-direction: column; text-align: center; padding: 22px 18px; gap: 14px; }
  .brief-name { justify-content: center; }
  .brief-text { -webkit-line-clamp: 4; }
  .footer { flex-direction: column; }
  .vh-txt h2 { font-size: 18px; }
  .p-top { padding: 8px 10px; }
  .p-title { font-size: 12.5px; }
  .p-controls { padding: 22px 10px calc(10px + env(safe-area-inset-bottom)); }
  .ctrl-row .time-txt { display: none; }
  .vol-wrap { display: none; }
  .send-bar { flex-wrap: wrap; margin-bottom: 8px; }
  .send-bar #dmInput { flex: 1 1 100%; order: -1; }
  .pg-tip { display: none; }
  .ctrl-row .icon-btn { width: 34px; height: 34px; }
  .ctrl-row svg { width: 18px; height: 18px; }
  .ppanel { top: 46px; }
}
@media (hover: none) {
  .progress .pg-dot { transform: translate(-50%, -50%) scale(1); }
}
