/* ==========================================================================
   漫剧星球 · 前台样式
   ========================================================================== */

:root {
  /* 底色 */
  --bg: #06060a;
  --bg-2: #0b0b12;
  --surface: #12121b;
  --surface-2: #191925;
  --surface-3: #232331;

  /* 描边 */
  --line: rgba(255, 255, 255, 0.065);
  --line-2: rgba(255, 255, 255, 0.13);
  --line-3: rgba(255, 255, 255, 0.22);

  /* 文字 */
  --fg: #f3f3f8;
  --fg-2: #a4a4ba;
  --fg-3: #6d6d84;

  /* 品牌 */
  --violet: #7c5cff;
  --rose: #ff3d7f;
  --gold: #ffb020;
  --cyan: #2fd4ee;
  --grad: linear-gradient(115deg, #7c5cff 0%, #ff3d7f 100%);
  --grad-3: linear-gradient(115deg, #7c5cff 0%, #bd4cff 46%, #ff3d7f 100%);

  /* 圆角 & 阴影 */
  --r-xl: 24px;
  --r-lg: 18px;
  --r: 13px;
  --r-sm: 9px;
  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 26px 60px rgba(0, 0, 0, 0.6);
  --glow-v: 0 0 0 1px rgba(124, 92, 255, 0.45), 0 18px 44px rgba(124, 92, 255, 0.22);

  --header-h: 66px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 氛围光：两团柔焦色雾 + 细腻噪点，避免死黑 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 8% -6%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(760px 520px at 96% 4%, rgba(255, 61, 127, 0.11), transparent 58%),
    radial-gradient(700px 700px at 50% 108%, rgba(47, 212, 238, 0.055), transparent 62%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.042'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(124, 92, 255, 0.42); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #26263a; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #38384f; }

.container { width: min(1360px, 100% - 48px); margin: 0 auto; }

.num { font-variant-numeric: tabular-nums; }

/* ================================================================ 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  background: rgba(6, 6, 10, 0.66);
  backdrop-filter: saturate(170%) blur(20px);
  -webkit-backdrop-filter: saturate(170%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  width: min(1360px, 100% - 48px);
  margin: 0 auto;
}

.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--grad-3);
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.5);
}

.logo-text {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.3px;
  background: linear-gradient(100deg, #fff 15%, #c3b4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: 2px; flex-shrink: 0; }
.nav-links a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--fg-2);
  font-size: 14.5px;
  transition: 0.18s;
}
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.055); }
.nav-links a.active { color: #fff; background: rgba(124, 92, 255, 0.2); }

.search-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  width: 250px;
  transition: 0.22s;
}
.search-wrap:focus-within {
  border-color: rgba(124, 92, 255, 0.6);
  background: rgba(124, 92, 255, 0.08);
  width: 300px;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.09);
}
.search-wrap svg { flex-shrink: 0; opacity: 0.45; }
.search-wrap input {
  border: 0;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}
.search-wrap input::placeholder { color: var(--fg-3); }

.btn-admin {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  transition: 0.2s;
  white-space: nowrap;
}
.btn-admin:hover {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.42);
}
.btn-admin .nav-ico { display: none; }

/* ================================================================ Hero */

.hero {
  position: relative;
  margin-top: 26px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  min-height: 440px;
}

.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.75s ease; pointer-events: none; }
.hero-slide.active { position: relative; opacity: 1; pointer-events: auto; }

.hero-bg {
  position: absolute;
  inset: -16%;
  background-size: cover;
  background-position: center;
  filter: blur(56px) saturate(170%) brightness(0.55);
  transform: scale(1.05);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(96deg, rgba(6, 6, 10, 0.97) 6%, rgba(6, 6, 10, 0.86) 40%, rgba(6, 6, 10, 0.5) 70%, rgba(6, 6, 10, 0.34) 100%),
    linear-gradient(0deg, rgba(6, 6, 10, 0.92) 0%, transparent 55%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: center;
  padding: 54px 58px 62px;
}

.hero-copy { min-width: 0; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--grad);
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(255, 61, 127, 0.34);
}

.hero-title {
  font-size: 42px;
  line-height: 1.16;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.6px;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}

.hero-desc {
  color: #c4c4d6;
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 20px;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--fg-2);
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.hero-stats .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.hero-stats .hl { color: #bba8ff; font-weight: 600; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  white-space: nowrap;
}
.btn-lg.solid {
  background: #fff;
  color: #0d0d15;
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.2);
}
.btn-lg.solid:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(255, 255, 255, 0.28); }
.btn-lg.line {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(10px);
  font-weight: 600;
  font-size: 14.5px;
}
.btn-lg.line:hover { background: rgba(255, 255, 255, 0.13); border-color: var(--line-3); }

/* Hero 海报 */
.hero-art {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.15;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
  background: #101018;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
}

/* Hero 底部缩略条 */
.hero-thumbs {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 18px;
  z-index: 6;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.hero-thumbs::-webkit-scrollbar { display: none; }
.hero-thumb {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: rgba(12, 12, 20, 0.6);
  border: 1px solid transparent;
  backdrop-filter: blur(14px);
  transition: 0.2s;
  max-width: 210px;
}
.hero-thumb:hover { background: rgba(255, 255, 255, 0.09); }
.hero-thumb.active {
  border-color: rgba(124, 92, 255, 0.6);
  background: rgba(124, 92, 255, 0.17);
}
.hero-thumb i {
  width: 30px;
  height: 38px;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  background: #15151f;
  display: block;
}
.hero-thumb i img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb b {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================================ 区块 */

.section { margin-top: 52px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 23px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 21px;
  border-radius: 4px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(124, 92, 255, 0.7);
}
.section-sub { color: var(--fg-3); font-size: 13.5px; margin: 0; }
.section-more {
  margin-left: auto;
  font-size: 13.5px;
  color: var(--fg-2);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: 0.18s;
}
.section-more:hover { color: var(--fg); border-color: var(--line-3); background: rgba(255, 255, 255, 0.05); }

/* ================================================================ 榜单 */

.rank-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  /* 右侧渐隐，暗示还能横向滑动 */
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}
.rank-row > * { scroll-snap-align: start; }

.rank-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  transition: 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
  overflow: hidden;
  position: relative;
}
.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.42);
  background: linear-gradient(140deg, rgba(124, 92, 255, 0.13), rgba(255, 61, 127, 0.05));
  box-shadow: var(--shadow-1);
}

