:root {
  --bg: #0e1116;
  --bg-soft: #141821;
  --panel: #181d26;
  --panel-2: #202734;
  --line: #2a323e;
  --text: #e9edf4;
  --muted: #8b95a5;
  --accent: #ff6a00;
  --accent-soft: rgba(255, 106, 0, .14);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(1200px 600px at 50% -200px, #1b2430 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 40px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px max(16px, calc((100vw - 1280px) / 2));
  background: rgba(14, 17, 22, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .5px;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 6px 0 14px;
  transition: border-color .2s;
}
.search:focus-within { border-color: var(--accent); }
.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font: inherit;
  padding: 9px 0;
}
.search input::placeholder { color: var(--muted); }
.search button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
}
.search button:hover { background: var(--accent); color: #fff; }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-right select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  max-width: 160px;
  outline: none;
}

.notice {
  max-width: 1280px;
  margin: 12px auto 0;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 0, .28);
  color: #ffb27a;
  font-size: 13px;
}

/* ---------------- 筛选面板（接口返回 filter 时启用） ---------------- */
.filter-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 18px 12px;
  margin-bottom: 20px;
}
.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.filter-row:last-child { border-bottom: none; }
.filter-name {
  flex: 0 0 52px;
  color: var(--muted);
  font-size: 14px;
  line-height: 26px;
  white-space: nowrap;
}
.filter-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.filter-row.clamped .filter-opts {
  max-height: 52px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}
.filter-more {
  flex: 0 0 auto;
  align-self: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.filter-more:hover { color: var(--accent); border-color: var(--accent); }
.filter-opt {
  padding: 3px 11px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  line-height: 20px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.filter-opt:hover { color: var(--accent); }
.filter-opt.on {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}
@media (max-width: 720px) {
  .filter-panel { padding: 2px 12px 8px; }
  .filter-name { flex-basis: 40px; font-size: 13px; }
  .filter-opt { padding: 3px 8px; font-size: 13px; }
}

/* ---------------- 人物宫格 ---------------- */
.actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 18px 12px;
}
.actor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
}
.actor-ava {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.actor-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.actor-card:hover .actor-ava { border-color: var(--accent); }
.actor-name {
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.actor-num { font-size: 12px; color: var(--muted); }

/* ---------------- 分类 ---------------- */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px max(16px, calc((100vw - 1280px) / 2)) 4px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: .18s;
  cursor: pointer;
}
.chip:hover { color: var(--text); border-color: #3a4453; }
.chip.active {
  color: #fff;
  background: linear-gradient(135deg, #ff7a18, #ff5400);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 106, 0, .3);
}

/* ---------------- 列表 ---------------- */

.view {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px max(16px, calc((100vw - 1280px) / 2)) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 0 16px;
}
.section-head h1 { font-size: 18px; margin: 0; font-weight: 700; }
.section-head .sub { color: var(--muted); font-size: 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 18px 14px;
}

.card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s;
}
.card:hover { transform: translateY(-4px); }

.poster {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
  aspect-ratio: 3 / 4;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.card:hover .poster img { transform: scale(1.06); }
.poster .badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .66);
  backdrop-filter: blur(4px);
  font-size: 11px;
  color: #fff;
}
.poster .play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .32);
  opacity: 0;
  transition: opacity .2s;
}
.card:hover .play-mask { opacity: 1; }
.play-mask svg { width: 42px; height: 42px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6)); }

.card-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-sub { margin-top: 2px; font-size: 11px; color: var(--muted); }

