/* public/live.css — 独立直播页样式（自包含；优先复用 styles.css 的 :root 变量）
 * 约定：所有选择器以 .lv- 前缀命名，不与主站 SPA 冲突；深色 Netflix 质感。
 * 降级：@media (prefers-reduced-motion: reduce) 关闭动效；≤640px/390px 移动端两列网格。
 */

/* ---------------- 设计变量（沿袭 styles.css 的同名变量，带兜底值） ---------------- */
:root {
  color-scheme: dark;
  --lv-bg: var(--bg, #090909);
  --lv-bg-soft: var(--bg-soft, #141414);
  --lv-panel: var(--panel, #181818);
  --lv-panel-2: var(--panel-2, #242424);
  --lv-text: var(--text, #fff);
  --lv-muted: var(--muted, #b3b3b3);
  --lv-muted-2: var(--muted-2, #777);
  --lv-line: var(--line, rgba(255, 255, 255, .12));
  --lv-line-soft: rgba(255, 255, 255, .07);
  --lv-red: var(--red, #e50914);
  --lv-red-dark: var(--red-dark, #b20710);
  --lv-green: var(--green, #46d369);
  --lv-danger: var(--danger, #ff6b6b);
  --lv-warning: var(--warning, #f5c451);
  --lv-shadow: 0 18px 46px rgba(0, 0, 0, .62);
  --lv-radius: 10px;
  --lv-radius-sm: 6px;
  --lv-header-h: 64px;
  --lv-page-pad: clamp(16px, 4vw, 56px);
  --lv-ease: cubic-bezier(.2, .75, .2, 1);
}

* { box-sizing: border-box; }
html { background: var(--lv-bg); }
body.lv-body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 480px at 50% -8%, rgba(229, 9, 20, .16), transparent 62%),
    var(--lv-bg);
  color: var(--lv-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
body.lv-locked { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.lv-skip {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: var(--lv-radius-sm);
  background: #fff;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  transition: top .18s var(--lv-ease);
}
.lv-skip:focus { top: 10px; }

/* ---------------- 顶栏 ---------------- */
.lv-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--lv-header-h);
  background: linear-gradient(180deg, rgba(9, 9, 9, .96), rgba(9, 9, 9, .78) 72%, rgba(9, 9, 9, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lv-header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1560px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--lv-page-pad);
}
.lv-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex: none;
  color: var(--lv-red);
  text-decoration: none;
  letter-spacing: -.06em;
  line-height: 1;
  white-space: nowrap;
}
.lv-brand-word { font-size: 23px; font-weight: 950; }
.lv-brand-live {
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--lv-red);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}
.lv-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  max-width: 460px;
  min-width: 120px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--lv-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  transition: border-color .18s var(--lv-ease), background .18s var(--lv-ease);
}
.lv-search:focus-within { border-color: rgba(255, 255, 255, .42); background: rgba(255, 255, 255, .1); }
.lv-search-icon { width: 17px; height: 17px; flex: none; color: var(--lv-muted); }
.lv-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--lv-text);
  font-size: 14px;
  outline: 0;
}
.lv-search-input::placeholder { color: var(--lv-muted-2); }
.lv-search-input::-webkit-search-cancel-button { display: none; }
.lv-search-clear {
  flex: none;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: var(--lv-text);
  font-size: 15px;
  line-height: 1;
}
.lv-search-clear:hover { background: rgba(255, 255, 255, .26); }
.lv-header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lv-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #ddd;
  font-size: 20px;
  line-height: 1;
  transition: background .16s var(--lv-ease), transform .16s var(--lv-ease), color .16s var(--lv-ease);
}
.lv-icon-btn svg { width: 21px; height: 21px; }
.lv-icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.lv-icon-btn:active { transform: scale(.94); }
.lv-icon-btn.spinning svg { animation: lv-spin .9s linear infinite; }
.lv-admin-link {
  padding: 7px 12px;
  border: 1px solid var(--lv-line);
  border-radius: 999px;
  color: var(--lv-muted);
  font-size: 12.5px;
  text-decoration: none;
  transition: color .16s var(--lv-ease), border-color .16s var(--lv-ease);
}
.lv-admin-link:hover { color: #fff; border-color: var(--lv-line-strong, rgba(255, 255, 255, .28)); }

/* ---------------- 主区 ---------------- */
.lv-main {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 6px var(--lv-page-pad) 40px;
}
.lv-hero { padding: clamp(10px, 2.4vw, 26px) 0 clamp(12px, 2vw, 20px); }
.lv-eyebrow {
  margin: 0 0 8px;
  color: var(--lv-red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .3em;
}
.lv-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 950;
  letter-spacing: -.045em;
  line-height: 1;
}
.lv-hero-sub { margin: 0; color: var(--lv-muted); font-size: 13.5px; letter-spacing: .01em; }
.lv-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lv-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--lv-line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: var(--lv-muted);
  font-size: 12px;
}
.lv-stat b { color: #fff; font-size: 13px; font-weight: 800; }
.lv-stat.is-ok b { color: var(--lv-green); }
.lv-stat.is-fail b { color: var(--lv-danger); }

/* ---------------- 收藏 / 最近观看 横排 ---------------- */
.lv-row { margin-bottom: 22px; }
.lv-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.lv-row-head h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.lv-row-clear {
  border: 0;
  background: transparent;
  color: var(--lv-muted-2);
  font-size: 12px;
  padding: 4px 2px;
}
.lv-row-clear:hover { color: #fff; }
.lv-row-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .24) transparent;
}
.lv-row-scroll::-webkit-scrollbar { height: 6px; }
.lv-row-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 999px; }
.lv-mini-card {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  width: 190px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--lv-line-soft);
  border-radius: var(--lv-radius);
  background: var(--lv-panel);
  text-align: left;
  color: var(--lv-text);
  transition: border-color .16s var(--lv-ease), background .16s var(--lv-ease), transform .16s var(--lv-ease);
}
.lv-mini-card:hover { border-color: var(--lv-line-strong, rgba(255, 255, 255, .28)); background: var(--lv-panel-2); transform: translateY(-1px); }
.lv-mini-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: var(--lv-radius-sm);
  background: linear-gradient(145deg, #2a2a2a, #181818);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}
.lv-mini-logo img { width: 100%; height: 100%; object-fit: contain; }
.lv-mini-info { min-width: 0; }
.lv-mini-name {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lv-mini-group { display: block; margin-top: 2px; overflow: hidden; color: var(--lv-muted-2); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }

/* ---------------- 分组 chips ---------------- */
.lv-chips-wrap {
  position: sticky;
  top: var(--lv-header-h);
  z-index: 40;
  margin: 0 calc(var(--lv-page-pad) * -1) 16px;
  padding: 10px var(--lv-page-pad);
  background: linear-gradient(180deg, rgba(9, 9, 9, .96) 60%, rgba(9, 9, 9, .78));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lv-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}
.lv-chips::-webkit-scrollbar { display: none; }
.lv-chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--lv-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: #d6d6d6;
  font-size: 13px;
  white-space: nowrap;
  transition: background .16s var(--lv-ease), color .16s var(--lv-ease), border-color .16s var(--lv-ease);
}
.lv-chip:hover { border-color: rgba(255, 255, 255, .34); color: #fff; }
.lv-chip.active { border-color: #fff; background: #fff; color: #111; font-weight: 800; }
.lv-chip-count { margin-left: 6px; color: var(--lv-muted-2); font-size: 11px; font-weight: 700; }
.lv-chip.active .lv-chip-count { color: #666; }

/* ---------------- 频道卡片网格 ---------------- */
.lv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 14px;
}
.lv-card-wrap { position: relative; min-width: 0; }
.lv-card {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--lv-line-soft);
  border-radius: var(--lv-radius);
  background: linear-gradient(180deg, #1c1c1c 0%, #121212 100%);
  color: var(--lv-text);
  text-align: left;
  transition: transform .18s var(--lv-ease), border-color .18s var(--lv-ease), box-shadow .18s var(--lv-ease);
}
.lv-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .3); box-shadow: var(--lv-shadow); }
.lv-card:active { transform: scale(.985); }
.lv-card-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 30% 10%, rgba(255, 255, 255, .1), transparent 58%),
    linear-gradient(145deg, #242424, #141414);
}
.lv-logo-holder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.lv-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.lv-logo-fallback {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}
.lv-card-body { padding: 9px 11px 11px; }
.lv-card-name {
  display: block;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lv-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-width: 0; }
.lv-card-group {
  overflow: hidden;
  color: var(--lv-muted-2);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lv-card-program { display: block; margin-top: 4px; overflow: hidden; color: var(--lv-muted); font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.lv-status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lv-muted-2);
}
.lv-status-dot.ok { background: var(--lv-green); box-shadow: 0 0 0 3px rgba(70, 211, 105, .16); }
.lv-status-dot.fail { background: var(--lv-danger); box-shadow: 0 0 0 3px rgba(255, 107, 107, .14); }
.lv-card.is-fail .lv-card-logo { filter: grayscale(.6) brightness(.72); }
.lv-fav-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(0, 0, 0, .58);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity .16s var(--lv-ease), background .16s var(--lv-ease), transform .16s var(--lv-ease);
}
.lv-card-wrap:hover .lv-fav-btn, .lv-fav-btn:focus-visible, .lv-fav-btn.is-active { opacity: 1; }
.lv-fav-btn:hover { background: rgba(0, 0, 0, .82); transform: scale(1.06); }
.lv-fav-btn.is-active { color: var(--lv-warning); }
.lv-live-tag {
  position: absolute;
  left: 7px;
  top: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .08em;
}
.lv-live-tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--lv-red); }

/* ---------------- 骨架屏 ---------------- */
.lv-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 14px;
}
.lv-skeleton {
  height: 148px;
  border: 1px solid var(--lv-line-soft);
  border-radius: var(--lv-radius);
  background: linear-gradient(100deg, #141414 18%, #232323 40%, #141414 62%);
  background-size: 220% 100%;
  animation: lv-shimmer 1.2s linear infinite;
}

/* ---------------- 空态 / 错误态 ---------------- */
.lv-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(36px, 8vw, 84px) 18px;
  border: 1px dashed var(--lv-line);
  border-radius: var(--lv-radius);
  background: rgba(255, 255, 255, .025);
  text-align: center;
}
.lv-state-icon { font-size: 34px; line-height: 1; opacity: .9; }
.lv-state h2 { margin: 0; font-size: 19px; font-weight: 800; }
.lv-state p { max-width: 460px; margin: 0; color: var(--lv-muted); font-size: 13.5px; line-height: 1.65; }
.lv-primary-btn, .lv-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: var(--lv-radius-sm);
  border: 1px solid var(--lv-line);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .16s var(--lv-ease), border-color .16s var(--lv-ease), transform .16s var(--lv-ease);
}
.lv-primary-btn { border-color: var(--lv-red); background: var(--lv-red); }
.lv-primary-btn:hover { background: var(--lv-red-dark); border-color: var(--lv-red-dark); }
.lv-secondary-btn:hover { background: rgba(255, 255, 255, .16); border-color: var(--lv-line-strong, rgba(255, 255, 255, .28)); }
.lv-primary-btn:active, .lv-secondary-btn:active { transform: scale(.98); }

