:root {
  --bg-outer: #050506;
  --bg-page: #0d0d0f;
  --bg-card: #18181b;
  --bg-card-elevated: #1c1c1f;
  --bg-surface: #242428;
  --border-subtle: #2a2a2e;
  --border-hairline: #1f1f23;
  --gold: #f5b819;
  --gold-light: #f8c626;
  --gold-deep: #eaa90d;
  --gold-tint: #2a2110;
  --gold-stroke: #78581c;
  --text-primary: #f4f4f5;
  --text-secondary: #8e8e93;
  --text-muted: #636366;
  --danger: #ef4444;
  --rank-1: #f5b819;
  --rank-2: #cbd5e1;
  --rank-3: #e5a989;
  --rank-other: #27272a;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --tab-height: 64px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-outer);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, textarea {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

button { cursor: pointer; }
.hidden { display: none !important; }

.app-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg-page);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
  padding-bottom: calc(var(--tab-height) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

.main-view {
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 26px;
}

/* ======================== 按钮体系 ======================== */
.gold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-deep) 100%);
  color: #111111;
  font-size: 14px;
  font-weight: 700;
}

.gold-btn.full {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
}

.gold-btn.pill {
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 13px;
}

.dark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 13px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.dark-btn.full {
  width: 100%;
  padding: 13px 16px;
}

.dark-btn.pill {
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 13px;
}

.gold-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ======================== 顶部栏 & 分区标题 ======================== */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.circle-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.circle-icon-btn svg {
  width: 18px;
  height: 18px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.page-title {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 12px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.section-title.with-bar::before {
  content: "";
  width: 3.5px;
  height: 16px;
  border-radius: 2px;
  background: var(--gold);
  display: inline-block;
}

/* ======================== Flow 01: Hero 轮播横幅 ======================== */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 214px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #18181b;
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
  cursor: pointer;
}

.hero-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 13, 15, 0.08) 12%, rgba(13, 13, 15, 0.56) 58%, rgba(13, 13, 15, 0.96) 100%);
}

.hero-body {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.hero-info {
  min-width: 0;
  flex: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 5px;
}

.hero-kicker::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: var(--gold);
}

.hero-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-sub {
  font-size: 12px;
  color: rgba(244, 244, 245, 0.72);
}

.hero-outline-cta {
  padding: 7px 14px;
  border-radius: 9999px;
  border: 1px solid var(--gold);
  background: rgba(13, 13, 15, 0.65);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hero-dot {
  width: 6px;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.32);
  transition: all 0.2s ease;
}

.hero-dot.active {
  width: 18px;
  background: var(--gold);
}

/* ======================== 横向快捷图标行 ======================== */
.strip-micro {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0 0 8px 2px;
}

.icon-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.icon-strip::-webkit-scrollbar { display: none; }

.icon-tile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  width: 58px;
}

.icon-tile-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.icon-tile-box.amber {
  background: var(--gold-tint);
  border-color: var(--gold-stroke);
  color: var(--gold);
}

.icon-tile-box.teal {
  background: #10262a;
  border-color: #1f535c;
  color: #38bdf8;
}

.icon-tile-box.indigo {
  background: #181b33;
  border-color: #333a72;
  color: #818cf8;
}

.icon-tile-box.bronze {
  background: #2b1d12;
  border-color: #6b4322;
  color: #fb923c;
}

.icon-tile-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-tile-box svg {
  width: 24px;
  height: 24px;
}

.icon-tile-label {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ======================== 2 列海报网格（严格 minmax 防溢出） ======================== */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  width: 100%;
}

.poster-card {
  cursor: pointer;
  min-width: 0;
  width: 100%;
}

.poster-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  margin-bottom: 8px;
}

.poster-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.poster-sub {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ======================== Flow 02: 排行榜 ======================== */
.rank-vip-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2b2110 0%, #1a1714 68%, #18181b 100%);
  border: 1px solid var(--gold-stroke);
  margin-bottom: 14px;
  overflow: hidden;
}

.rank-vip-kicker {
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 4px;
}

.rank-vip-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
}

.rank-vip-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.rank-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: -4px 0 12px;
}

.rank-board-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.pill-tab {
  padding: 7px 14px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.pill-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111111;
  font-weight: 700;
}

.rank-badge-tr {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--gold);
  color: #111111;
  font-size: 10px;
  font-weight: 800;
}

.rank-num-bl {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  background: var(--rank-other);
  color: #ffffff;
}