.rank-no {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  width: 34px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
  letter-spacing: -1px;
}
.rank-card:nth-child(1) .rank-no { color: #ffcf4d; text-shadow: 0 0 18px rgba(255, 176, 32, 0.55); }
.rank-card:nth-child(2) .rank-no { color: #d8d8e6; text-shadow: 0 0 18px rgba(216, 216, 230, 0.4); }
.rank-card:nth-child(3) .rank-no { color: #e0965c; text-shadow: 0 0 18px rgba(224, 150, 92, 0.45); }

.rank-art {
  width: 58px;
  height: 78px;
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
  background: #15151f;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.15);
}
.rank-art img { width: 100%; height: 100%; object-fit: cover; }

.rank-body { min-width: 0; flex: 1; }
.rank-name {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-meta { font-size: 12.5px; color: var(--fg-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rank-meta .hot { color: var(--rose); font-weight: 600; }

/* ================================================================ 筛选 */

.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  padding: 8px 17px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.032);
  color: var(--fg-2);
  font-size: 14px;
  transition: 0.18s;
  white-space: nowrap;
}
.chip:hover { color: var(--fg); border-color: var(--line-2); }
.chip.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.4);
}

.chip.divider { width: 1px; padding: 0; height: 22px; background: var(--line-2); border: 0; border-radius: 0; }

.scope-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); }
.scope-tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: 0;
  background: none;
  color: var(--fg-2);
  font-size: 13.5px;
  transition: 0.18s;
  white-space: nowrap;
}
.scope-tab.active { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(124, 92, 255, 0.38); }

.sort-select {
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  outline: none;
  transition: 0.18s;
  font-size: 13.5px;
  color: var(--fg-2);
}
.sort-select:hover { border-color: var(--line-2); }
.sort-select:focus { border-color: rgba(124, 92, 255, 0.6); }
.sort-select option { background: #1a1a26; color: var(--fg); }

/* ================================================================ 卡片 */

/* auto-fit：条目少于列数时自动撑满整行，不会留着半行空白 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 26px 20px;
}

.card { display: block; position: relative; min-width: 0; }

.card-art {
  position: relative;
  aspect-ratio: 3 / 4.15;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(150deg, #1d1d2c, #101019);
  border: 1px solid var(--line);
  transition: 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.card:hover .card-art {
  transform: translateY(-7px);
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 26px 52px rgba(0, 0, 0, 0.66), 0 0 0 1px rgba(124, 92, 255, 0.3), 0 0 40px rgba(124, 92, 255, 0.16);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s cubic-bezier(0.2, 0.8, 0.3, 1); }
.card:hover .card-art img { transform: scale(1.06); }

.card-art .fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.13);
  letter-spacing: 3px;
  background: linear-gradient(150deg, #24243d, #101019);
}

.card-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 6, 10, 0.9) 0%, rgba(6, 6, 10, 0.35) 26%, transparent 48%);
  pointer-events: none;
}

.card-top { position: absolute; top: 9px; left: 9px; right: 9px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 3; }
.tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(8, 8, 14, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.5;
  white-space: nowrap;
}
.tag-grad { background: var(--grad); border-color: transparent; box-shadow: 0 4px 14px rgba(255, 61, 127, 0.4); }
.tag-gold { background: linear-gradient(115deg, #ffb020, #ff7a2f); border-color: transparent; color: #2a1600; }
.tag-draft { background: rgba(255, 176, 32, 0.92); border-color: transparent; color: #2a1600; }
.tag-new { background: linear-gradient(115deg, #2fd4ee, #3b82f6); border-color: transparent; }

.card-bottom {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 3;
}

.ep-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(8, 8, 14, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}
.ep-pill .live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38e8a0;
  box-shadow: 0 0 8px #38e8a0;
}
.dur-pill {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(8, 8, 14, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.card-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: 0.26s;
  background: linear-gradient(0deg, rgba(124, 92, 255, 0.3), rgba(255, 61, 127, 0.12));
  z-index: 2;
}
.card:hover .card-hover { opacity: 1; }

.play-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
  transform: scale(0.75);
  transition: 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.card:hover .play-orb { transform: scale(1); }
.play-orb svg { margin-left: 3px; }

.card-body { padding: 12px 3px 0; }

.card-name {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  transition: 0.18s;
}
.card:hover .card-name { color: #c0b0ff; }

.card-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-3);
  font-size: 12.5px;
  margin-top: 6px;
  min-width: 0;
}
.card-sub .cat { color: #a08cff; font-weight: 500; white-space: nowrap; }
.card-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; flex-shrink: 0; }
.card-sub .views { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================ 分页 */

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 48px 0 10px; flex-wrap: wrap; }
.pager button {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg-2);
  transition: 0.18s;
  font-size: 14px;
}
.pager button:hover:not(:disabled) { border-color: var(--line-3); color: var(--fg); background: var(--surface-2); }
.pager button.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; box-shadow: 0 8px 22px rgba(124, 92, 255, 0.36); }
.pager button:disabled { opacity: 0.3; cursor: not-allowed; }

/* ================================================================ 空 / 骨架 */

.empty { text-align: center; padding: 86px 20px; color: var(--fg-3); }
.empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.45; }
.empty h3 { color: var(--fg-2); font-weight: 600; margin: 0 0 8px; font-size: 17px; }
.empty p { margin: 0; font-size: 14px; }

.skeleton { border-radius: var(--r-lg); background: var(--surface); position: relative; overflow: hidden; }
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ================================================================ 页面通用头 */

.page-top { padding-top: 26px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--fg-3);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.breadcrumb a { transition: 0.16s; }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb .sep { opacity: 0.5; }

/* ================================================================ 播放页 */

.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; align-items: start; }