/* ---------------- 分页 ---------------- */

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 28px 0 10px;
  flex-wrap: wrap;
}
.pager a, .pager span {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.pager a:hover { color: var(--text); border-color: #3a4453; }
.pager .cur { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }
.pager .disabled { opacity: .35; pointer-events: none; }

/* ---------------- 详情 ---------------- */

.detail {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.detail .poster { aspect-ratio: 3 / 4; }
.detail h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.3; }
.detail .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail .meta span {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.detail .desc {
  color: #b7c0cf;
  font-size: 13px;
  line-height: 1.8;
  max-height: 8.4em;
  overflow: hidden;
  position: relative;
  margin-bottom: 18px;
  white-space: pre-wrap;
}
.detail .desc.open { max-height: none; }
.detail .btns { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  transition: .18s;
}
.btn:hover { border-color: #3a4453; }
.btn.disabled { opacity: .4; pointer-events: none; }
.btn.primary {
  background: linear-gradient(135deg, #ff7a18, #ff5400);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 106, 0, .28);
}
.btn.primary:hover { filter: brightness(1.08); }

.sources {
  display: flex;
  gap: 8px;
  margin: 24px 0 12px;
  flex-wrap: wrap;
}
.source-tab {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.source-tab.active { color: #fff; border-color: var(--accent); background: var(--accent-soft); }

.episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.ep {
  padding: 9px 8px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid transparent;
  color: #c3cbd8;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: .15s;
}
.ep:hover { border-color: #3a4453; color: #fff; }
.ep.active { background: var(--accent); color: #fff; border-color: transparent; font-weight: 600; }

/* ---------------- 播放页 ---------------- */

.play-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 14px;
  flex-wrap: wrap;
}
.play-head h1 { font-size: 17px; margin: 0; font-weight: 600; }
.play-head .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.play-head .back:hover { color: var(--text); }

.player {
  position: relative;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}

.play-tip {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 106, 0, .1);
  border: 1px solid rgba(255, 106, 0, .3);
  color: #ffb27a;
  font-size: 13px;
  line-height: 1.6;
}

/* ---------------- 弹幕 ---------------- */

.player .video-shield {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.danmaku-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  contain: layout paint;
}
.danmaku-layer .dm {
  position: absolute;
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .75);
  will-change: transform;
  pointer-events: none;
}
.danmaku-layer .dm-top,
.danmaku-layer .dm-bottom {
  left: 0;
  right: 0;
  text-align: center;
  white-space: nowrap;
}

.dm-menu label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: #c8cfda;
  white-space: nowrap;
}
.dm-menu input[type="range"] {
  width: 92px;
  accent-color: #ff6a00;
  cursor: pointer;
}
.pmenu.dm-menu {
  min-width: 236px;
  max-height: 72vh;
  overflow-y: auto;
}

/* 弹幕开关（置顶大按钮，状态一眼可见） */
.pmenu .dm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 2px 0 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  text-align: left;
}
.pmenu .dm-head:hover { background: rgba(255, 255, 255, .1); }
.pmenu .dm-head-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
}
.pmenu .dm-head-state {
  margin-left: auto;
  font-size: 12px;
  color: #ff8a3d;
  font-weight: 600;
}
.pmenu .dm-head.off .dm-head-state { color: #8a93a3; }
.pmenu .dm-switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #ff6a00;
  transition: background .15s;
}
.pmenu .dm-switch .dm-knob {
  position: absolute;
  top: 2px;
  left: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left .15s;
}
.pmenu .dm-head.off .dm-switch { background: rgba(255, 255, 255, .2); }
.pmenu .dm-head.off .dm-switch .dm-knob { left: 2px; }
.pmenu .dm-hint {
  padding: 0 12px 6px;
  font-size: 11px;
  line-height: 1.5;
  color: #8a93a3;
}
.dm-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #c8cfda;
}
.pmenu .dm-seg {
  display: flex;
  gap: 4px;
}
.pmenu .dm-seg button {
  flex: 1;
  display: block;
  width: auto;
  padding: 5px 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  background: transparent;
  color: #aab3c2;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
}
.pmenu .dm-seg button:hover { background: rgba(255, 255, 255, .08); }
.pmenu .dm-seg button.active {
  color: #fff;
  border-color: #ff6a00;
  background: rgba(255, 106, 0, .16);
}
.pmenu .dm-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 12px;
  color: #c8cfda;
}
.pmenu .dm-check input { accent-color: #ff6a00; }

/* ---------------- 播放器控件 ---------------- */

.player { cursor: default; }
.player.hide-cursor { cursor: none; }
.player video { cursor: pointer; }

.pctrl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 26px 14px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .72) 55%, rgba(0, 0, 0, .88) 100%);
  transition: opacity .25s;
}
.player.idle .pctrl { opacity: 0; pointer-events: none; }