.rank-num-bl.r1 { background: var(--rank-1); color: #111111; }
.rank-num-bl.r2 { background: var(--rank-2); color: #111111; }
.rank-num-bl.r3 { background: var(--rank-3); color: #111111; }

.ep-pill-br {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(13, 13, 15, 0.78);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.rank-synopsis {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.tag-row {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.amber-tag {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--gold-tint);
  border: 1px solid rgba(120, 88, 28, 0.5);
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* ======================== Flow 03 & 04: 全站搜索 ======================== */
.search-pill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 4px 5px 4px 14px;
  margin-bottom: 18px;
}

.search-pill-bar svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-pill-bar input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  padding: 7px 0;
}

.hot-search-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.hot-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  cursor: pointer;
}

.hs-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--rank-other);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.hs-badge.r1 { background: var(--rank-1); color: #111; }
.hs-badge.r2 { background: var(--rank-2); color: #111; }
.hs-badge.r3 { background: var(--rank-3); color: #111; }

.hs-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hs-count {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.divider {
  height: 1px;
  background: var(--border-hairline);
  margin: 16px 0;
}

.empty-box {
  padding: 56px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-stroke);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.empty-icon-box svg {
  width: 28px;
  height: 28px;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.empty-actions {
  display: flex;
  gap: 10px;
}

/* ======================== Flow 05: 沉浸式播放器 ======================== */
.player-shell {
  min-height: 100dvh;
  background: #08080a;
  display: flex;
  flex-direction: column;
}

.player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  gap: 10px;
}

.speed-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.player-stage-wrap {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #000000;
  min-height: 360px;
}

.player-stage-wrap video {
  width: 100%;
  max-height: 62dvh;
  background: #000;
  display: block;
}

.player-mid-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px;
}

.play-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(28, 28, 31, 0.9);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(28, 28, 31, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

.player-right-rail {
  position: absolute;
  right: 12px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 15;
}

.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #ffffff;
  font-size: 11px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.rail-btn .rail-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.rail-btn.active {
  color: var(--gold);
}

.rail-btn.active .rail-circle {
  border-color: var(--gold);
  background: rgba(245, 184, 25, 0.18);
}

.player-bottom-panel {
  padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: #0d0d0f;
}

.ep-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ep-tag-dark {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.player-synopsis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.player-synopsis-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scrubber-wrap {
  margin-bottom: 14px;
}

.scrubber-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.scrubber-input {
  width: 100%;
  height: 4px;
  accent-color: var(--gold);
  cursor: pointer;
}

.player-bottom-actions {
  display: flex;
  gap: 10px;
}

.btn-select-ep {
  flex: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(245, 184, 25, 0.08);
  border: 1px solid var(--gold-stroke);
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}

.btn-switch-drama {
  flex: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 10px;
  border-radius: 13px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

/* 6 列选集网格（Flow 05 展开面板） */
.ep-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 18px;
}

.ep-tile {
  position: relative;
  height: 44px;
  border-radius: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.ep-tile.active {
  background: var(--gold-tint);
  border-color: var(--gold);
  color: var(--gold);
}

.ep-tile-vip {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 8px;
  font-weight: 800;
  color: var(--gold);
}

/* 居中 VIP 解锁弹窗（Flow 05） */
.modal-layer.center {
  align-items: center;
  padding: 20px;
}

.vip-lock-dialog-wrap {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vip-lock-dialog {
  width: 100%;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 20px 22px;
  text-align: center;
}

.crown-emblem {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4d3914 0%, #241b0c 100%);
  border: 1px solid var(--gold-stroke);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.dialog-dismiss-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 18px;
  margin-top: 16px;
}

/* ======================== Flow 06: 会员中心 ======================== */
.vip-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.vip-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coin-pill-btn {
  padding: 7px 12px;
  border-radius: 9999px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-stroke);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.vip-pkg-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.vip-pkg-carousel::-webkit-scrollbar { display: none; }

.vip-pkg-card {
  position: relative;
  flex-shrink: 0;
  width: 158px;
  padding: 16px 14px;
  border-radius: var(--radius-md);
  background: #1a212e;
  border: 1.5px solid var(--border-subtle);
  cursor: pointer;
}

.vip-pkg-card.active {
  background: linear-gradient(155deg, #33250d 0%, #1c1812 100%);
  border-color: var(--gold);
}

.vip-pkg-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: #111111;
  font-size: 12px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
}

.vip-pkg-card.active .vip-pkg-check {
  display: flex;
}

.vip-pkg-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.vip-pkg-dur {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.vip-pkg-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.vip-pkg-origin {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-top: 5px;
}

.grouped-card {
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 16px;
}

.grouped-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border-hairline);
  text-align: left;
}

.grouped-row:last-child {
  border-bottom: none;
}

/* ======================== Flow 07 & 08: 个人中心与设置 ======================== */
.user-card {
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-stroke);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.p-quick-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  min-width: 0;
}

.p-quick-card.gold-border {
  border-color: var(--gold-stroke);
  background: linear-gradient(150deg, #2a2110 0%, #18181b 100%);
}

/* Toggle Switch (Flow 08) */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 9999px;
  background: #2f2f35;
  flex-shrink: 0;
  transition: background 0.2s;
}

.toggle-switch.on {
  background: var(--gold);
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s;
}

.toggle-switch.on::after {
  transform: translateX(20px);
}

.danger-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--danger);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ======================== Flow 08/09/10: 表单与错误态 ======================== */
.auth-page-body {
  padding: 26px 20px 40px;
}

.auth-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-stroke);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  padding: 4px 8px 4px 14px;
}

.input-box.error {
  border-color: var(--danger);
}

.input-box input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  font-size: 14px;
  color: #ffffff;
}

.input-box input::placeholder {
  color: var(--text-muted);
}

.code-btn {
  padding: 7px 12px;
  border-radius: 9px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-stroke);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.form-error-msg {
  font-size: 12px;
  color: var(--danger);
  margin: -4px 0 14px;
}

/* ======================== 底部 TabBar & Overlay & Modal ======================== */
.tab-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--tab-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(13, 13, 15, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-hairline);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  z-index: 40;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-secondary);
}

.tab-item.active {
  color: var(--gold);
}

.tab-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

.tab-label {
  font-size: 11px;
  font-weight: 600;
}

.overlay-layer {
  position: fixed;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-page);
  z-index: 60;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.overlay-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  background: rgba(13, 13, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-hairline);
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.overlay-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overlay-body {
  padding: 14px 16px 36px;
}

.modal-layer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet {
  width: 100%;
  max-width: 430px;
  max-height: 82dvh;
  overflow-y: auto;
  background: #161619;
  border-top: 1px solid var(--border-subtle);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px));
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.sheet-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 14px;
}