.player-shell {
  position: relative;
  background: #000;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: flex;
  justify-content: center;
  background-image: radial-gradient(circle at 50% 46%, #17172a, #000 72%);
}
.player-shell video { width: 100%; height: 100%; display: block; background: #000; }
.player-shell.ratio-landscape { aspect-ratio: 16 / 9; }
.player-shell.ratio-portrait { aspect-ratio: 9 / 16; max-height: 78vh; margin: 0 auto; width: auto; }
.player-shell.ratio-portrait video { height: 78vh; width: auto; max-width: 100%; }

.player-placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--fg-2);
  background: linear-gradient(140deg, #1b1b2c, #0a0a12);
  padding: 30px;
  gap: 10px;
  align-content: center;
  position: relative;
  overflow: hidden;
}
.player-placeholder .ph-bg {
  position: absolute;
  inset: -18%;
  background-size: cover;
  background-position: center;
  filter: blur(44px) brightness(0.4) saturate(155%);
}
.player-placeholder > * { position: relative; z-index: 2; }
.player-placeholder .big { font-size: 46px; }

.watch-title { font-size: 26px; font-weight: 800; margin: 22px 0 8px; line-height: 1.32; letter-spacing: -0.3px; }
.watch-sub { color: var(--fg-2); font-size: 14.5px; margin-bottom: 16px; }

.watch-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  color: var(--fg-3);
  font-size: 13.5px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.watch-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.tag-pill {
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--fg-2);
  transition: 0.18s;
}
.tag-pill:hover { border-color: rgba(124, 92, 255, 0.55); color: #c0b0ff; }

.btn-like {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s;
}
.btn-like:hover { border-color: rgba(255, 61, 127, 0.6); background: rgba(255, 61, 127, 0.12); }
.btn-like.liked { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(255, 61, 127, 0.4); }

.watch-desc {
  margin-top: 20px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  color: #c4c4d4;
  font-size: 14.5px;
  line-height: 1.9;
}
.watch-desc .desc-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a08cff;
  margin-bottom: 10px;
}
.watch-desc .desc-label::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 3px;
  background: var(--grad);
}
.watch-desc p { margin: 0; white-space: pre-line; }

/* 从播放页回合集 */
.from-collection {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.14), rgba(255, 61, 127, 0.06));
  border: 1px solid rgba(124, 92, 255, 0.28);
  transition: 0.2s;
}
.from-collection:hover { border-color: rgba(124, 92, 255, 0.55); background: linear-gradient(120deg, rgba(124, 92, 255, 0.2), rgba(255, 61, 127, 0.09)); }
.fc-art { width: 48px; height: 64px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: #15151f; }
.fc-art img { width: 100%; height: 100%; object-fit: cover; }
.fc-body { min-width: 0; flex: 1; }
.fc-label { font-size: 11.5px; color: #a08cff; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 3px; }
.fc-title { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-arrow { color: var(--fg-3); flex-shrink: 0; }

.episodes {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.episodes-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-weight: 700; font-size: 16px; }
.episodes-head .count { color: var(--fg-3); font-weight: 500; font-size: 13.5px; }
.episodes-head::before { content: ""; width: 3px; height: 15px; border-radius: 3px; background: var(--grad); }

.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 9px; }
.ep-btn {
  padding: 12px 6px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg-2);
  text-align: center;
  font-size: 14px;
  transition: 0.18s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.ep-btn:hover { border-color: rgba(124, 92, 255, 0.55); color: var(--fg); background: var(--surface-3); }
.ep-btn.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; box-shadow: 0 6px 18px rgba(124, 92, 255, 0.4); }

/* 「出自合集」卡片里的一行小字 */
.mini-meta { font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================ 合集详情页 */

.series-hero {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-top: 4px;
}
.series-hero-bg {
  position: absolute;
  inset: -16%;
  background-size: cover;
  background-position: center;
  filter: blur(58px) saturate(170%) brightness(0.5);
}
.series-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6, 6, 10, 0.96) 8%, rgba(6, 6, 10, 0.8) 48%, rgba(6, 6, 10, 0.42) 100%);
}
.series-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0 36px;
  padding: 40px 44px;
  align-items: center;
}
.series-cover {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 100%;
  aspect-ratio: 3 / 4.15;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.66);
  background: #101018;
}
.series-cover img { width: 100%; height: 100%; object-fit: cover; }

.series-head { grid-column: 2; grid-row: 1; align-self: end; }
.series-rest { grid-column: 2; grid-row: 2; align-self: start; }

.series-title { font-size: 34px; font-weight: 800; margin: 0 0 12px; line-height: 1.2; letter-spacing: -0.5px; }
.series-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.series-desc {
  color: #c2c2d4;
  font-size: 14.5px;
  line-height: 1.85;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.series-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.series-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 24px; }