/* ---------------- 页脚 ---------------- */
.lv-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 20px var(--lv-page-pad) calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--lv-line-soft);
  color: var(--lv-muted-2);
  font-size: 12px;
  line-height: 1.7;
}
.lv-footer a { color: var(--lv-muted); text-decoration: none; }
.lv-footer a:hover { color: #fff; }

/* ---------------- 全屏播放器 ---------------- */
.lv-player {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #000;
  overflow: hidden;
  animation: lv-fade-in .18s var(--lv-ease);
}
.lv-player-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .88), transparent);
  z-index: 5;
}
.lv-player-top .lv-icon-btn { font-size: 22px; }
.lv-player-title { display: grid; gap: 1px; min-width: 0; }
.lv-player-title strong {
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lv-player-title span { overflow: hidden; color: var(--lv-muted-2); font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.lv-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  margin-left: 4px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--lv-red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .1em;
}
.lv-live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: lv-pulse 1.6s ease-in-out infinite;
}
.lv-player-top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lv-ghost-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #eaeaea;
  font-size: 12.5px;
  transition: background .16s var(--lv-ease), border-color .16s var(--lv-ease);
}
.lv-ghost-btn:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .34); }
.lv-ghost-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .2); }

.lv-player-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  background: #000;
}
.lv-player-stage video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
}
.lv-player-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: radial-gradient(60% 60% at 50% 45%, rgba(35, 35, 35, .55), #000 78%);
  color: var(--lv-muted);
  font-size: 13px;
  text-align: center;
}
.lv-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, .16);
  border-top-color: var(--lv-red);
  border-radius: 50%;
  animation: lv-spin .9s linear infinite;
}
.lv-player-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 24px;
  background: rgba(0, 0, 0, .82);
  text-align: center;
}
.lv-player-error p { max-width: 520px; margin: 0; color: #f0c9c9; font-size: 14px; line-height: 1.7; }
.lv-reconnect {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .78);
  border: 1px solid rgba(245, 196, 81, .42);
  color: #f4dca4;
  font-size: 12.5px;
  white-space: nowrap;
}
.lv-player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px clamp(12px, 2.4vw, 24px) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .6) 62%, transparent);
  z-index: 5;
  transition: opacity .22s var(--lv-ease), transform .22s var(--lv-ease);
}
.lv-player.controls-idle .lv-player-controls { opacity: 0; transform: translateY(14px); pointer-events: none; }
.lv-quality { display: inline-flex; align-items: center; gap: 7px; color: var(--lv-muted); font-size: 12px; }
.lv-quality select {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--lv-line);
  border-radius: var(--lv-radius-sm);
  background: #1a1a1a;
  color: #fff;
  font-size: 12.5px;
  cursor: pointer;
}
.lv-player-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(229, 9, 20, .16);
  color: #ff8f94;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}