.pbar {
  position: relative;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.pbar .track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .22);
  overflow: hidden;
  transition: height .12s;
}
.pbar:hover .track { height: 6px; }
.pbar .buf {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(255, 255, 255, .3);
}
.pbar .played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, #ff7a18, #ff5400);
}
.pbar .dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, .5);
  opacity: 0;
  transition: opacity .12s;
  pointer-events: none;
}
.pbar:hover .dot, .pbar.dragging .dot { opacity: 1; }

.prow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: #fff;
  font-size: 13px;
}
.prow .spacer { flex: 1; }
.pbtn {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.pbtn:hover { background: rgba(255, 255, 255, .14); }
.pbtn.disabled { opacity: .35; pointer-events: none; }
.pbtn svg { width: 20px; height: 20px; fill: currentColor; }
.ptime { color: rgba(255, 255, 255, .82); font-variant-numeric: tabular-nums; font-size: 12px; }
.pvol { width: 74px; accent-color: #ff6a00; cursor: pointer; }

.pmenu {
  position: absolute;
  right: 12px;
  bottom: 62px;
  z-index: 4;
  min-width: 108px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(20, 24, 31, .96);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  display: none;
}
.pmenu.open { display: block; }
.pmenu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dfe5ee;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.pmenu button:hover { background: rgba(255, 255, 255, .1); }
.pmenu button.active { color: #ff8a3d; font-weight: 600; }

.center-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.center-play:hover { transform: scale(1.06); }
.player.playing .center-play { opacity: 0; pointer-events: none; }
.center-play svg { width: 30px; height: 30px; fill: currentColor; margin-left: 3px; }

@media (max-width: 720px) {
  .pctrl { padding: 20px 8px 8px; }
  .prow { gap: 6px; }
  .pbtn { min-width: 30px; height: 30px; padding: 0 7px; font-size: 12px; }
  .ptime { display: none; }
  .pvol { display: none; }
  .center-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
}
.player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
.player .player-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  background: rgba(8, 10, 14, .78);
  backdrop-filter: blur(3px);
}
.player-overlay.hidden { display: none; }
.player-overlay .inner { max-width: 420px; }
.player-overlay p { margin: 8px 0 16px; color: #c3cbd8; font-size: 13px; }
.player-overlay .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, .2);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: spin .8s linear infinite;
  vertical-align: -5px;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: var(--muted);
}

.play-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 18px;
  flex-wrap: wrap;
}
.play-toolbar .info { color: var(--muted); font-size: 13px; }
.dm-status { color: #6f7a8a; font-size: 12px; }
.play-toolbar .ops { display: flex; gap: 8px; }

.ep-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* ---------------- 提示 ---------------- */

.empty-box {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.empty-box h2 { color: var(--text); font-size: 17px; margin: 0 0 8px; }
.empty-box .btn { margin-top: 18px; }

.footer {
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 18px 16px 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
  color: #66707f;
  font-size: 12px;
  text-align: center;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 720px) {
  .topbar { padding: 10px 12px; gap: 10px; }
  .logo { font-size: 17px; }
  .search input { padding: 7px 0; font-size: 13px; }
  .chips { padding: 12px 12px 2px; }
  .view { padding: 10px 12px 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; }
  .detail { grid-template-columns: 110px 1fr; gap: 14px; padding: 14px; }
  .detail h1 { font-size: 17px; }
  .detail .desc { display: none; }
  .detail .btns .btn { padding: 8px 14px; font-size: 13px; }
  .episodes { max-height: 260px; }
  .player { border-radius: 10px; }
  .ep-strip { padding: 10px; }
}

/* ================================================================== */
/* 强化播放器（PC / 移动端分离交互）                                    */
/* ================================================================== */

.player {
  touch-action: manipulation;
  isolation: isolate;
}
.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  z-index: 0;
  cursor: pointer;
}
.player .player-frame { z-index: 1; }
.danmaku-layer { z-index: 2; }

/* 手势层：接管所有点击 / 触摸，避免误触系统播放器 */
.gesture-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.player.is-mobile .gesture-layer { cursor: default; }

.player.is-iframe .gesture-layer,
.player.is-iframe .pctrl,
.player.is-iframe .player-top,
.player.is-iframe .center-play,
.player.is-iframe .p-buffer { display: none; }

.iframe-note { display: none; }
.player.is-iframe .iframe-note {
  display: block;
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .62);
  color: #dfe5ee;
  font-size: 11px;
}