.series-stat .k { font-size: 12px; color: var(--fg-3); margin-bottom: 3px; }
.series-stat .v { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
.series-stat .v small { font-size: 12.5px; font-weight: 500; color: var(--fg-2); margin-left: 3px; }
.series-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.ep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

.ep-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 13px 10px 10px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  /* grid 子项默认 min-width:auto，窄屏下会被内部 nowrap 文本顶宽导致横向溢出 */
  min-width: 0;
}
.ep-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.42);
  background: var(--surface-2);
  box-shadow: var(--shadow-1);
}
.ep-card-no {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(124, 92, 255, 0.14);
  color: #bba8ff;
  border: 1px solid rgba(124, 92, 255, 0.24);
}
.ep-card:hover .ep-card-no { background: var(--grad); color: #fff; border-color: transparent; }
.ep-card-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ep-card-name { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-card-sub { font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-card-dur {
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--fg-2);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

/* 选集工具条：分段（1-50 / 51-100 …）+ 输集数直达 */
.ep-toolbar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 16px; }
.ep-ranges { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-range {
  padding: 6px 14px; border-radius: 999px; font-family: inherit;
  font-size: 13px; font-weight: 650; color: var(--fg-2);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2);
  cursor: pointer; transition: 0.15s;
}
.ep-range:hover { color: var(--fg); border-color: var(--line-3); }
.ep-range.active { background: var(--grad); color: #fff; border-color: transparent; }
.ep-jump { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ep-jump input {
  width: 170px; padding: 8px 12px; border-radius: 10px; font-family: inherit;
  font-size: 13.5px; background: var(--surface-2); color: var(--fg);
  border: 1px solid var(--line-2); outline: none;
}
.ep-jump input:focus { border-color: rgba(124, 92, 255, 0.65); }
.ep-jump button {
  padding: 8px 15px; border-radius: 10px; border: none; cursor: pointer; font-family: inherit;
  background: var(--grad); color: #fff; font-size: 13.5px; font-weight: 700;
}
.ep-jump button:active { opacity: 0.85; }
@media (max-width: 560px) {
  .ep-jump { margin-left: 0; width: 100%; }
  .ep-jump input { flex: 1; width: auto; }
}

/* ================================================================ 页脚 */

.footer { margin-top: 76px; border-top: 1px solid var(--line); padding: 32px 0 calc(46px + var(--safe-bottom)); color: var(--fg-3); font-size: 13.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer a:hover { color: var(--fg); }

/* ================================================================ Toast */

#toast-box { position: fixed; right: 24px; bottom: calc(24px + var(--safe-bottom)); z-index: 999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  padding: 13px 21px;
  border-radius: 13px;
  background: rgba(22, 22, 34, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2);
  font-size: 14px;
  animation: toastIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.25);
  backdrop-filter: blur(14px);
  max-width: 340px;
}
.toast.ok { border-color: rgba(56, 232, 160, 0.5); }
.toast.err { border-color: rgba(255, 90, 120, 0.55); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } }

/* ================================================================ 入场动画 */

@media (prefers-reduced-motion: no-preference) {
  .fade-up { animation: fadeUp 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
}

/* ================================================================ 表单控件（前台） */

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--fg-2); margin-bottom: 7px; font-weight: 500; }
.field label .req { color: var(--rose); margin-left: 3px; }

.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  outline: none;
  font-size: 15px;
  transition: 0.18s;
  color: var(--fg);
}
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(124, 92, 255, 0.7);
  background: rgba(124, 92, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05);
  font-size: 14px; font-weight: 600; transition: 0.18s; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 9px; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(124, 92, 255, 0.34); }
.btn-danger { border-color: rgba(255, 90, 120, 0.42); color: #ff8ba3; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill-live { background: rgba(52, 211, 153, 0.16); color: #5eeab4; }
.pill-draft { background: rgba(255, 176, 32, 0.16); color: #ffce6b; }
.pill-cat { background: rgba(124, 92, 255, 0.16); color: #b9a6ff; }

/* ================================================================ 顶栏用户区 */

.user-area { position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 8px; }

.btn-auth {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; transition: 0.18s; white-space: nowrap;
}
.btn-auth.ghost { border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); }
.btn-auth.ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-auth.solid { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(124, 92, 255, 0.36); }
.btn-auth.solid:hover { filter: brightness(1.1); }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer; transition: 0.18s; font-size: 14px;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-3); }
.user-chip.is-member { border-color: rgba(255, 176, 32, 0.5); background: rgba(255, 176, 32, 0.1); }

.avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.user-chip.is-member .avatar-sm { background: linear-gradient(115deg, #ffb020, #ff7a2f); color: #2a1600; }
.user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.badge-member {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 6px;
  background: linear-gradient(115deg, #ffb020, #ff7a2f); color: #2a1600;
}
.uc-caret { opacity: 0.55; flex-shrink: 0; }

.user-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 120;
  width: 230px; padding: 6px;
  background: rgba(20, 20, 31, 0.97);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column; gap: 2px;
  animation: menuIn 0.16s ease;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }

.um-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.um-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.um-status { font-size: 12px; color: var(--fg-3); }
.um-status.on { color: #ffce6b; }

.um-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 9px;
  font-size: 13.5px; color: var(--fg-2);
  background: none; border: 0; cursor: pointer; transition: 0.16s;
}
.um-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--fg); }
.um-cta {
  background: linear-gradient(115deg, rgba(255, 176, 32, 0.16), rgba(255, 122, 47, 0.1));
  color: #ffce6b; font-weight: 600;
}
.um-cta:hover { background: linear-gradient(115deg, rgba(255, 176, 32, 0.26), rgba(255, 122, 47, 0.18)); color: #ffe0a0; }
.um-danger { color: #ff8ba3; }
.um-danger:hover { background: rgba(255, 90, 120, 0.14); color: #ff8ba3; }

/* ================================================================ 登录页 */

.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 400px);
  gap: 40px;
  justify-content: center;
  align-items: center;
  padding: 54px 24px 40px;
  min-height: calc(100vh - var(--header-h) - 150px);
}

.auth-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 34px 30px;
  box-shadow: var(--shadow-2);
}
.auth-logo {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--grad-3); display: grid; place-items: center;
  font-size: 25px; margin-bottom: 16px;
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.45);
}
.auth-title { font-size: 23px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.4px; }
.auth-sub { color: var(--fg-2); font-size: 13.5px; margin: 0 0 22px; line-height: 1.7; }
.auth-sub b { color: #ffce6b; }

.auth-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 22px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line);
}
.auth-tab {
  flex: 1; padding: 9px 10px; border-radius: 999px; border: 0; background: none;
  color: var(--fg-2); font-size: 14px; transition: 0.18s;
}
.auth-tab.active { background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(124, 92, 255, 0.38); }

.btn-auth-submit {
  width: 100%; padding: 13px; margin-top: 6px;
  border-radius: var(--r); border: 0;
  background: var(--grad); color: #fff;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.36);
  transition: 0.2s;
}
.btn-auth-submit:hover:not(:disabled) { filter: brightness(1.1); }
.btn-auth-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-error {
  margin-top: 14px; padding: 11px 15px; border-radius: 11px;
  background: rgba(255, 90, 120, 0.12);
  border: 1px solid rgba(255, 90, 120, 0.4);
  color: #ff8ba3; font-size: 13.5px;
}
.auth-switch { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--fg-3); }
.auth-switch button {
  background: none; border: 0; color: #a08cff; font-size: 13.5px;
  font-weight: 600; cursor: pointer; padding: 0 3px;
}
.auth-switch button:hover { color: #c0b0ff; text-decoration: underline; }

.auth-side { padding: 6px; }
.auth-side h2 { font-size: 22px; font-weight: 800; margin: 0 0 20px; letter-spacing: -0.3px; }
.auth-benefits { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.auth-benefits li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--fg-2); line-height: 1.65; }
.auth-benefits li span { font-size: 19px; flex-shrink: 0; line-height: 1.3; }
.auth-benefits li b { color: var(--fg); display: block; margin-bottom: 2px; }
.auth-note { margin: 16px 0 0; font-size: 12.5px; color: var(--fg-3); line-height: 1.7; text-align: center; }