.lv-player-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.lv-player-status.is-buffering { background: rgba(245, 196, 81, .16); color: #f4dca4; }
.lv-spacer { flex: 1 1 auto; }

/* 诊断面板 */
.lv-diag {
  position: absolute;
  right: clamp(10px, 2.4vw, 26px);
  bottom: 78px;
  z-index: 8;
  width: min(360px, calc(100vw - 24px));
  max-height: 52vh;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--lv-line);
  border-radius: var(--lv-radius);
  background: rgba(12, 12, 12, .94);
  box-shadow: var(--lv-shadow);
  font-size: 12px;
  line-height: 1.72;
}
.lv-diag h3 { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.lv-diag dl { display: grid; grid-template-columns: 92px 1fr; gap: 3px 10px; margin: 0; }
.lv-diag dt { color: var(--lv-muted-2); }
.lv-diag dd { margin: 0; word-break: break-all; color: #e6e6e6; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }
.lv-diag .lv-diag-note { margin-top: 8px; color: var(--lv-muted-2); font-size: 11px; }

/* Toast */
.lv-toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  z-index: 1200;
  max-width: min(92vw, 520px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  transform: translateX(-50%);
  animation: lv-toast-in .2s var(--lv-ease);
}
.lv-toast.error { background: var(--lv-danger); color: #fff; }
.lv-toast.success { background: var(--lv-green); color: #06230e; }

.lv-noscript { padding: 40px 16px; text-align: center; color: var(--lv-muted); }

/* ---------------- 动效 ---------------- */
@keyframes lv-spin { to { transform: rotate(360deg); } }
@keyframes lv-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes lv-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes lv-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lv-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .lv-grid, .lv-skeleton-grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
}
@media (max-width: 760px) {
  :root { --lv-header-h: 58px; }
  .lv-header-inner { gap: 10px; }
  .lv-brand-word { font-size: 20px; }
  .lv-brand-live { font-size: 9px; padding: 2px 5px; }
  .lv-search { height: 36px; }
  .lv-admin-link { display: none; }
  .lv-hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .lv-grid, .lv-skeleton-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .lv-card-body { padding: 8px 9px 10px; }
  .lv-card-name { font-size: 12.5px; }
  .lv-mini-card { width: 168px; }
  .lv-player-controls { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .lv-quality span { display: none; }
  .lv-ghost-btn { padding: 0 10px; }
  .lv-diag { right: 8px; bottom: 84px; max-height: 46vh; }
}
@media (max-width: 430px) {
  /* 390px 移动端：两列 + 紧凑顶栏 */
  .lv-main { padding-left: 14px; padding-right: 14px; }
  .lv-header-inner { gap: 8px; padding: 0 14px; }
  .lv-brand-word { font-size: 18px; }
  .lv-search { min-width: 0; }
  .lv-grid, .lv-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-stats { gap: 6px; }
  .lv-stat { padding: 5px 10px; font-size: 11px; }
  .lv-player-title strong { font-size: 14px; }
  .lv-player-top { gap: 8px; padding: 8px 10px; }
  .lv-player-controls { flex-wrap: wrap; row-gap: 6px; }
  .lv-player-status { order: -1; }
  .lv-spacer { display: none; }
  .lv-footer { padding-left: 14px; padding-right: 14px; }
}

/* ---------------- 降级：减少动效 ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .lv-skeleton { animation: none; background: #1b1b1b; }
  .lv-card:hover { transform: none; }
  .lv-mini-card:hover { transform: none; }
}