/* 顶部标题 / 锁定 */
.player-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 26px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, 0) 100%);
  transition: opacity .25s;
  pointer-events: none;
}
.player.idle .player-top { opacity: 0; }
.player-top .pt-title {
  flex: 1;
  min-width: 0;
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
}
.picon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.picon:hover { background: rgba(0, 0, 0, .55); }
.picon svg { width: 19px; height: 19px; fill: currentColor; }
.player.is-pc #btnLock { display: none; }

/* 缓冲 */
.p-buffer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .14);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}
.p-buffer.show { opacity: 1; }
.p-buffer .spinner { margin: 0; width: 34px; height: 34px; border-width: 3px; }

/* 控件条 */
.pctrl {
  z-index: 6;
  padding: 30px 14px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .72) 55%, rgba(0, 0, 0, .9) 100%);
}
.prow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
}
.pbtn {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}
.pbtn:hover { background: rgba(255, 255, 255, .14); }
.pbtn.icon { padding: 0 7px; }
.pbtn svg { width: 21px; height: 21px; fill: currentColor; display: block; }
.pbtn.off { opacity: .45; }
.pbtn.disabled { opacity: .32; pointer-events: none; }
.ptime {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .84);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.pvol-wrap { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.pvol { width: 74px; accent-color: #ff6a00; cursor: pointer; }

/* 进度条 */
.pbar {
  height: 20px;
  z-index: 2;
}
.pbar .track { height: 4px; transition: height .12s; }
.pbar:hover .track,
.pbar.hover .track,
.pbar.dragging .track { height: 6px; }
.pbar .dot { opacity: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.pbar:hover .dot,
.pbar.hover .dot,
.pbar.dragging .dot { opacity: 1; }
.pbar .played { box-shadow: 0 0 8px rgba(255, 106, 0, .5); }
.ptip {
  position: absolute;
  bottom: 20px;
  left: 0;
  transform: translateX(-50%);
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(8, 10, 14, .86);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s;
}
.pbar:hover .ptip,
.pbar.hover .ptip,
.pbar.dragging .ptip { opacity: 1; }

/* 中央播放键 */
.center-play { z-index: 6; }
.player.is-mobile .center-play { width: 58px; height: 58px; margin: -29px 0 0 -29px; }

/* 弹出菜单 */
.pmenu { z-index: 7; bottom: 78px; }
.pmenu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 6;
  background: rgba(0, 0, 0, .28);
}
.player.menu-open .pmenu-backdrop { display: block; }
.player.is-pc .pmenu-backdrop { display: none !important; }
.speed-menu,
.ratio-menu {
  right: 12px;
  min-width: 0;
  padding: 8px;
}
.speed-menu {
  display: none;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 4px;
}
.speed-menu.open { display: grid; }
.speed-menu button {
  width: auto;
  padding: 7px 4px;
  text-align: center;
  border-radius: 6px;
  font-size: 12px;
}
.speed-menu button.active {
  color: #fff;
  background: rgba(255, 106, 0, .22);
  border: 1px solid rgba(255, 106, 0, .6);
}

/* 选集面板 */
.pmenu.ep-menu {
  display: none;
  flex-direction: column;
  left: auto;
  right: 12px;
  width: min(440px, calc(100vw - 32px));
  max-height: 62%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}
.pmenu.ep-menu.open { display: flex; }
.ep-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.ep-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aab3c2;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}
.ep-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ep-menu-src {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  scrollbar-width: none;
}
.ep-menu-src::-webkit-scrollbar { display: none; }
.ep-menu-src button {
  flex: 0 0 auto;
  display: inline-block;
  width: auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: transparent;
  color: #aab3c2;
  font-size: 12px;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
}
.ep-menu-src button.on {
  color: #fff;
  border-color: rgba(255, 106, 0, .75);
  background: rgba(255, 106, 0, .16);
}
.ep-menu-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 6px;
  padding: 10px;
  overflow-y: auto;
}
.ep-menu-list button {
  width: 100%;
  padding: 7px 4px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .05);
  color: #c8cfda;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.ep-menu-list button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.ep-menu-list button.on { background: #ff6a00; color: #fff; font-weight: 600; }