/* ================================================================ 会员中心 */

.member-guest {
  text-align: center;
  padding: 60px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, rgba(255, 176, 32, 0.1), rgba(255, 255, 255, 0.015));
}
.mg-art { font-size: 52px; margin-bottom: 14px; }
.member-guest h1 { font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.member-guest p { color: var(--fg-2); font-size: 14.5px; margin: 0 0 26px; line-height: 1.8; }
.member-guest b { color: #ffce6b; }

.member-status {
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
  padding: 26px 30px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: linear-gradient(120deg, rgba(255, 176, 32, 0.13), rgba(124, 92, 255, 0.09));
}
.ms-left { flex: 1; min-width: 240px; }
.ms-badge {
  display: inline-block; margin-bottom: 12px;
  padding: 4px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
}
.ms-badge.on { background: linear-gradient(115deg, #ffb020, #ff7a2f); color: #2a1600; }
.ms-badge.off { background: rgba(255, 255, 255, 0.1); color: var(--fg-2); }
.ms-title { font-size: 22px; font-weight: 800; margin: 0 0 7px; letter-spacing: -0.3px; }
.ms-sub { color: var(--fg-2); font-size: 13.5px; margin: 0; }
.ms-right { display: flex; gap: 30px; flex-wrap: wrap; }
.ms-stat .k { font-size: 12px; color: var(--fg-3); margin-bottom: 4px; }
.ms-stat .v { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan {
  position: relative;
  padding: 24px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  display: flex; flex-direction: column; gap: 8px;
  transition: 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.plan:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, 0.42); box-shadow: var(--shadow-1); }
.plan.featured { border-color: rgba(255, 176, 32, 0.45); background: linear-gradient(160deg, rgba(255, 176, 32, 0.12), rgba(255, 255, 255, 0.012)); }
.plan-badge {
  position: absolute; top: -10px; right: 18px;
  padding: 3px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800;
  background: linear-gradient(115deg, #ffb020, #ff7a2f); color: #2a1600;
  box-shadow: 0 6px 16px rgba(255, 122, 47, 0.4);
}
.plan-name { font-size: 16px; font-weight: 800; }
.plan-price { display: flex; align-items: baseline; gap: 3px; }
.plan-price .cur { font-size: 16px; font-weight: 700; color: var(--fg-2); }
.plan-price .num { font-size: 34px; font-weight: 900; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.plan-days { font-size: 13px; color: var(--fg-2); }
.plan-note { font-size: 12.5px; color: var(--fg-3); line-height: 1.6; min-height: 34px; }
.plan-perday { font-size: 12px; color: #b9a6ff; }
.plan .btn-lg { margin-top: 10px; }
.plan .btn-lg.solid { background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(124, 92, 255, 0.36); }
.plan.featured .btn-lg.solid { background: linear-gradient(115deg, #ffb020, #ff7a2f); color: #2a1600; box-shadow: 0 10px 26px rgba(255, 122, 47, 0.36); }

.pay-note {
  margin: 20px 0 0; padding: 12px 16px;
  border-radius: 12px; font-size: 12.5px; line-height: 1.7;
  background: rgba(255, 176, 32, 0.08);
  border: 1px solid rgba(255, 176, 32, 0.26);
  color: #ffce6b;
}

.orders { display: flex; flex-direction: column; gap: 10px; }
.order-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 15px 18px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.or-main { flex: 1; min-width: 200px; }
.or-plan { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.or-no { font-size: 12px; color: var(--fg-3); }
.or-amount { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ================================================================ 付费墙 */

.player-placeholder.paywall { gap: 12px; }
.pw-lock { font-size: 42px; line-height: 1; }
.pw-title { font-size: 19px; font-weight: 800; color: #f0eaff; }
.pw-desc { font-size: 13.5px; color: #c4c4d6; max-width: 400px; line-height: 1.85; }
.pw-actions { display: flex; gap: 11px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.free-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 11px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  background: rgba(56, 232, 160, 0.09);
  border: 1px solid rgba(56, 232, 160, 0.28);
  color: #8ceec4;
}
.free-hint a { color: #ffe0a0; font-weight: 600; white-space: nowrap; }
.free-hint a:hover { text-decoration: underline; }

.admin-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 11px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  background: rgba(160, 140, 255, 0.10);
  border: 1px solid rgba(160, 140, 255, 0.30);
  color: #c9bcff;
}
.admin-hint a { color: #ffe0a0; font-weight: 600; white-space: nowrap; }
.admin-hint a:hover { text-decoration: underline; }


/* 播放器水印（威慑录屏外传） */
.player-mark {
  position: absolute;
  right: 14px;
  bottom: 52px;
  z-index: 5;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.42);
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  font-variant-numeric: tabular-nums;
}
/* 禁止选中播放器区域，减少"拖出去保存"的操作路径 */
.player-shell video { user-select: none; -webkit-user-select: none; }

.tag-lock { background: linear-gradient(115deg, #ffb020, #ff7a2f); border-color: transparent; color: #2a1600; }

.ep-card.locked .ep-card-name { color: var(--fg-2); }
.ep-card.locked .ep-card-no { background: rgba(255, 176, 32, 0.14); color: #ffce6b; border-color: rgba(255, 176, 32, 0.3); }
.ep-card:hover.locked .ep-card-no { background: linear-gradient(115deg, #ffb020, #ff7a2f); color: #2a1600; }
.ep-card-lock {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: linear-gradient(115deg, #ffb020, #ff7a2f); color: #2a1600;
}
.ep-btn.locked { position: relative; color: var(--fg-3); border-style: dashed; }
.ep-btn.locked .ep-lock { font-size: 10px; margin-right: 3px; }

/* 支付弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 4, 8, 0.76);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 26px 18px; overflow-y: auto;
}
.modal {
  width: 100%; max-width: 460px;
  background: #14141e;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-2);
  margin: auto;
}
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.pay-modal h3 { margin: 8px 0 20px; font-size: 18px; font-weight: 800; }
.pay-demo-tag {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.5px;
  background: rgba(255, 176, 32, 0.16); color: #ffce6b;
  border: 1px solid rgba(255, 176, 32, 0.35);
}
.pay-rows { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 14px; }
.pay-row span { color: var(--fg-3); }
.pay-row b { font-weight: 650; text-align: right; }
.pay-amount { font-size: 20px; font-weight: 900; color: #ffce6b; font-variant-numeric: tabular-nums; }
.pay-demo-note {
  margin-top: 16px; padding: 12px 15px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.8;
  background: rgba(255, 176, 32, 0.08);
  border: 1px solid rgba(255, 176, 32, 0.24);
  color: #e0c68a;
}
.pay-demo-note b { color: #ffce6b; }

/* 真实支付：渠道选择 */
.pay-live-tag {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.5px;
  background: rgba(47, 212, 238, 0.12); color: #2fd4ee;
  border: 1px solid rgba(47, 212, 238, 0.32);
}
.pay-channels { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.pay-channel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--fg); font-size: 15px; font-weight: 650;
  font-family: inherit; cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s;
}
.pay-channel:hover { background: var(--surface-3); border-color: var(--line-3); }
.pay-channel:disabled { opacity: .55; cursor: default; }
.pc-arrow { color: var(--fg-3); font-size: 18px; line-height: 1; }
.pay-note { margin-top: 16px; font-size: 12.5px; line-height: 1.8; color: var(--fg-3); }

/* ================================================================ 我的（追剧 / 历史） */

.user-skeleton {
  display: inline-block;
  width: 112px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }

.btn-follow { gap: 6px; }
.btn-follow .fi { font-size: 13px; }
.btn-follow.active {
  border-color: rgba(255, 176, 32, 0.55);
  background: rgba(255, 176, 32, 0.13);
  color: #ffce6b;
}

/* 催更 */
.btn-urge { gap: 7px; }
.btn-urge .ui { font-size: 13px; }
.btn-urge .urge-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.btn-urge:not(.urged):not(:disabled):hover {
  border-color: rgba(255, 122, 47, 0.6);
  background: rgba(255, 122, 47, 0.13);
}
.btn-urge.urged {
  border-color: rgba(255, 176, 32, 0.42);
  background: rgba(255, 176, 32, 0.1);
  color: #ffce6b;
  cursor: default;
}
.btn-urge.urged .urge-count { background: rgba(255, 176, 32, 0.22); }
.btn-urge:disabled { opacity: 1; }   /* 冷却中也要看得清文字 */

/* ================================================================ 求片页 */

.request-hero {
  padding: 30px 32px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(124, 92, 255, 0.14), rgba(255, 61, 127, 0.06));
}
.request-hero h1 { font-size: 26px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.4px; }
.request-hero p { color: var(--fg-2); font-size: 14.5px; margin: 0 0 22px; line-height: 1.8; }

.request-form { display: grid; gap: 14px; }
.request-form .rf-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; }
.request-form .btn { min-height: 46px; }

.req-login-tip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: var(--r);
  font-size: 13.5px;
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.28);
  color: #c3b6ff;
}
.req-login-tip a { color: #fff; font-weight: 600; text-decoration: underline; }

.req-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.req-item {
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  transition: 0.18s;
}
.req-item:hover { border-color: rgba(124, 92, 255, 0.35); }
.req-item.done { opacity: 0.55; }
.req-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; flex-wrap: wrap; }
.req-title { font-size: 15px; font-weight: 700; }
.req-note { font-size: 13px; color: var(--fg-2); line-height: 1.7; margin: 0 0 9px; word-break: break-word; }
.req-meta { font-size: 12px; color: var(--fg-3); display: flex; gap: 9px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .request-hero { padding: 22px 18px; border-radius: var(--r-lg); }
  .request-hero h1 { font-size: 20px; }
  .request-form .rf-row { grid-template-columns: minmax(0, 1fr); }
  .req-list { grid-template-columns: minmax(0, 1fr); }
}

.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  transition: 0.18s;
}
.history-item:hover { border-color: rgba(124, 92, 255, 0.4); background: rgba(255, 255, 255, 0.045); }

.hi-art {
  position: relative;
  width: 66px;
  height: 88px;
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
  background: #101019;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.hi-art img { width: 100%; height: 100%; object-fit: cover; }
.hi-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.6);
}
.hi-progress i { display: block; height: 100%; background: var(--grad); }

.hi-body { flex: 1; min-width: 0; }
.hi-title {
  display: block;
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: 0.16s;
}
.hi-title:hover { color: #c0b0ff; }
.hi-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-3); }
.hi-meta a { color: #a08cff; }
.hi-meta a:hover { text-decoration: underline; }

.hi-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ================================================================ 播放结束卡片 */

.play-end {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 26px;
  border-radius: inherit;
  background: rgba(6, 6, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: peIn 0.28s ease;
}
@keyframes peIn { from { opacity: 0; } }

.play-end .pe-ico { font-size: 40px; line-height: 1; }
.play-end .pe-title { font-size: 20px; font-weight: 800; color: #f2f2f8; }
.play-end .pe-sub { font-size: 14px; color: #c4c4d6; line-height: 1.75; max-width: 380px; }
.play-end .pe-actions { display: flex; gap: 11px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ================================================================ 响应式 */

/* ---------- 平板 ---------- */
@media (max-width: 1120px) {
  .watch-grid { grid-template-columns: 1fr; }
  .player-shell.ratio-portrait { max-height: 64vh; }
  .player-shell.ratio-portrait video { height: 64vh; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 240px; gap: 34px; padding: 44px 40px 56px; }
  .hero-title { font-size: 34px; }
  .hero-thumbs { left: 40px; right: 40px; }
  .series-hero-inner { grid-template-columns: 186px minmax(0, 1fr); gap: 0 28px; padding: 32px 32px; }
  .series-title { font-size: 27px; }
}

/* ---------- 手机 ---------- */
@media (max-width: 860px) {
  :root { --header-h: 56px; }

  .container, .topbar-inner {
    width: calc(100% - 28px);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
  }

  /* 顶栏 */
  .topbar-inner { gap: 10px; }
  .nav-links { display: none; }
  .logo { gap: 0; }
  .logo-text { display: none; }
  .logo-mark { width: 34px; height: 34px; font-size: 17px; }
  .search-wrap { flex: 1; width: auto; max-width: none; padding: 8px 13px; }
  .search-wrap:focus-within { width: auto; }
  .search-wrap input { font-size: 16px; } /* 低于 16px 时 iOS 聚焦会放大整页 */
  .btn-admin { padding: 0; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
  .btn-admin .nav-ico { display: block; }
  .btn-admin span { display: none; }

  /* Hero */
  .hero { min-height: 0; margin-top: 16px; border-radius: var(--r-lg); }
  .hero-grid { grid-template-columns: 1fr; gap: 0; padding: 26px 22px 74px; }
  .hero-art { display: none; }
  .hero-title { font-size: 25px; }
  .hero-desc { font-size: 13.5px; -webkit-line-clamp: 3; margin-bottom: 16px; }
  .hero-stats { font-size: 12.5px; margin-bottom: 20px; gap: 8px; }
  .hero-cta { gap: 10px; }
  .btn-lg { padding: 12px 22px; font-size: 14.5px; }
  .btn-lg.line { padding: 11px 18px; font-size: 13.5px; }
  .hero-thumbs { left: 22px; right: 22px; bottom: 16px; }
  .hero-thumb { padding: 4px 12px 4px 4px; max-width: 168px; }
  .hero-thumb i { width: 26px; height: 33px; }
  .hero-thumb b { font-size: 12px; }

  /* 区块 */
  .section { margin-top: 34px; }
  .section-title { font-size: 19px; }
  .section-title::before { height: 18px; }
  .section-sub { font-size: 12.5px; }
  .section-more { padding: 5px 12px; font-size: 12.5px; }

  /* 榜单 */
  .rank-row {
    grid-auto-columns: minmax(258px, 84%);
    gap: 11px;
    padding-bottom: 8px;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .rank-card { padding: 10px; gap: 11px; border-radius: var(--r); }
  .rank-no { font-size: 24px; width: 26px; }
  .rank-art { width: 50px; height: 68px; border-radius: 9px; }
  .rank-name { font-size: 13.5px; }
  .rank-meta { font-size: 11.5px; gap: 6px; }

  /* 筛选 */
  .filters { gap: 10px; }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    margin: 0 -14px;
    padding: 2px 14px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { padding: 9px 16px; min-height: 38px; display: inline-flex; align-items: center; }
  .chip.divider { display: none; }
  .scope-tabs { width: 100%; }
  .scope-tab { flex: 1; text-align: center; padding: 9px 10px; min-height: 38px; }
  .sort-select { width: 100%; margin-left: 0; padding: 11px 16px; }

  /* 卡片 */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .card-name { font-size: 13.5px; min-height: 39px; }
  .card-body { padding-top: 10px; }
  .card-sub { font-size: 11.5px; gap: 6px; }
  .card-bottom { left: 8px; right: 8px; bottom: 8px; }
  .ep-pill { font-size: 11px; padding: 4px 9px; }
  .dur-pill { font-size: 10.5px; padding: 3px 8px; }
  .tag { font-size: 11px; padding: 3px 8px; }
  .card-art { border-radius: var(--r); }

  .pager button { min-width: 44px; height: 44px; }

  /* 顶栏用户区收窄 */
  .user-area { gap: 6px; }
  .user-name { display: none; }
  .badge-member { display: none; }
  .user-chip { padding: 4px; gap: 0; }
  .uc-caret { display: none; }
  .btn-auth { padding: 8px 13px; font-size: 13.5px; }
  .user-menu { width: 210px; }

  /* 登录页：移动端收起营销侧栏 */
  .auth-wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 16px 30px;
    gap: 24px;
    min-height: 0;
  }
  .auth-side { display: none; }
  .auth-card { padding: 26px 22px; border-radius: var(--r-lg); }
  .auth-title { font-size: 20px; }
  .auth-logo { width: 46px; height: 46px; font-size: 22px; border-radius: 14px; }

  /* 会员中心 */
  .member-guest { padding: 40px 20px; border-radius: var(--r-lg); }
  .member-guest h1 { font-size: 20px; }
  .member-status { flex-direction: column; align-items: flex-start; gap: 20px; padding: 20px; border-radius: var(--r-lg); }
  .ms-title { font-size: 18px; }
  .ms-right { width: 100%; gap: 0; justify-content: space-between; }
  .plans { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .plan { padding: 20px 18px; }
  .plan-price .num { font-size: 30px; }
  .order-row { padding: 13px 14px; gap: 10px; }
  .or-amount { font-size: 16px; }
  .or-main { min-width: 0; }

  .modal { padding: 22px 18px 18px; }
  .pay-modal h3 { font-size: 16px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; min-height: 46px; }

  .pw-title { font-size: 17px; }
  .pw-desc { font-size: 13px; }
  .pw-actions { width: 100%; flex-direction: column; }
  .pw-actions .btn-lg { width: 100%; }
  .free-hint, .admin-hint { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; }

  /* 播放结束卡片 */
  .play-end { padding: 20px 16px; gap: 8px; }
  .play-end .pe-ico { font-size: 32px; }
  .play-end .pe-title { font-size: 17px; }
  .play-end .pe-sub { font-size: 13px; }
  .play-end .pe-actions { width: 100%; flex-direction: column; gap: 9px; }
  .play-end .pe-actions .btn-lg { width: 100%; }

  /* 我的（追剧 / 历史） */
  .user-skeleton { width: 36px; height: 36px; border-radius: 12px; }
  #mine-tabs { width: 100%; margin-left: 0 !important; }
  .history-item { padding: 10px; gap: 12px; flex-wrap: wrap; }
  .hi-art { width: 56px; height: 74px; }
  .hi-title { font-size: 14px; margin-bottom: 5px; }
  .hi-meta { font-size: 11.5px; gap: 7px; }
  .hi-actions { width: 100%; }
  .hi-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 38px; }

  /* 播放页 */
  .page-top { padding-top: 14px; }
  .breadcrumb { font-size: 12.5px; margin-bottom: 12px; }
  .watch-grid { gap: 22px; }
  .player-shell {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-left: calc(-1 * var(--safe-left));
    margin-right: calc(-1 * var(--safe-right));
    width: calc(100% + var(--safe-left) + var(--safe-right));
  }
  .player-shell.ratio-portrait { max-height: 72vh; }
  .player-shell.ratio-portrait video { height: 72vh; }
  .player-placeholder { aspect-ratio: 1 / 1; padding: 24px 20px; }
  .player-placeholder .big { font-size: 38px; }

  .watch-title { font-size: 19px; margin-top: 18px; }
  .watch-meta { gap: 10px; font-size: 13px; padding-bottom: 15px; }
  .btn-like { margin-left: 0; width: 100%; justify-content: center; min-height: 46px; }
  .watch-desc { padding: 16px 18px; font-size: 14px; line-height: 1.8; }
  .from-collection { padding: 12px 14px; gap: 12px; }
  .fc-art { width: 42px; height: 56px; }
  .fc-title { font-size: 13.5px; }
  .episodes { padding: 16px 18px; }
  .ep-grid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
  .ep-btn { padding: 13px 4px; min-height: 46px; }
  .tag-pill { padding: 7px 13px; }

  /* 合集详情页：封面 + 标题并排，简介/数据/按钮通栏 */
  .series-hero-inner {
    grid-template-columns: 108px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 14px;
    padding: 20px 18px 22px;
    align-items: start;
  }
  .series-cover { grid-column: 1; grid-row: 1; }
  .series-head { grid-column: 2; grid-row: 1; align-self: start; }
  .series-rest { grid-column: 1 / -1; grid-row: 2; margin-top: 18px; }

  .series-title { font-size: 19px; margin-bottom: 10px; }
  .series-badges { margin-bottom: 0; }
  .series-desc { font-size: 13.5px; -webkit-line-clamp: 3; margin-bottom: 16px; }
  .series-stats { gap: 18px 20px; margin-bottom: 18px; }
  .series-stat .v { font-size: 16px; }
  .series-actions { gap: 9px; }
  .series-actions .btn-lg { flex: 1 1 auto; padding: 12px 18px; font-size: 14px; }
  .series-tags { margin-top: 16px; }
  .ep-list { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .ep-card { padding: 9px 12px 9px 9px; gap: 11px; }
  .ep-card-dur { font-size: 11.5px; padding: 3px 8px; }

  .footer { margin-top: 48px; padding: 24px 0 calc(34px + var(--safe-bottom)); }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12.5px; }

  #toast-box { right: 14px; left: 14px; bottom: calc(14px + var(--safe-bottom)); }
  .toast { max-width: none; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 400px) {
  .hero-title { font-size: 22px; }
  .series-hero-inner { grid-template-columns: 92px minmax(0, 1fr); gap: 0 12px; padding: 18px 16px 20px; }
  .series-title { font-size: 17px; }
  .grid { gap: 18px 10px; }
}

/* ---------- 横屏手机 ---------- */
@media (max-width: 900px) and (orientation: landscape) {
  .hero-grid { padding: 22px 22px 66px; }
  .player-shell.ratio-portrait { max-height: 88vh; }
  .player-shell.ratio-portrait video { height: 88vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- 播放倍速浮层 ---------------- */
.player-ctl { position: absolute; top: 10px; right: 10px; z-index: 6; display: flex; gap: 6px; }
.rate-ctl { position: relative; }
.fs-btn {
  width: 34px; height: 30px; padding: 0;
  display: grid; place-items: center;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 8, 14, 0.55); color: #eaeaf5; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.fs-btn:hover { border-color: rgba(255, 255, 255, 0.36); background: rgba(18, 18, 28, 0.72); }
.fs-btn:active { transform: scale(0.96); }
.fs-btn.on { border-color: rgba(124, 92, 255, 0.66); }
/* 全屏：整块播放器铺满屏幕（水印与倍速/全屏控件保持可见） */
#player-shell:fullscreen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; background-image: none; }
#player-shell:fullscreen video { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
#player-shell:-webkit-full-screen { width: 100vw; height: 100vh; max-height: none; border: 0; border-radius: 0; box-shadow: none; background-image: none; }
#player-shell:-webkit-full-screen video { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.rate-btn {
  min-width: 54px; height: 30px; padding: 0 11px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 8, 14, 0.55); color: #eaeaf5;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  cursor: pointer; letter-spacing: 0.2px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.rate-btn:hover { border-color: rgba(255, 255, 255, 0.36); background: rgba(18, 18, 28, 0.72); }
.rate-btn:active { transform: scale(0.96); }
.rate-btn[aria-expanded="true"] { border-color: rgba(124, 92, 255, 0.66); color: #fff; }
.rate-menu {
  position: absolute; top: 36px; right: 0; min-width: 138px;
  padding: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(12, 12, 19, 0.94); box-shadow: var(--shadow-1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overscroll-behavior: contain;
}
.rate-item {
  border: 0; background: transparent; color: var(--fg-2);
  font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 8px;
  text-align: center; cursor: pointer; font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.rate-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--fg); }
.rate-item.active { background: var(--grad); color: #fff; }

/* ---------------- 水印（动态移动 + 内嵌字幕水印）---------------- */
.player-mark { transition: top 0.8s ease, bottom 0.8s ease, left 0.8s ease, right 0.8s ease; will-change: top, left; }
#player::cue {
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font-size: 60%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