.sheet-tab-btn {
  padding: 8px 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
}

.sheet-tab-btn.active {
  color: #ffffff;
  border-bottom-color: var(--gold);
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

.chip {
  padding: 6px 13px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111111;
}

.coin-pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.coin-pack-card {
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  text-align: center;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 9999px;
  background: rgba(24, 24, 27, 0.96);
  border: 1px solid var(--gold-stroke);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  z-index: 120;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}

/* ======================== Node 102-985: 剧集详情页 & 吸底操作栏 ======================== */
.detail-hero {
  position: relative;
  padding: 14px 16px 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-hairline);
}

.detail-hero-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.32);
  transform: scale(1.1);
  z-index: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: env(safe-area-inset-top, 0px);
}

.detail-hero-row {
  display: flex;
  gap: 14px;
  margin-top: 14px;
}

.detail-poster {
  width: 108px;
  height: 144px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.detail-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px;
  line-height: 1.25;
}

.detail-sub {
  font-size: 12px;
  color: rgba(244, 244, 245, 0.78);
  margin-bottom: 10px;
}

.detail-ep-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.detail-ep-btn {
  position: relative;
  padding: 11px 4px;
  border-radius: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.detail-ep-btn.active {
  background: var(--gold-tint);
  border-color: var(--gold);
  color: var(--gold);
}

.detail-guess-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-sticky-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(13, 13, 15, 0.96);
  border-top: 1px solid var(--border-hairline);
  backdrop-filter: blur(12px);
}

.detail-sticky-fav {
  flex: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  border-radius: 13px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.detail-sticky-fav.active {
  border-color: var(--gold-stroke);
  color: var(--gold);
  background: var(--gold-tint);
}

.detail-sticky-play {
  flex: 7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-deep) 100%);
  color: #111111;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(245, 184, 25, 0.25);
}

/* 按钮禁用态（登录/密保空表单） */
.gold-btn:disabled {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

/* 观看记录进度条 & 收藏行卡片 */
.history-prog-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--bg-surface);
  overflow: hidden;
  margin: 6px 0;
}

.history-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gold);
}

.logged-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-stroke);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.vip-checks-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin: 12px 0 16px;
}

.vip-checks-row span {
  color: var(--gold);
  font-weight: 600;
}