/* 手势提示 */
.g-flash {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36%;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .18s;
  pointer-events: none;
  background: rgba(255, 255, 255, .08);
}
.g-flash.left { left: 0; border-radius: 0 40% 40% 0; }
.g-flash.right { right: 0; border-radius: 40% 0 0 40%; }
.g-flash.on { opacity: 1; }
.g-flash span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .34);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.g-indicator {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  min-width: 118px;
  max-width: 84%;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(10, 12, 16, .8);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.g-indicator.show { opacity: 1; }

/* 提示 / 倍速角标 */
.p-toast {
  position: absolute;
  left: 50%;
  bottom: 94px;
  z-index: 10;
  transform: translate(-50%, 8px);
  max-width: 88%;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(10, 12, 16, .88);
  color: #fff;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.p-toast.show { opacity: 1; transform: translate(-50%, 0); }
.speed-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 8;
  padding: 5px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff7a18, #ff5400);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .15s, transform .15s;
  pointer-events: none;
}
.speed-badge.show { opacity: 1; transform: scale(1); }

/* 锁定 */
.player.locked .pctrl,
.player.locked .player-top,
.player.locked .center-play,
.player.locked .pmenu,
.player.locked .player-overlay,
.player.locked .p-buffer {
  opacity: 0 !important;
  pointer-events: none !important;
}
.player.locked .gesture-layer { pointer-events: none; }
.btn-unlock {
  position: absolute;
  right: 14px;
  top: 50%;
  z-index: 9;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-unlock svg { width: 20px; height: 20px; fill: currentColor; }
.player.locked .btn-unlock { display: grid; }

/* 错误 / 解析遮罩置顶 */
.player-overlay { z-index: 9; }

/* 全屏 */
.player:fullscreen,
.player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
}
.player.pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
}
body.player-fs-lock { overflow: hidden; }
.player.is-fullscreen .pctrl { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

/* 移动端布局 */
.player.is-mobile .pctrl {
  padding: 40px 8px calc(8px + env(safe-area-inset-bottom));
}
.player.is-mobile .prow { gap: 2px; }
.player.is-mobile .pbtn {
  min-width: 32px;
  height: 38px;
  padding: 0 4px;
  font-size: 12px;
}
.player.is-mobile .pbtn.icon { padding: 0 4px; }
.player.is-mobile .pbtn svg { width: 21px; height: 21px; }
.player.is-mobile .ptime { display: inline-block; font-size: 10.5px; }
.player.is-pc .ptime { display: inline-block; }
.player.is-mobile #btnRatio,
.player.is-mobile #btnPip,
.player.is-mobile .pvol { display: none; }
.player.is-mobile .pbar { height: 24px; }
.player.is-mobile .pbar .track { height: 5px; }
.player.is-mobile .pbar .dot {
  opacity: 1;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
}
.player.is-mobile .pmenu {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  width: auto;
  min-width: 0;
  max-height: 55vh;
  overflow-y: auto;
  border-radius: 14px;
}
.player.is-mobile .speed-menu {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.player.is-mobile .pmenu.ep-menu {
  max-height: 55vh;
  left: 8px;
  right: 8px;
  width: auto;
}
.player.is-mobile .player-top { padding: 8px 10px 22px; }
.player.is-mobile .player-top .pt-title { font-size: 12px; }
.player.is-mobile .g-indicator { top: 18%; }

/* 投屏按钮只在移动端显示 */
.player.is-pc #btnCast { display: none; }

@media (max-width: 400px) {
  .player.is-mobile .prow { gap: 0; }
  .player.is-mobile .pbtn {
    min-width: 28px;
    padding: 0 2px;
  }
  .player.is-mobile .pbtn svg { width: 19px; height: 19px; }
  .player.is-mobile .ptime { font-size: 9.5px; }
}

/* ================================================================== */
/* 固定首页：轮播 / 热榜分类 / 榜单                                     */
/* ================================================================== */

.home-loading { padding: 30px 0; }

.home-hero {
  position: relative;
  margin-bottom: 26px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  aspect-ratio: 16 / 6.4;
  min-height: 230px;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease, visibility .55s;
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-grad {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 10, 15, .92) 0%, rgba(7, 10, 15, .6) 42%, rgba(7, 10, 15, .06) 100%),
    linear-gradient(0deg, rgba(7, 10, 15, .58), rgba(7, 10, 15, 0) 46%);
}
.hero-body {
  position: absolute;
  left: clamp(18px, 4vw, 46px);
  bottom: clamp(18px, 4vw, 38px);
  max-width: min(580px, 66%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  color: #fff;
}
.hero-kicker {
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}
.hero-title {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
}
.hero-meta {
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
}
.hero-desc {
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-act {
  margin-top: 4px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
.hero-slide:hover .hero-act { filter: brightness(1.08); }

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .38);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s;
  backdrop-filter: blur(4px);
}
.home-hero:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: var(--accent); }
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }

.hero-dots {
  position: absolute;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 26px);
  z-index: 3;
  display: flex;
  gap: 6px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: width .2s, background .2s;
}
.hero-dot.active { width: 20px; border-radius: 4px; background: var(--accent); }

.home-sec { margin-bottom: 30px; }
.home-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.home-sec-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.home-sec-title h2 { margin: 0; font-size: 18px; font-weight: 700; }
.home-sec-title span { color: var(--muted); font-size: 12px; }

.home-card .poster { position: relative; }
.rank-no {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 7px;
  background: rgba(8, 10, 14, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(4px);
}
.rank-no.top { background: linear-gradient(135deg, #ffd166, #ff7a18); color: #3b2200; }
.score-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(8, 10, 14, .68);
  color: #ffd166;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.home-empty {
  grid-column: 1 / -1;
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.home-note {
  margin: 10px 0 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.home-err .btn { margin: 18px 6px 0; }
.home-miss .btn { margin: 18px 6px 0; }

@media (max-width: 720px) {
  .home-hero {
    aspect-ratio: 16 / 10;
    min-height: 190px;
    border-radius: 12px;
    margin-bottom: 18px;
  }
  .hero-body {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
    gap: 6px;
  }
  .hero-title { font-size: 19px; }
  .hero-meta { font-size: 11px; }
  .hero-desc { display: none; }
  .hero-kicker { font-size: 10px; padding: 1px 7px; }
  .hero-act { padding: 6px 14px; font-size: 12px; }
  .hero-dots { right: 12px; bottom: 12px; }
  .hero-arrow { display: none; }
  .home-sec { margin-bottom: 22px; }
  .home-sec-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .home-sec-title h2 { font-size: 16px; }
}



/* ---------------- App 内嵌播放模式 ---------------- */

body.embed-mode {
  background: #0e1116;
}

body.embed-mode .topbar,
body.embed-mode .chips,
body.embed-mode .footer,
body.embed-mode .notice,
body.embed-mode .site-announce {
  display: none !important;
}

body.embed-mode .view {
  max-width: none;
  margin: 0;
  padding: 0 0 24px;
}

body.embed-mode .play-head {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--app-top, 0px);
  z-index: 60;
  margin: 0;
  padding: 7px 10px 26px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
  color: #fff;
  flex-wrap: nowrap;
}

body.embed-mode .play-head .back {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0;
}

body.embed-mode .play-head .back::before {
  content: '‹';
  font-size: 26px;
  line-height: 1;
}

body.embed-mode .play-head h1 {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 竖屏用页面顶部悬浮栏，全屏用播放器自带顶栏 */
body.embed-mode:not(.player-fs-lock) .player-top {
  display: none;
}

body.embed-mode.player-fs-lock .play-head {
  display: none;
}

body.embed-mode .player {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

body.embed-mode .play-toolbar,
body.embed-mode .sources {
  margin-left: 12px;
  margin-right: 12px;
}

body.embed-mode .ep-strip {
  margin: 0 12px;
}

body.embed-mode #openOrigin {
  display: none !important;
}

/* ================================================================== */
/* 移动端（≤760px）：影视 App 化布局                                    */
/* 桌面端样式完全不受影响，全部规则都在媒体查询内                        */
/* ================================================================== */

.m-tabbar { display: none; }

@media (max-width: 760px) {
  body:not(.embed-mode) {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
    background: var(--bg);
  }

  /* ---------- 顶栏：搜索 + 头像 ---------- */
  .topbar {
    padding: 8px 12px;
    padding-top: calc(8px + env(safe-area-inset-top));
    gap: 8px;
  }
  .logo { font-size: 16px; letter-spacing: 0; }
  .search { height: 38px; padding: 0 4px 0 12px; }
  .search input { padding: 6px 0; font-size: 13px; }
  .search button { width: 32px; height: 32px; }
  .top-right { gap: 6px; }
  .top-right .user-name,
  .top-right .user-logout { display: none; }
  .user-chip { padding: 0; border: 0; background: transparent; gap: 0; }
  .user-chip.guest {
    padding: 6px 12px;
    border: 1px solid rgba(255, 106, 0, .28);
    background: var(--accent-soft);
    font-size: 12px;
  }
  .user-avatar { width: 32px; height: 32px; font-size: 13px; }
  .user-chip .vip-dot,
  .user-chip .free-dot { display: none; }

  /* ---------- 分类：吸顶横滑 ---------- */
  .chips {
    position: sticky;
    top: calc(52px + env(safe-area-inset-top));
    z-index: 25;
    padding: 8px 12px 6px;
    gap: 7px;
    background: rgba(14, 17, 22, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .chip { padding: 6px 13px; font-size: 12px; }

  /* ---------- 内容与卡片 ---------- */
  .view { padding: 10px 12px 0; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 9px; }
  .card-title { font-size: 12px; line-height: 1.35; }
  .card-sub { font-size: 10px; }
  .rank-no { top: 6px; left: 6px; min-width: 20px; height: 20px; font-size: 11px; border-radius: 6px; }
  .score-badge { top: 6px; right: 6px; font-size: 11px; padding: 1px 6px; }
  .section-head { margin: 2px 0 12px; }
  .section-head h1 { font-size: 16px; }

  /* ---------- 首页 ---------- */
  .home-hero {
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-radius: 14px;
    margin-bottom: 16px;
  }
  .hero-body { left: 14px; right: 14px; bottom: 14px; gap: 6px; }
  .hero-kicker { font-size: 10px; padding: 1px 7px; }
  .hero-title { font-size: 20px; }
  .hero-meta { font-size: 11px; }
  .hero-desc { display: none; }
  .hero-act { padding: 6px 14px; font-size: 12px; }
  .hero-arrow { display: none; }
  .hero-dots { right: 12px; bottom: 12px; }

  .home-sec { margin-bottom: 20px; }
  .home-sec-head { margin-bottom: 10px; }
  .home-sec-title { gap: 6px; }
  .home-sec-title h2 { font-size: 15px; }
  .home-sec-title span { font-size: 10px; }

  /* 热榜改为横向滑动，更像 App 推荐位 */
  #homeRankGrid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #homeRankGrid::-webkit-scrollbar { display: none; }
  #homeRankGrid .home-card {
    flex: 0 0 29%;
    max-width: 120px;
    scroll-snap-align: start;
  }
  .home-note { margin: 4px 0 16px; font-size: 10px; }

  /* ---------- 详情页 ---------- */
  .detail {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
  }
  .detail .poster {
    flex: 0 0 104px;
    width: 104px;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
  }
  .detail > div:not(.poster) {
    flex: 1 1 calc(100% - 116px);
    min-width: 0;
  }
  .detail h1 { font-size: 18px; margin-bottom: 8px; }
  .detail .meta { margin-bottom: 10px; gap: 6px; }
  .detail .meta span { font-size: 10px; padding: 1px 8px; }
  .detail .desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: none;
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 8px;
  }
  .detail .btns { gap: 8px; }
  .detail .btns .btn {
    justify-content: center;
    padding: 10px 8px;
    font-size: 13px;
  }
  .detail .btns .btn.primary { flex: 1 1 100%; }
  .detail .btns .btn:not(.primary) { flex: 1 1 0; }

  .sources {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 18px 0 10px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .sources::-webkit-scrollbar { display: none; }
  .source-tab { flex: 0 0 auto; font-size: 12px; padding: 6px 12px; }
  .episodes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    max-height: 250px;
    padding-right: 0;
  }
  .ep { padding: 8px 4px; font-size: 11px; }

  /* ---------- 播放页 ---------- */
  .play-head { margin: 2px 0 10px; gap: 8px; }
  .play-head h1 { font-size: 15px; }
  .play-head .back { width: 30px; height: 30px; }
  .player { border-radius: 10px; }
  .play-toolbar { gap: 6px; }
  .play-toolbar .btn { padding: 8px 10px; font-size: 12px; }

  /* ---------- 其他 ---------- */
  .pager { flex-wrap: nowrap; overflow-x: auto; }
  .notice { margin: 8px 12px 0; font-size: 12px; }
  .site-announce { margin: 8px 12px 0; }
  .footer { display: none; }

  /* ---------- 底部导航 ---------- */
  .m-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: calc(58px + env(safe-area-inset-bottom));
    padding: 4px 0 env(safe-area-inset-bottom);
    background: rgba(15, 19, 26, .97);
    border-top: 1px solid rgba(255, 255, 255, .07);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .m-tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #7f8a9a;
    font-size: 10px;
    line-height: 1;
    transition: color .15s;
  }
  .m-tabbar a svg { width: 23px; height: 23px; }
  .m-tabbar a.active { color: var(--accent); }

  body.player-fs-lock .m-tabbar { display: none; }

  /* 登录页 */
  .auth-wrap { margin-top: 3vh; padding: 0 12px; }
  .auth-card { width: 100%; padding: 18px; border-radius: 16px; }
  .auth-form input { height: 46px; }
  .auth-submit { height: 46px; }
}