/* ======================== 桌面端顶部导航 & 4 断点 Web 响应式 (768 / 1024 / 1440) ======================== */
.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 768px;
  }
  .tab-bar,
  .overlay-layer {
    max-width: 768px;
  }
  .poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 14px;
  }
  .hero-carousel {
    height: 280px;
  }
  .detail-ep-grid-4 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  body {
    background: var(--bg-page);
  }
  .app-shell {
    max-width: 100%;
    padding-bottom: 36px;
    box-shadow: none;
  }
  .desktop-nav {
    display: block;
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 13, 15, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-hairline);
  }
  .desktop-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 64px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .desk-links {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .desk-link {
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s;
  }
  .desk-link:hover {
    color: #ffffff;
    background: var(--bg-card);
  }
  .desk-link.active {
    color: #111111;
    background: var(--gold);
    font-weight: 700;
  }
  .desk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .home-header,
  .tab-bar {
    display: none !important;
  }
  .main-view {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 28px 48px;
  }
  .hero-carousel {
    height: 360px;
  }
  .poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 16px;
  }
  .overlay-layer {
    max-width: 100%;
  }
  .overlay-topbar,
  .overlay-body,
  .detail-hero-inner,
  .detail-sticky-bar,
  .auth-page-body {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
  }
  .player-shell {
    max-width: 960px;
    margin: 0 auto;
  }
  .sheet {
    max-width: 560px;
    border-radius: 20px;
    margin-bottom: 24px;
  }
  .modal-layer {
    align-items: center;
  }
}

@media (min-width: 1280px) {
  .poster-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px 18px;
  }
  .hero-carousel {
    height: 400px;
  }
}

/* ======================== 支付方式选择 & 收银台状态弹窗 ======================== */
.pay-method-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.pay-method-btn {
  padding: 10px 6px;
  border-radius: 11px;
  background: var(--bg-card-elevated);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.pay-method-btn.active {
  background: var(--gold-tint);
  border-color: var(--gold);
  color: var(--gold);
}

/* ======================== 继续观看横滑条 & 骨架屏 & PWA 防失联提示 ======================== */
.continue-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.continue-strip::-webkit-scrollbar { display: none; }
.continue-card {
  flex: 0 0 210px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.continue-card:hover { border-color: rgba(240, 179, 58, 0.45); transform: translateY(-1px); }
.continue-thumb {
  width: 44px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1b1b20;
}
.continue-meta { min-width: 0; flex: 1; }
.continue-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-ep {
  font-size: 11px;
  color: var(--gold);
  margin-top: 4px;
  font-weight: 600;
}
.continue-play-pill {
  font-size: 11px;
  color: #111;
  background: var(--gold);
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.pwa-banner {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240, 179, 58, 0.14), rgba(240, 179, 58, 0.04));
  border: 1px solid rgba(240, 179, 58, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pwa-banner-text { min-width: 0; }
.pwa-banner-title { font-size: 13px; font-weight: 700; color: #fff; }
.pwa-banner-sub { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.pwa-banner-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

@keyframes hjShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-card {
  border-radius: 12px;
  aspect-ratio: 3 / 4.2;
  background: linear-gradient(90deg, #17171c 25%, #23232b 50%, #17171c 75%);
  background-size: 200% 100%;
  animation: hjShimmer 1.35s infinite linear;
}

/* ======================== 广告位横幅卡片 ======================== */
.ad-banner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240, 179, 58, 0.13), rgba(23, 23, 28, 0.96));
  border: 1px solid rgba(240, 179, 58, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.ad-banner-card:hover { transform: translateY(-1px); border-color: var(--gold); }
.ad-banner-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1b1b22;
}
.ad-banner-body { min-width: 0; flex: 1; }
.ad-banner-head { display: flex; align-items: center; gap: 7px; }
.ad-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #14110b;
  background: var(--gold);
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.ad-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-banner-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-banner-arrow { font-size: 20px; color: var(--gold); font-weight: 700; flex-shrink: 0; }

/* ======================== 播放器加载圈 & 长按 2x 快进提示 ======================== */
.player-speed-toast {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 13, 15, 0.84);
  border: 1px solid rgba(240, 179, 58, 0.5);
  color: var(--gold);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  z-index: 15;
  pointer-events: none;
}
@keyframes hjSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.player-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--gold);
  transform: translate(-50%, -50%);
  animation: hjSpin 0.75s linear infinite;
  z-index: 14;
  pointer-events: none;
}
