/* ========================================
   动漫天堂 - ACG Pro
   完整样式表 v93
   所有区块按功能分组，每段都有注释
   ======================================== */

/* CSS Variables */
:root {
  --bg: #f6f8fa;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #fb7299;
  --primary-dark: #d94674;
  --line: #e7edf4;
  --radius: 16px;
  --radius-sm: 10px;
  /* Tab 底線與輪播之間留白（與頂欄呼吸感一致） */
  --hdr-banner-gap: 8px;
  /* 主內容與 Tab 列左右內距（與輪播對齊） */
  --page-pad-x: 12px;
  /* 主內容底部留白（原 80px，約減半以縮小「加载更多」與底欄間空隙） */
  --page-pad-bottom: 40px;
  /* 首页顶栏（搜索 + Tab）内容区高度，不含 safe-area；与 .topbar + .tabs-wrap 实际高度对齐 */
  --site-header-h: 106px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* 与 body 同色，快速滑动/橡皮筋时不易露出默认白底 */
  background-color: var(--bg);
  /* 减轻整页纵向橡皮筋露出系统白底（子页可与中间滚动区 contain 叠加） */
  overscroll-behavior-y: none;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 72px;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/*
 * 顶栏 + 底栏固定、仅中间主区滚动：避免整页 body 参与橡皮筋导致露白
 * 用于：首页、带底栏的子页（软件中心、我的等）
 */
body.acg-fixed-chrome {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.acg-fixed-chrome__shell {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: stretch;
  box-sizing: border-box;
}
.acg-fixed-chrome__scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: var(--bg);
  box-sizing: border-box;
}
/* 首页 main：占满壳层宽度后再 max-width 居中；底栏占位移入本区 */
body.acg-fixed-chrome main.page.acg-fixed-chrome__scroll {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-bottom: calc(var(--page-pad-bottom) + 72px + env(safe-area-inset-bottom, 0px));
}
main.acg-fixed-chrome__scroll:not(.page) {
  padding-bottom: calc(2rem + 72px + env(safe-area-inset-bottom, 0px));
}
.mine-main.acg-fixed-chrome__scroll {
  padding-bottom: calc(36px + 72px + env(safe-area-inset-bottom, 0px));
}
.mine-page .acg-fixed-chrome__shell > .mine-topbar {
  flex-shrink: 0;
}
/* 首页主区仅在 main 内滚动时，侧栏 sticky 相对 main 顶部，勿再叠加整页顶栏高度 */
body.acg-fixed-chrome .filter-sidebar {
  top: 10px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; height: auto; }
/* 首页轮播：覆盖全局 img 规则，否则 height:auto 会导致绝对定位封面高度为 0 */
.banner-item.banner-item--has-cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block;
}
button { font-family: inherit; cursor: pointer; border: none; outline: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: none; }
button::-moz-focus-inner { border: 0; }
.hidden { display: none !important; }

/* Startup Skeleton Loader */
.startup-skeleton {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #f6f8fa;
  padding: 10px 12px;
}
.startup-skeleton.hidden { display: none; }
.startup-skeleton .sk-top,
.startup-skeleton .sk-banner,
.startup-skeleton .sk-grid div {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
.startup-skeleton .sk-top {
  height: 54px;
  border-radius: 14px;
  margin-bottom: 10px;
}
.startup-skeleton .sk-banner {
  height: 160px;
  border-radius: 14px;
  margin-bottom: 12px;
}
.startup-skeleton .sk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.startup-skeleton .sk-grid div {
  aspect-ratio: 3/4;
  border-radius: 10px;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .startup-skeleton .sk-top,
  .startup-skeleton .sk-banner,
  .startup-skeleton .sk-grid div {
    animation: none;
    background-position: 0 0;
  }
  .load-more-spinner {
    animation: none;
  }
  .card,
  .banner-track,
  .melon-feat-card {
    transition: none;
  }
}

/* 子页顶栏（软件中心等）：与 .site-header 同一渐变、模糊与底边，固定置顶 */
.subpage-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.96), rgba(253, 242, 248, 0.9), rgba(250, 245, 255, 0.92));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8eaed;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.subpage-topbar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 42rem;
  margin: 0 auto;
  padding: 10px 14px;
  min-height: 52px;
  box-sizing: border-box;
}

/* 子页顶栏返回：内联 SVG（不依赖 Google Material 字体，避免国内/弱网显示成 arrow_back 文字） */
.subpage-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1px solid rgba(251, 114, 153, 0.35);
  background: rgba(255, 255, 255, 0.98);
  color: #fb7299;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.subpage-back-link svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.subpage-back-link:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(251, 114, 153, 0.55);
  opacity: 0.92;
}
.subpage-back-link:active {
  transform: scale(0.95);
}

/* 頂部整塊 fixed：搜索列 +「推荐/动漫…」Tab 同一視覺盒子，滾動時保持置頂（主區用 main.page 頂內邊距避讓） */
.site-header {
  --hdr-pad-x: 14px;
  --hdr-logo-w: 36px;
  --hdr-logo-gap: 12px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(to right, rgba(255,255,255,.96), rgba(253,242,248,.9), rgba(250,245,255,.92));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8eaed;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Header / Topbar：無獨立底邊，與下方 Tab 連成同一區塊 */
.topbar {
  display: flex;
  gap: var(--hdr-logo-gap);
  align-items: center;
  padding: 8px var(--hdr-pad-x) 4px;
}
.logo-btn {
  width: var(--hdr-logo-w);
  height: var(--hdr-logo-w);
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
/* 圓角條：左圖標 + 輸入 + 右側「搜索」文字，內文垂直居中 */
.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #fbcfe8;
  padding: 0 4px 0 12px;
  gap: 6px;
  background: #fff;
  box-sizing: border-box;
}
.search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(251, 114, 153, 0.1);
}
.search-ico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--primary);
  line-height: 0;
}
.search-field input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  padding: 0;
  margin: 0;
  /* 須 ≥16px，否則 iOS Safari 聚焦輸入時會自動放大整頁 */
  font-size: 16px;
  line-height: 36px;
  background: transparent;
  box-sizing: border-box;
  vertical-align: middle;
}
.search-field input::placeholder {
  color: #d1d5db;
  font-size: 16px;
  line-height: 36px;
}
.search-field input:focus {
  outline: none;
}

/* 搜索按钮：在圓角框內右側 */
.search-field .search-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  height: 28px;
  padding: 0 10px;
  margin: 0;
  color: #ec4899;
  background: rgba(251, 114, 153, 0.1);
  font-size: 12px;
  font-weight: 700;
  line-height: 28px;
  cursor: pointer;
  white-space: nowrap;
}
.search-field .search-btn:hover {
  color: var(--primary-dark);
  background: rgba(251, 114, 153, 0.16);
}

/* Tab 行：與主內容同寬置中；推荐靠左、吃瓜靠右（space-between） */
.tabs-wrap {
  background: transparent;
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--page-pad-x) var(--hdr-banner-gap);
  border: 0;
  box-sizing: border-box;
}
.tabs {
  display: flex;
  gap: 0;
  justify-content: space-between;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0 3px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex-shrink: 0; /* 寬度不擠扁，排不下時整條可橫向滑動 */
  border: none;
  background: transparent;
  color: #9ca3af;
  border-radius: 0;
  padding: 8px 11px 6px;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.2s ease;
  cursor: pointer;
}
/* 底線僅與文字等寬，貼近字底 */
.tabs .tab-text {
  position: relative;
  display: inline-block;
}
.tabs button.active .tab-text::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  border-radius: 999px;
  background: #ff7a00;
}
.tabs button.active {
  color: #ff7a00;
  font-weight: 600;
  background: transparent;
}
.tabs button:hover:not(.active) {
  color: #6b7280;
  background: transparent;
}

/* Main Content：頂部留白與 .tabs-wrap 底留白同值，輪播與「推荐」行上下平均 */
.page {
  padding: var(--hdr-banner-gap) var(--page-pad-x) var(--page-pad-bottom);
  margin: 0 auto;
  max-width: 860px;
}

/* 首页：顶栏 position:fixed 后，主区顶部让出「safe-area + 顶栏 + 与轮播间距」 */
main.page {
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--site-header-h) + var(--hdr-banner-gap));
  background: var(--bg);
  position: relative;
  z-index: 0;
}

/* Banner Carousel */
.banner {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #ffd5e3;
  background: #fff;
  aspect-ratio: 16 / 9;
}
.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}
.banner-item {
  min-width: 100%;
  height: 100%;
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
}
/* 轮播整卡可点进播放页（与首页 card-hit 共用跳转逻辑） */
button.banner-item.card-hit {
  border: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  background-color: transparent;
}
/* 轮播：底图渐变 + 上层 img（外链失败时隐藏 img，仍显示渐变） */
.banner-item.banner-item--has-cover {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.banner-item-fallback {
  z-index: 0;
  pointer-events: none;
}
.banner-item-img {
  z-index: 1;
  pointer-events: none;
}
button.banner-item.card-hit:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -4px;
}
button.banner-item.card-hit:active {
  filter: brightness(0.97);
}
.banner-item h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.banner-item p {
  margin: 0;
  font-size: 12px;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
}
.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  gap: 6px;
  justify-content: center;
}
.banner-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.banner-dots button.active {
  width: 16px;
  border-radius: 999px;
  background: #fff;
}

/* Panel Sections */
.panel {
  margin-bottom: 18px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.panel-header h2 { font-size: 16px; font-weight: 700; }
.link-muted {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.title-row h2 { margin: 0; font-size: 16px; font-weight: 700; }
.title-row span { font-size: 10px; color: #9ca3af; }
.tab-panel { display: none; contain: layout style paint; }
.tab-panel.active { display: block; content-visibility: auto; contain: layout style; }

/* 列表底部「加载更多」 */
.load-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 0 0;
  margin-top: 4px;
}
.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}
.load-more-btn:hover:not(:disabled) {
  color: #6b7280;
}
.load-more-btn:disabled {
  cursor: default;
  opacity: 0.75;
}
.load-more-ico {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
/* [hidden] 须显式隐藏：否则 .load-more-spinner 的 display 会盖过默认 hidden 表现，导致未点击也一直转圈 */
.load-more-spinner[hidden] {
  display: none !important;
  animation: none;
}
.load-more-spinner {
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
  border-top-color: #6b7280;
  border-radius: 50%;
  animation: load-more-spin 0.65s linear infinite;
}
.load-more-btn.is-loading .load-more-ico {
  display: none;
}
@keyframes load-more-spin {
  to { transform: rotate(360deg); }
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  contain: layout style;
}
.card-grid--photo {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  contain: layout style;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251, 114, 153, 0.12);
}
.card:has(.card-hit:active) {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.card-hit {
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.card-hit:focus { outline: none; }
.card-hit:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.card-hit::-moz-focus-inner { border: 0; }
.card-thumb-wrap {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  /* 与 .thumb 同色，避免加载/滚动时透出 .card 白底 */
  background-color: #e5e7eb;
}
.thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background-color: #e5e7eb;
  display: block;
}
.meta {
  padding: 8px;
}
.title {
  font-size: 11px;
  line-height: 1.3;
  margin: 0 0 4px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.title--s {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  -webkit-box-orient: unset;
}
.sub {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-views {
  color: #f97316;
  font-weight: 600;
}
.card-views-inner {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
}
.card-views-ico {
  flex-shrink: 0;
  color: currentColor;
  display: block;
}
.card-views-num {
  min-width: 0;
}

/* 写真卡片：封面多角标 + 底栏播放量/P 数；标题下为双话题 */
.card--photo .photo-thumb-wrap {
  position: relative;
}
.photo-badge-row {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: calc(100% - 12px);
}
.photo-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 8px;
  color: #fff;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border: none;
}
/* 写真 / 真人卡片角标：实色块，与参考稿紫 / 绿 / 红一致 */
.photo-badge--solo {
  background: #9333ea;
}
.photo-badge--new {
  background: #22c55e;
}
.photo-badge--hot {
  background: #ef4444;
}
.photo-badge--def {
  background: #64748b;
}
.photo-thumb-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 7px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}
.photo-bar-left,
.photo-bar-right {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}
.photo-bar-views {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}
.photo-bar-heart,
.photo-bar-icon {
  display: block;
  flex-shrink: 0;
}
.photo-bar-views-num {
  font-size: 9px;
  font-weight: 700;
}
.meta--photo {
  padding: 6px 10px 6px;
}
.title--photo {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 5px;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 仅一行标题（推荐/动漫等无话题行）时去掉标题块底边距，避免白底区域上下过松 */
.meta--photo > .title--photo:last-child {
  margin-bottom: 0;
}
.photo-topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 5px;
}
.photo-topic-tag {
  font-size: 8px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(251, 114, 153, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.35;
}

/* 吃瓜 Tab：无分类 chips；TOP 标题在卡片外，白卡片仅包榜单 */
.panel-melon {
  padding-top: 8px;
}

/* 吃瓜头条大卡（参考站：粉顶栏 + 左缩略图 + 中文案 + 右播放） */
.melon-featured {
  margin-bottom: 12px;
}
.melon-featured.hidden {
  display: none !important;
}
.melon-featured .melon-feat-card + .melon-feat-card {
  margin-top: 12px;
}
.melon-feat-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(252, 231, 243, 0.85);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.055);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.melon-feat-card:has(.melon-play-hit:active) {
  transform: scale(0.98);
}
/* TOP4～TOP15：有边框、阴影、圆角，白底，隐藏粉顶栏 */
.melon-featured .melon-feat-card:nth-child(n + 4) {
  border: 1px solid rgba(252, 231, 243, 0.85);
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.055);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.melon-featured .melon-feat-card:nth-child(n + 4) .melon-feat-head {
  display: none;
}
.melon-feat-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #fb7299, #f43f5e);
  letter-spacing: 0.03em;
}
.melon-feat-head-ico {
  font-size: 12px;
  line-height: 1;
}
.melon-feat-row {
  --melon-feat-thumb-w: 96px;
  --melon-feat-thumb-gap: 10px;
  display: flex;
  align-items: stretch;
  gap: var(--melon-feat-thumb-gap);
  padding: 10px 12px;
}
/* 缩略图高度与右侧文案区一致，底部自然对齐底栏文字行 */
.melon-feat-thumb {
  position: relative;
  flex: 0 0 var(--melon-feat-thumb-w);
  width: var(--melon-feat-thumb-w);
  align-self: stretch;
  border: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #e5e7eb;
}
.melon-feat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}
/* 貼封面左上角（與參考站一致） */
.melon-vip-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 0 0 6px 0;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.melon-feat-views {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 4px 6px;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}
.melon-feat-views-ico {
  flex-shrink: 0;
  display: block;
  width: 11px;
  height: 11px;
  color: #fff;
  opacity: 0.95;
}
.melon-feat-views-num {
  line-height: 1;
}
.melon-feat-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.melon-feat-main.melon-play-hit {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.melon-feat-main.melon-play-hit:focus-visible {
  outline: 2px solid rgba(251, 114, 153, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}
.melon-feat-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 4px;
  min-height: calc(1.35em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}
.melon-feat-desc {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
  margin: 0 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.melon-feat-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin-bottom: 5px;
  overflow: hidden;
  min-width: 0;
}
.melon-feat-tag {
  flex-shrink: 0;
  font-size: 10px;
  color: #e11d48;
  background: rgba(251, 114, 153, 0.08);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.melon-feat-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 11px;
  color: #9ca3af;
  overflow: hidden;
  min-width: 0;
}
.melon-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.2;
}
.melon-meta-likes::before {
  content: "♥";
  font-size: 12px;
  color: #fb7185;
}
.melon-meta-likes {
  color: #6b7280;
}
/* 多少人看：与赞、时间同一行（父级 flex-wrap: nowrap） */
.melon-meta-watch {
  color: #0d9488;
  font-weight: 600;
  gap: 4px;
}
.melon-meta-watch-ico {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  display: block;
  color: inherit;
  align-self: center;
}
/* 播放：渐变粉底 + 柔阴影 + 自定义播放图标（PNG） */
.melon-feat-play-btn {
  flex-shrink: 0;
  align-self: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(251, 114, 153, 0.2);
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
  color: #e11d48;
  background: linear-gradient(135deg, #fff5f7, #fff);
  box-shadow: 0 2px 8px rgba(251, 114, 153, 0.12);
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.melon-feat-play-btn:hover {
  border-color: #fbcfe8;
  box-shadow: 0 3px 12px rgba(251, 114, 153, 0.22);
  color: #be123c;
}
.melon-feat-play-btn:active {
  transform: scale(0.93);
}
.melon-feat-play-btn .melon-feat-play-ico {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
  pointer-events: none;
  flex-shrink: 0;
}

.melon-featured--below-card {
  margin-top: 16px;
}

/* 吃瓜：白卡片（仅榜单 + 展开区 + 底栏；标题行在卡片外） */
.melon-top-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(231, 237, 244, 0.8);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  margin-bottom: 2px;
}
.melon-top-card.hidden {
  display: none !important;
}
.melon-rank-section-head--outer.hidden {
  display: none !important;
}
.melon-rank-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #f1f5f9;
}
/* 双类名覆盖：外置标题无底边、在页面背景上 */
.melon-rank-section-head.melon-rank-section-head--outer {
  margin: 0 0 10px;
  padding: 4px 0 0;
  border-bottom: none;
  background: transparent;
}
.melon-rank-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}
.melon-rank-section-ico-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.melon-rank-section-more {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.melon-rank-section-more:hover {
  color: var(--primary);
}

.melon-top-rank {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 8px 12px 0;
}
.melon-top-rank.hidden {
  display: none !important;
}
.melon-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  border-top: 1px solid rgba(241, 245, 249, 0.8);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, transform 0.18s ease;
}
.melon-rank-row:first-child {
  border-top: none;
}
.melon-rank-row:hover {
  background: rgba(251, 114, 153, 0.04);
}
.melon-rank-row:active {
  transform: scale(0.98);
}
/* 名次：圓角方塊 + 漸變底 + 白字 + 同色柔影（吃瓜 TOP3） */
.melon-rank-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  display: grid;
  place-items: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}
/* 第 1 名：紅 → 橙紅 */
.melon-rank-num--1 {
  background: linear-gradient(145deg, #ff5c5c 0%, #f97316 55%, #ea580c 100%);
  box-shadow:
    0 4px 12px rgba(248, 113, 113, 0.42),
    0 2px 6px rgba(234, 88, 12, 0.28);
}
/* 第 2 名：橙 → 淺橙 */
.melon-rank-num--2 {
  background: linear-gradient(145deg, #fb923c 0%, #fdba74 50%, #fed7aa 100%);
  color: #fff;
  box-shadow:
    0 4px 12px rgba(251, 146, 60, 0.4),
    0 2px 6px rgba(249, 115, 22, 0.22);
}
/* 第 3 名：金黃 → 亮黃 */
.melon-rank-num--3 {
  background: linear-gradient(145deg, #eab308 0%, #facc15 45%, #fde047 100%);
  color: #fff;
  box-shadow:
    0 4px 12px rgba(234, 179, 8, 0.38),
    0 2px 6px rgba(202, 138, 4, 0.22);
}
.melon-rank-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
}
.melon-rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.melon-rank-main {
  flex: 1;
  min-width: 0;
}
/* 标题 + 爆/热 + 🔥 同一行；标题超长单行省略（对齐参考站） */
.melon-rank-line {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.melon-rank-title-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.melon-rank-bdg {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}
/* 爆：高饱和红渐变 + 同色柔影 */
.melon-rank-bdg--bao {
  background: linear-gradient(145deg, #ff6b6b 0%, #ef4444 40%, #dc2626 85%, #b91c1c 100%);
  box-shadow:
    0 2px 8px rgba(239, 68, 68, 0.38),
    0 1px 3px rgba(185, 28, 28, 0.28);
}
/* 热：金橙渐变（避免过浅区）+ 同色柔影，白字可读 */
.melon-rank-bdg--re {
  background: linear-gradient(145deg, #fbbf24 0%, #fb923c 40%, #f97316 78%, #ea580c 100%);
  box-shadow:
    0 2px 8px rgba(251, 146, 60, 0.4),
    0 1px 3px rgba(234, 88, 12, 0.28);
}
/* 热度：自定义火焰图标 + 数值（与播放页 meta 数字同色） */
.melon-rank-fire {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.melon-rank-fire-ico {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.melon-expand-list.list-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 10px;
  border-top: 1px solid #f1f5f9;
}
.melon-expand-list .row-card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  box-shadow: none;
  background: transparent;
  padding: 8px 6px;
}
.melon-expand-list .row-card:last-child {
  border-bottom: none;
}
.melon-expand-list .row-card:hover {
  background: rgba(251, 114, 153, 0.04);
}

.melon-more-btn--card {
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: none;
  border-top: 1px solid #f1f5f9;
  border-radius: 0;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease;
}
.melon-more-btn--card:hover {
  background: #fff5f7;
}
.melon-more-btn--card.is-open {
  color: #e11d48;
}
.melon-more-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.melon-more-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 114, 153, 0.2);
  color: var(--primary);
  font-weight: 800;
  font-size: 11px;
}
/* 左侧下拉图标（PNG）；展开时旋转 180° 代替 ▲/▼ 文字 */
.melon-more-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}
.melon-more-chev-img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}
.melon-more-chev.melon-more-chev--open .melon-more-chev-img {
  transform: rotate(180deg);
}

.list-rows {
  display: grid;
  gap: 10px;
}
.row-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}
.row-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(251, 114, 153, 0.1);
}
.row-card:active {
  transform: scale(0.98);
}
.row-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.row-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  border-top: 1px solid #fce7f3;
  background: linear-gradient(to right, rgba(255,255,255,.96), rgba(253,242,248,.9), rgba(250,245,255,.92));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: #777;
  font-size: 11px;
  transition: all 0.2s ease;
}
.bottom-nav a b {
  font-size: 18px;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bottom-nav a span {
  font-weight: 500;
  line-height: 1.15;
  margin-top: 0;
}
.bottom-nav a.active {
  color: var(--primary);
}
.bottom-nav a.active span { font-weight: 700; }

/* VIP 自定义图标：非选中 → 与其他图标同色 #777；选中 → 主色 #fb7299 */
.nav-vip-icon {
  width: 1em;
  height: 1em;
  object-fit: contain;
  vertical-align: -.1em;
  filter: brightness(0) invert(.47);
  transition: filter .2s;
}
.bottom-nav a.active .nav-vip-icon {
  filter: brightness(0) saturate(100%) invert(52%) sepia(96%) saturate(1200%) hue-rotate(315deg) brightness(102%) contrast(97%);
}

/* 软件图标：默认灰色 + 红点脉冲徽章 */
.bottom-nav .nav-icon-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.nav-badge-dot {
  display: none;
  position: absolute;
  top: -2px;
  right: -8px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: nav-pulse 2s cubic-bezier(.4,0,.6,1) infinite;
}
.bottom-nav a.active .nav-badge-dot { display: block; }
@keyframes nav-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
/* 软件文字：与其他导航项同色 */

/* 占位导航按钮（替代 href=# 的死链接） */
.nav-btn-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: #777;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.nav-btn-placeholder b {
  font-size: 18px;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn-placeholder span {
  font-weight: 500;
  line-height: 1.15;
  margin-top: 0;
}

/* 弹窗内占位操作按钮（替代 href=#） */
.modal-action-btn {
  display: block;
  text-align: left;
  text-decoration: none;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
}
.modal-action-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* 热门爆料「更多」按钮 */
.melon-rank-section-more-btn {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}
.melon-rank-section-more-btn:hover { color: var(--primary); }

/* 底部 4 项 */
.bottom-nav--four {
  grid-template-columns: repeat(4, 1fr);
}
.bottom-nav--four a b {
  font-size: 15px;
}
.bottom-nav--four a span {
  font-size: 9px;
  max-width: 100%;
  text-align: center;
  line-height: 1.12;
}

/* ========================================
   Modal System
   ======================================== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal-card {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 22px;
  padding: 20px 16px 16px;
  position: relative;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.close-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 18px;
  color: #6b7280;
  transition: all 0.2s ease;
}
.close-btn:hover {
  background: #e5e7eb;
  color: #374151;
}
.modal-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  text-align: center;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 14px;
  text-align: center;
}

/* Code Input Row */
.code-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.code-row input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 44px;
  padding: 0 12px;
  font-size: 16px;
  line-height: 44px;
}
.code-row input::placeholder {
  color: #9ca3af;
  font-size: 16px;
}
.code-row button {
  border: 0;
  border-radius: 10px;
  height: 44px;
  padding: 0 16px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.code-row button:hover { background: #374151; }
.code-msg {
  min-height: 18px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  margin-bottom: 8px;
}

/* Modal Divider */
.modal-divider {
  margin: 12px 0;
  text-align: center;
  position: relative;
}
.modal-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #e5e7eb;
}
.modal-divider span {
  position: relative;
  background: #fff;
  padding: 0 10px;
  font-size: 10px;
  color: #9ca3af;
}

/* Modal Actions */
.modal-actions {
  display: grid;
  gap: 10px;
}
.action {
  display: block;
  text-align: left;
  text-decoration: none;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  transition: all 0.2s ease;
}
.action strong { display: block; font-weight: 700; }
.action small { display: block; font-size: 10px; opacity: 0.9; margin-top: 2px; }
.action.vip {
  background: linear-gradient(90deg, #111827, #374151);
}
.action.vip:hover { transform: translateY(-1px); }
.mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.action.mini {
  text-align: center;
  padding: 10px 8px;
}
.action.mini.blue {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}
.action.mini.blue:hover { transform: translateY(-1px); }
.action.mini.pink {
  background: linear-gradient(135deg, #ef4444, #ec4899);
}
.action.mini.pink:hover { transform: translateY(-1px); }

/* Play Modal */
.play-card h3 { margin: 12px 0 6px; font-size: 16px; text-align: left; }
.play-card .muted { text-align: left; margin-bottom: 10px; }
.play-cover-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
}
.play-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #e5e7eb;
}
.play-actions {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.play-btn {
  height: 42px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.play-btn.try {
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #334155);
}
.play-btn.try:hover { transform: translateY(-1px); }
.play-btn.full {
  color: #fff;
  background: linear-gradient(90deg, #ef4444, #ec4899);
}
.play-btn.full:hover { transform: translateY(-1px); }

/* ========================================
   Overlay Pages (Rank, Schedule, VIP)
   ======================================== */
.overlay-open { overflow: hidden; }
.overlay-page {
  position: fixed;
  inset: 0;
  background: #f6f8fa;
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  will-change: transform;
  display: flex;
  flex-direction: column;
}
.overlay-page.active { transform: translateX(0); }
.overlay-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 14px;
}
.overlay-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.overlay-back {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 16px;
  color: #374151;
  transition: all 0.2s ease;
}
.overlay-back:hover { background: #e2e8f0; }
.overlay-body {
  padding: 14px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}
.overlay-days {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.overlay-days::-webkit-scrollbar { display: none; }
.overlay-days button {
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  padding: 6px 12px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.overlay-days button.active {
  background: linear-gradient(90deg, #fb7299, #f43f5e);
  color: #fff;
}

/* VIP Overlay */
.vip-overlay {
  background: radial-gradient(circle at top, #1f2335, #0b0e17 55%);
  color: #fff;
}
.vip-overlay .overlay-header {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.vip-overlay .overlay-header h3 { color: #fcd34d; }
.vip-overlay .overlay-back {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.vip-overlay .overlay-back:hover { background: rgba(255,255,255,.2); }
.vip-overlay .overlay-body { padding: 16px; }
.vip-overlay-actions {
  padding: 10px 16px 20px;
  background: transparent;
}
.vip-overlay-list {
  display: grid;
  gap: 12px;
}
.vip-item {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}
.vip-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #f9fafb;
}
.vip-item p {
  margin: 0;
  font-size: 12px;
  color: #b7bfcd;
}

/* VIP Modal */
.vip-modal-mask { z-index: 90; }
.vip-modal-card {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  color: #fff;
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.vip-modal-title {
  margin: 0 0 6px;
  font-size: 20px;
  color: #fcd34d;
}
.vip-modal-card .muted { color: #94a3b8; }
.vip-modal-card .code-row input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.vip-modal-card .code-row input::placeholder { color: #94a3b8; }
.vip-modal-card .code-row button {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #111827;
}
.vip-modal-card .modal-divider::before { border-color: rgba(255,255,255,.1); }
.vip-modal-card .modal-divider span {
  background: #151528;
  color: #94a3b8;
}
.vip-modal-card .action.vip {
  background: linear-gradient(90deg, #374151, #4b5563);
}
.vip-modal-channels { display: grid; gap: 10px; }

/* Loading Overlay */
.loading-mask { z-index: 100; }
.loading-card {
  width: 220px;
  padding: 20px 16px;
  border-radius: 14px;
  text-align: center;
  background: #101827;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  animation: modalIn 0.3s ease;
}
.loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 3px solid rgba(251, 191, 36, 0.25);
  border-top-color: #fbbf24;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-card p {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 14px;
}
.loading-card small {
  color: #94a3b8;
  font-size: 12px;
}

/* 全站 #pageNavLoading：与播放页同款 .player-action-loading-overlay，仅提高层级并淡入 */
@keyframes pageNavLoadingIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#pageNavLoading.player-action-loading-overlay,
#playerActionLoading.player-action-loading-overlay {
  z-index: 10050;
  animation: pageNavLoadingIn 0.2s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  #pageNavLoading.player-action-loading-overlay,
  #playerActionLoading.player-action-loading-overlay {
    animation: none;
  }
}

/* VIP Main Button */
.vip-main-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  border-radius: 12px;
  padding: 14px;
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.vip-main-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.3);
}
.vip-main-btn-plain { width: 100%; }

/* VIP Page (promo-final style) */
.vip-body {
  background: radial-gradient(circle at top, #1f2335, #0b0e17 55%);
  color: #fff;
  min-height: 100vh;
}
.vip-page {
  padding: 16px;
  max-width: 520px;
  margin: 0 auto;
}
.vip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.vip-back {
  color: #d1d5db;
  text-decoration: none;
  font-size: 14px;
}
.vip-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.vip-hero-card {
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(160deg, rgba(39, 45, 71, 0.96), rgba(17, 20, 34, 0.98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  margin-bottom: 16px;
}
.vip-overline {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #fbbf24;
}
.vip-hero-card h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}
.vip-desc {
  margin: 10px 0 14px;
  color: #c9ced8;
  font-size: 13px;
}
.vip-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.vip-stats > div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.vip-stats b {
  display: block;
  color: #fcd34d;
  font-size: 16px;
  font-weight: 800;
}
.vip-stats span {
  font-size: 11px;
  color: #b8c0cf;
}
.vip-benefits {
  margin-bottom: 14px;
  display: grid;
  gap: 10px;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 13px;
}
.benefit-item span:first-child { font-size: 18px; }
.vip-actions {
  display: grid;
  gap: 10px;
}
.vip-sub-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  color: #fff;
  transition: all 0.2s ease;
}
.vip-sub-btn.primary {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  color: #111827;
}
.vip-sub-btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.vip-sub-btn:hover { transform: translateY(-1px); }

/* ========================================
   software.html & player.html 公用样式
   ======================================== */

/* 软件中心排名圆圈 */
.rank-1 {
  background: linear-gradient(145deg, #fde68a 0%, #fbbf24 40%, #f59e0b 100%);
  color: #92400e;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45), 0 0 16px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255,255,255,0.5);
}
.rank-2 {
  background: linear-gradient(145deg, #f1f5f9 0%, #cbd5e1 60%, #94a3b8 100%);
  color: #334155;
  box-shadow: 0 2px 8px rgba(148, 163, 184, 0.4), inset 0 1px 0 rgba(255,255,255,0.7);
}
.rank-3 {
  background: linear-gradient(145deg, #fca5a5 0%, #fb923c 50%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(251, 146, 60, 0.45), inset 0 1px 0 rgba(255,255,255,0.35);
}

/* 软件卡片投影 */
.app-card-shadow {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.app-card-shadow:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
}
article.app-card-shadow:has(button:active) {
  transform: scale(0.98);
}

/* 软件下载按钮渐变 */
.download-gradient {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #fb7299 0%, #f43f5e 100%);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.28);
}
.download-gradient:hover {
  background: linear-gradient(90deg, #fa618a 0%, #e11d48 100%);
  box-shadow: 0 5px 18px rgba(244, 63, 94, 0.38);
}

/* ========================================
   Responsive Design
   ======================================== */

/* ---- 基础移动端（< 640px）---- */
@media (max-width: 639px) {
  /* 窄屏：Tab 字距略收，排不下時仍可橫向捲動 */
  .tabs button {
    padding: 8px 9px 5px;
    font-size: 15px;
  }
  .tabs button.active .tab-text::after {
    bottom: -3px;
    height: 2px;
  }

  .banner { aspect-ratio: 16 / 9; border-radius: 18px; }
  .banner-item h3 { font-size: 14px; }

  /* 卡片网格：3列 */
  .card-grid { gap: 8px; }
  .title { font-size: 11px; line-height: 1.3; }
  .sub { font-size: 9px; }

  /* 底部导航 */
  .bottom-nav a span { font-size: 10px; }
  .bottom-nav a b { font-size: 17px; }
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom, 6px); }

  /* 弹窗 */
  .modal-card { padding: 16px 14px 12px; }
  .action { padding: 10px 14px; font-size: 12px; }

  /* 吃瓜区 */
  .melon-rank-section-head--outer { padding: 12px 14px 8px; }
  .melon-top-card { border-radius: 12px; }
}

/* ---- 平板端（640px - 1023px）---- */
@media (min-width: 640px) and (max-width: 1023px) {
  :root {
    --hdr-banner-gap: 10px;
    --page-pad-x: 20px;
    --page-pad-bottom: 40px;
  }

  .tabs-wrap {
    max-width: 860px;
  }

  .page { max-width: 860px; }

  .banner { aspect-ratio: 16 / 7; border-radius: 20px; }

  /* 卡片网格：4列 */
  .card-grid { gap: 12px; }
  .title { font-size: 12px; }

  /* 吃瓜区 */
  .melon-rank-section-head--outer { padding: 14px 20px 10px; }
}

/* ---- 桌面端（≥ 1024px）---- */
@media (min-width: 1024px) {
  :root {
    --hdr-banner-gap: 12px;
    --page-pad-x: 32px;
    --page-pad-bottom: 45px;
  }

  .tabs-wrap {
    max-width: 1200px;
  }

  .page { max-width: 1200px; }

  .banner {
    aspect-ratio: 21 / 8;
    border-radius: 26px;
    margin-bottom: 24px;
  }

  /* 卡片网格：5列 */
  .card-grid { gap: 14px; }

  /* 底部导航字体放大 */
  .bottom-nav a span { font-size: 13px; }
  .bottom-nav a b { font-size: 20px; }
  .bottom-nav { max-width: 640px; margin: 0 auto; }

  /* 吃瓜区 */
  .melon-rank-section-head--outer { padding: 16px 32px 12px; }
}

/* ---- 超宽屏（≥ 1440px）---- */
@media (min-width: 1440px) {
  :root {
    --hdr-banner-gap: 14px;
    --page-pad-x: 48px;
    --page-pad-bottom: 50px;
  }

  .tabs-wrap {
    max-width: 1320px;
  }

  .page {
    max-width: 1320px;
  }
  .card-grid { gap: 18px; }
  .banner { border-radius: 30px; margin-bottom: 30px; }
}

/* 写真 / 真人卡片封面：写真竖长 3:4，真人横向 16:9 */
.card--photo .thumb--photo {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.card--photo .thumb--real {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.card-grid.card-grid--photo {
  grid-template-columns: repeat(2, 1fr);
}

/* ========================================
   VIP 页解锁区（替代内联样式，满足 lint）
   ======================================== */
.vip-desc-accent {
  color: #fcd34d;
}
.vip-code-block {
  margin-top: 20px;
  text-align: center;
}
.vip-code-hint {
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 10px;
}
.vip-body .vip-direct-input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  height: 40px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
}
.vip-body .vip-direct-btn {
  border: 0;
  border-radius: 10px;
  height: 40px;
  padding: 0 16px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #111827;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.vip-direct-msg {
  min-height: 18px;
  color: #94a3b8;
  font-size: 11px;
  margin-top: 6px;
}

/* ========================================
   player.html：解锁码弹窗（替代内联样式）
   ======================================== */
.player-page .player-code-row-wrap {
  width: 100%;
  max-width: 300px;
}
.player-page .player-code-input-dark {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  height: 42px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  /* ≥16px 避免 iOS 聚焦输入时整页放大 */
  font-size: 16px;
  line-height: 42px;
  outline: none;
}
.player-page .player-code-btn-amber {
  border: 0;
  border-radius: 10px;
  height: 42px;
  padding: 0 16px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #111;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.player-page .player-code-msg {
  font-size: 11px;
  min-height: 16px;
}
.player-page .player-code-cancel-wide {
  max-width: 300px;
  width: 100%;
}

/* ========================================
   Filter Sidebar - 筛选侧边栏
   ======================================== */

/* 桌面端布局：左侧筛选 + 右侧内容 */
.content-layout {
  display: flex;
  gap: 0;
  flex-direction: column;
}

/* 筛选侧边栏 */
.filter-sidebar {
  display: none; /* 默认隐藏，移动端 */
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  height: fit-content;
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--site-header-h) + 8px);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.filter-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.filter-group {
  margin-bottom: 14px;
}

.filter-group:last-of-type {
  margin-bottom: 8px;
}

.filter-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.filter-option:hover {
  background: rgba(251, 114, 153, 0.06);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-option:has(input:checked) .filter-label {
  color: var(--primary);
  font-weight: 500;
}

.filter-apply-btn {
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 114, 153, 0.25);
}

/* 桌面筛选栏底部：打开全站浮层（与 data-open-overlay 对应） */
.filter-sidebar-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.filter-extra-link {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  background: #fef7f9;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.filter-extra-link:hover {
  background: rgba(251, 114, 153, 0.08);
  border-color: rgba(251, 114, 153, 0.35);
}

/* 右侧内容主区域 */
.content-main {
  flex: 1;
  min-width: 0;
}

/* ========================================
   Responsive: 桌面端显示筛选侧边栏
   ======================================== */
@media (min-width: 1024px) {
  .content-layout {
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
  }

  .filter-sidebar {
    display: block;
  }

  .content-main {
    flex: 1;
  }
}

@media (max-width: 1023px) {
  .filter-sidebar {
    width: 100%;
    margin-bottom: 16px;
  }
}

/* ========================================
   player.html：播放页样式（从内联迁移）
   ======================================== */

body.player-page {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  padding-bottom: 12px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

.player-video-card {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}
.player-stage-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.22;
  pointer-events: none;
}
.player-page.is-unlocked .player-stage-poster { opacity: 0.45; }
.player-stage-dim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 35%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}
.player-stage-ui {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 10px 8px;
  box-sizing: border-box;
  pointer-events: none;
}
.player-stage-ui > * {
  pointer-events: auto;
}
.player-stage-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.player-stage-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.player-stage-top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.player-stage-back {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  background: #4a4a4a;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  margin-top: 10px;
  margin-left: 10px;
  box-sizing: border-box;
}
.player-stage-back:hover {
  background: #555;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.player-stage-back:active {
  transform: scale(0.96);
  background: #3d3d3d;
}
.player-stage-back-icon {
  width: 16px;
  height: 16px;
  display: block;
  margin-left: -1px;
}
.player-stage-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  margin-top: 12px;
  margin-right: 12px;
}
.player-stage-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 1.5px rgba(34, 197, 94, 0.35);
  flex-shrink: 0;
}
.player-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.player-play-icon:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
}
.player-play-icon:active { transform: translate(-50%, -50%) scale(0.96); }
.player-play-icon img,
.player-play-icon .play-icon-svg { display: block; pointer-events: none; }
.player-stage-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  padding: 4px 12px 6px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  position: relative;
  z-index: 2;
}
.player-stage-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.player-stage-progress {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: visible;
  pointer-events: none;
}
.player-stage-progress-inner {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fb7299 0%, #fda4af 50%, #f472b6 100%);
  box-shadow: 0 0 8px rgba(251, 114, 153, 0.45);
  transition: width 0.35s ease-out;
  pointer-events: none;
}
.player-stage-progress-thumb {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(251, 114, 153, 0.5), 0 1px 3px rgba(0,0,0,0.18);
  transition: left 0.35s ease-out;
  pointer-events: none;
}
.player-stage-time { font-variant-numeric: tabular-nums; }
.player-stage-speed { opacity: 0.9; }

.player-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 21px var(--page-pad-x, 12px) 19px;
  background: var(--bg);
  position: relative;
  z-index: 0;
}
.player-meta { margin-bottom: 16px; }
.player-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--text);
}
.player-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.player-quality-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  border: 0;
  background: rgba(251, 114, 153, 0.1);
}
.player-meta-dot::before { content: "·"; margin: 0 4px; color: currentColor; opacity: 0.85; }
.player-meta-views-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-weight: inherit;
}
.player-meta-time-plain {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
.player-meta-views-icon {
  width: 1em;
  height: 1em;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.player-action-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.player-action-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 2px;
  position: relative;
  transition: opacity 0.2s;
}
.player-action-item:active { opacity: 0.75; }
.player-action-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.player-action-item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; }
/* 收藏位图：逻辑尺寸与 SVG 一致；建议源图 ≥48×48 避免高分屏发糊（CDN 强压缩也会糊） */
.player-action-fav-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
#playerLikeBtn { color: var(--muted); }
#playerLikeBtn svg { stroke: currentColor; }
#playerLikeBtn .player-action-num { color: currentColor; }
#playerLikeBtn.is-liked { color: var(--primary); }
.player-action-item .player-action-num { font-size: 12px; font-weight: 700; color: var(--text); }
.player-action-lock {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #f472b6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: none;
  z-index: 1;
}
.player-action-lock img { width: 9px; height: 9px; object-fit: contain; display: block; margin: auto; }
.player-page.is-unlocked .player-action-lock { display: none; }

.player-detail-tabs {
  display: flex;
  gap: 24px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--line);
}
.player-detail-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0 2px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
}
.player-detail-tab.is-active { color: var(--text); }
.player-detail-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}
.player-tab-panel { padding: 18px 0 10px; }
.player-ep-head { font-size: 13px; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.player-ep-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  /* 隐藏横向滚动条，避免选集下方出现一条浅灰横线（仍支持触摸/滚轮横向滑动） */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.player-ep-scroll::-webkit-scrollbar {
  display: none;
  height: 0;
}
.player-ep-card {
  flex: 0 0 auto;
  min-width: 108px;
  padding: 12px 14px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.18s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.player-ep-card:active {
  transform: scale(0.96);
}
.player-ep-card--active {
  border-color: transparent;
  background: rgba(251, 114, 153, 0.14);
  color: var(--primary-dark);
  box-shadow: none;
}
.player-ep-card--active .player-ep-sub--playing { color: var(--primary); font-weight: 700; }
.player-ep-card--vip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-right: 14px;
}
.player-ep-vip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  line-height: 1.25;
}
.player-ep-vip-row .player-ep-main {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}
.player-ep-card--vip .player-ep-lock-ico {
  flex-shrink: 0;
  line-height: 1.25;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.player-ep-card--vip .player-ep-lock-ico img { width: 12px; height: 12px; object-fit: contain; display: block; }
.player-ep-card--vip .player-ep-sub { color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 4px; display: block; }
.player-page.is-unlocked .player-ep-card--vip { border-color: var(--line); background: #fff; color: var(--text); }
.player-page.is-unlocked .player-ep-card--vip .player-ep-sub { color: var(--muted); }
.player-page.is-unlocked .player-ep-card--vip .player-ep-lock-ico { display: none; }

.player-cmt-sort { display: flex; gap: 8px; margin-bottom: 12px; }
.player-cmt-sort--bar {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.player-cmt-sort-total {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.player-cmt-sort-total-num {
  font-size: 0.667em;
  font-weight: 500;
  color: var(--muted);
}
.player-cmt-sort-hot-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}
.player-cmt-sort-right {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}
.player-cmt-sort-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.player-cmt-sort-btn.is-active { color: var(--primary); background: rgba(251, 114, 153, 0.12); }
.player-cmt-sort-btn--bar {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}
.player-cmt-sort-btn--bar.is-active {
  color: var(--primary);
  background: transparent;
  font-weight: 600;
}
.player-cmt-sort-btn--bar:not(.is-active) {
  color: var(--muted);
  background: transparent;
}
.player-cmt-list { list-style: none; margin: 0; padding: 0; }
.player-cmt-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.player-cmt-item:last-child { border-bottom: 0; }
.player-cmt-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e5e7eb; }
.player-cmt-body { flex: 1; min-width: 0; display: flex; flex-direction: row; align-items: flex-start; gap: 10px; }
.player-cmt-inner { flex: 1; min-width: 0; }
.player-cmt-headline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 2px; }
.player-cmt-meta { font-size: 10px; color: #9ca3af; line-height: 1.4; flex-shrink: 0; }
.player-cmt-subline { font-size: 10px; color: #9ca3af; line-height: 1.25; margin-bottom: 2px; }
.player-cmt-sep { color: #d1d5db; -webkit-user-select: none; user-select: none; }
.player-cmt-lv-prefix, .player-cmt-ip-prefix { font-size: 9px; font-weight: 500; letter-spacing: 0.02em; }
.player-cmt-hot {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.2;
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  opacity: 0.85;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.player-cmt-name { font-size: 13px; font-weight: 600; color: var(--text); }
/* 评论会员徽标：文字下彩色下划线 */
.player-cmt-badge {
  display: inline;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding-bottom: 1px;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 100% 1px;
  background-repeat: no-repeat;
}
.player-cmt-badge--vip  { color: #e11d48; } /* VIP1 */
.player-cmt-badge--vip1 { color: #f59e0b; } /* SVIP1 琥珀橙 */
.player-cmt-badge--vip2 { color: #ea580c; } /* SVIP2 亮橙 */
.player-cmt-badge--vip3 { color: #f43f5e; } /* SVIP3 玫红 */
.player-cmt-badge--vip4 { color: #8b5cf6; } /* SVIP4 紫 */
.player-cmt-badge--vip5 { color: #06b6d4; } /* SVIP5 青 */
.player-cmt-badge--vip6 { color: #ca8a04; } /* SVIP6 金 */
.player-cmt-badge-num { font-size: 1.2em; font-weight: 800; }
.player-cmt-badge--vip1,
.player-cmt-badge--vip2,
.player-cmt-badge--vip3,
.player-cmt-badge--vip4,
.player-cmt-badge--vip5,
.player-cmt-badge--vip6 { background-image: none; }
.player-cmt-like {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  border: 0;
  background: none;
  padding: 0 2px;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-start;
}
.player-cmt-like svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.player-cmt-like-num { font-size: 11px; line-height: 1.2; }
.player-cmt-like.is-liked { color: var(--primary); }
.player-cmt-like.is-liked svg { fill: var(--primary); stroke: var(--primary); }
.player-cmt-text { margin: 0; font-size: 14px; color: var(--text); line-height: 1.45; word-break: break-word; }
.player-tab-label { line-height: 1.2; }
.player-tab-suffix { font-size: 9px; font-weight: 500; color: var(--muted); line-height: 1.2; }

.player-guess { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
/* 互动栏已有底边线时，猜你喜欢不再画顶线，避免双线 */
.player-action-bar + .player-guess {
  border-top: none;
  margin-top: 0;
  padding-top: 16px;
}
.player-guess-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.player-guess-header .player-guess-title { margin: 0; flex: 1; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.35; }
.player-guess-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  width: fit-content;
  max-width: fit-content;
  min-width: 0;
  margin: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s, transform 0.15s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  min-height: unset;
  height: auto;
}
.player-guess-refresh:hover { opacity: 0.8; }
.player-guess-refresh:active { transform: scale(0.98); }
.player-guess-refresh svg { width: 14px; height: 14px; flex-shrink: 0; }
.player-rec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.player-rec-hit {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm, 10px);
  overflow: hidden;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease;
}
.player-rec-hit:active {
  transform: scale(0.97);
}
.player-rec-hit:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.player-rec-thumb {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm, 10px) var(--radius-sm, 10px) 0 0;
  overflow: hidden;
  background: #e5e7eb;
}
.player-rec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-rec-thumb::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  pointer-events: none;
  border-radius: 0 0 var(--radius-sm, 10px) var(--radius-sm, 10px);
}
.player-rec-views {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  z-index: 3;
}
.player-rec-views svg { width: 11px; height: 11px; flex-shrink: 0; fill: currentColor; }
.player-rec-title {
  margin: 0;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-sm, 10px) var(--radius-sm, 10px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
  word-break: break-word;
}
.player-guess-end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  font-size: 12px;
  color: var(--muted);
  justify-content: center;
}
.player-guess-end::before, .player-guess-end::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  max-width: 80px;
}
.player-unlock-area { display: none; }
.player-unlock-area.active { display: block; }
.player-section-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 10px; padding-top: 4px; }

/* 解锁码弹窗（浅色） */
.player-page .player-code-input-dark { border: 1px solid var(--line); background: #fff; color: var(--text); }
.player-page .player-code-input-dark::placeholder { color: #9ca3af; }
.player-page .player-code-msg { color: var(--muted); }

/* 播放页：仅视频 16:9 框内（在 .player-stage-ui 下层，中间透过透明区仍见动效） */
.player-stage .player-unlock-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
}
/* 加载中隐藏中央播放钮，避免叠在动效上 */
.player-stage .player-unlock-loading-overlay:not(.hidden) ~ .player-stage-ui .player-play-icon {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.player-unlock-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.5vw, 14px);
  padding: clamp(10px, 4vw, 20px);
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}
.player-unlock-loading-ring {
  width: clamp(40px, 11vw, 52px);
  height: clamp(40px, 11vw, 52px);
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #ff5c7c 0deg, #ff5c7c 270deg, transparent 270deg);
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 57%);
  mask: radial-gradient(circle, transparent 56%, #000 57%);
  animation: player-secure-ring-spin 0.85s linear infinite;
  will-change: transform;
}
@keyframes player-secure-ring-spin {
  to { transform: rotate(360deg); }
}
.player-unlock-loading-line1 {
  margin: 0;
  font-size: clamp(12px, 3.6vw, 16px);
  font-weight: 700;
  color: #ff5c7c;
  letter-spacing: 0.02em;
  line-height: 1.35;
}
.player-unlock-loading-line2 {
  margin: 0;
  font-size: clamp(10px, 3vw, 13px);
  font-weight: 400;
  color: #d1d5db;
  line-height: 1.4;
}
.player-unlock-loading-line2-muted {
  color: #9ca3af;
}
.player-unlock-loading-pct,
.player-unlock-loading-pct-unit {
  color: #ff5c7c;
  font-weight: 600;
}

/* 解锁码弹窗 */
.player-code-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

/* 播放页：解锁弹窗遮罩约 30% 黑 + 入场动画（不改为白底；仅 body.player-page） */
@keyframes player-code-overlay-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes player-unlock-modal-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.player-page .player-code-overlay:not(.hidden) {
  background: rgba(0, 0, 0, 0.3);
  animation: player-code-overlay-fade-in 0.28s ease-out forwards;
}
.player-page .player-code-overlay:not(.hidden) .player-unlock-modal {
  animation: none;
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .player-page .player-code-overlay:not(.hidden),
  .player-page .player-code-overlay:not(.hidden) .player-unlock-modal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* 全站「正在加载...」：白圈 + 白字加粗（遮罩略加深以便辨认） */
.player-action-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.55);
}
.player-action-loading-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.player-action-loading-spinner {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  animation: player-action-loading-spin 0.65s linear infinite;
}
@keyframes player-action-loading-spin {
  to { transform: rotate(360deg); }
}
.player-action-loading-text {
  margin: 0;
  font-size: clamp(17px, 4.2vw, 20px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
}
@media (prefers-reduced-motion: reduce) {
  .player-action-loading-spinner {
    animation: none;
    border-top-color: #ffffff;
  }
}

/* 与首页一致：Tailwind Preflight / @tailwindcss/forms 会改 input、button 边框与配色，此处用 #codeOverlay 提高优先级覆盖 */
#codeOverlay .player-unlock-input {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  padding: 0 14px;
  /* ≥16px 避免 iOS 聚焦输入时整页放大 */
  font-size: 16px;
  font-weight: 400;
  line-height: 44px;
  color: #1a2131;
  text-align: center;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
#codeOverlay .player-unlock-input::placeholder {
  color: #d1d5db;
  font-size: 16px;
}
#codeOverlay .player-unlock-input:focus {
  border-color: #fce7f3;
  box-shadow: 0 0 0 2px rgba(251, 207, 232, 0.9);
}
#codeOverlay .player-unlock-submit-btn {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0;
  background: #111827;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: none;
}
#codeOverlay .player-unlock-submit-btn:hover {
  background: #000;
}
#codeOverlay .player-unlock-submit-btn:active {
  box-shadow: inset 0 2px 8px rgba(0,0,0,.25);
  opacity: .9;
}
#codeOverlay .player-unlock-close {
  -webkit-appearance: none;
  appearance: none;
}

.player-unlock-modal {
  position: relative;
  width: 100%;
  max-width: 18.5rem;
  max-height: min(88vh, 560px);
  overflow-y: auto;
  background: radial-gradient(circle at top, #fff5f7 0%, #f9fafb 100%);
  border-radius: 20px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.32);
  padding: 18px 15px 14px;
  box-sizing: border-box;
}
.player-unlock-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
  background: #f4f4f5;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #61666d;
  box-shadow: none;
  transition: color 0.2s, background 0.2s, opacity 0.15s;
}
.player-unlock-close:hover {
  color: #18191c;
  background: #e8e9ed;
}
.player-unlock-close:active { opacity: 0.78; }
/* 弹窗右上角关闭：避免全站 button 的粉色 focus-visible */
#codeOverlay .player-unlock-close:focus {
  outline: none;
}
#codeOverlay .player-unlock-close:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.player-unlock-close-icon { width: 12px; height: 12px; display: block; opacity: 0.85; }
.player-unlock-header { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 6px; margin-bottom: 14px; }
.player-unlock-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff75a0 0%, #f83a7c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(248, 58, 124, 0.28);
  margin-bottom: 8px;
}
.player-unlock-icon { width: 24px; height: 24px; color: #fff; display: block; }
.player-unlock-title { margin: 0 0 3px; font-size: 1.0625rem; font-weight: 900; color: #1a2131; letter-spacing: -0.025em; }
.player-unlock-subtitle { margin: 0; font-size: 0.75rem; font-weight: 500; color: #9ca3af; }
.player-unlock-input-area { display: flex; flex-direction: column; gap: 8px; margin-bottom: 0; }
.player-unlock-input {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  line-height: 44px;
  color: #1a2131;
  text-align: center;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.player-unlock-input::placeholder {
  color: #d1d5db;
  font-size: 16px;
}
.player-unlock-input:focus { border-color: #fce7f3; box-shadow: 0 0 0 2px rgba(251, 207, 232, 0.9); }
.player-unlock-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 42px;
  background: #111827;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, box-shadow .15s, opacity .15s;
}
.player-unlock-submit-btn:hover { background: #000; }
.player-unlock-submit-btn:active { box-shadow: inset 0 2px 8px rgba(0,0,0,.25); opacity: .9; }
.player-unlock-submit-arrow { width: 16px; height: 16px; flex-shrink: 0; }
.player-unlock-msg { text-align: center; font-size: 12px; font-weight: 500; margin: 8px 0 4px; min-height: 16px; visibility: hidden; }
.player-unlock-msg:not(:empty) { visibility: visible; }
.player-unlock-divider { display: flex; align-items: center; margin-top: 12px; margin-bottom: 12px; }
.player-unlock-divider-line { flex: 1; border: 0; border-top: 1px solid #e5e7eb; }
.player-unlock-divider-text {
  margin: 0 8px;
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  background: #f9f9f9;
  border: 1px solid #f3f4f6;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.player-unlock-tasks { display: flex; flex-direction: column; gap: 8px; }
.player-unlock-task-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.player-unlock-gold-card {
  position: relative;
  background: linear-gradient(to bottom, #fffdf2 0%, #fff9e6 100%);
  border: 1px solid #ffecb3;
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.player-unlock-gold-card:hover { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); }
.player-unlock-blue-card {
  position: relative;
  background: linear-gradient(to bottom, #f0f7ff 0%, #e0efff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.player-unlock-blue-card:hover { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); }
.player-unlock-blue-card .player-unlock-task-icon-box { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); margin-right: 8px; }
.player-unlock-task-arrow--blue { color: #60a5fa; flex-shrink: 0; padding-right: 4px; }
.player-unlock-pink-card {
  position: relative;
  background: linear-gradient(to bottom, #fff5f9 0%, #ffe8f0 100%);
  border: 1px solid #fbcfe8;
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.player-unlock-pink-card:hover { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); }
.player-unlock-pink-card .player-unlock-task-icon-box { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); margin-right: 8px; }
.player-unlock-task-arrow--pink { color: #f472b6; flex-shrink: 0; padding-right: 4px; }
.player-unlock-indigo-card {
  position: relative;
  background: linear-gradient(to bottom, #faf5ff 0%, #f3e8ff 100%);
  border: 1px solid #e9d5ff;
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.player-unlock-indigo-card:hover { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); }
.player-unlock-indigo-card .player-unlock-task-icon-box { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); margin-right: 8px; }
.player-unlock-task-arrow--indigo { color: #a78bfa; flex-shrink: 0; padding-right: 4px; }
.player-unlock-sub-card {
  background: #fff;
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.player-unlock-sub-card:hover { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); }
.player-unlock-task-card { -webkit-tap-highlight-color: transparent; transition: box-shadow .15s, opacity .15s; cursor: pointer; }
.player-unlock-task-card:active { box-shadow: inset 0 2px 6px rgba(0,0,0,.12); opacity: .85; }
.player-unlock-task-icon-box { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.player-unlock-gold-card .player-unlock-task-icon-box { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); margin-right: 8px; }
.player-unlock-task-icon-box svg { width: 19px; height: 19px; }
.player-unlock-task-icon-box--gold svg { color: #eab308; }
.player-unlock-task-icon-box--blue { background: #eff6ff; }
.player-unlock-task-icon-box--blue svg { width: 18px; height: 18px; color: #60a5fa; }
.player-unlock-task-icon-box--pink { background: #fdf2f8; }
.player-unlock-task-icon-box--pink svg { width: 18px; height: 18px; color: #f472b6; }
.player-unlock-task-icon-box--indigo { background: #f5f3ff; }
.player-unlock-task-icon-box--indigo svg { width: 18px; height: 18px; color: #8b5cf6; }
.player-unlock-task-info { flex: 1; min-width: 0; }
.player-unlock-task-name { margin: 0; font-size: 0.8125rem; font-weight: 800; color: #1a2131; line-height: 1.2; }
.player-unlock-task-desc { margin: 0; font-size: 10px; color: #6b7280; line-height: 1.3; }
.player-unlock-task-arrow { color: #eab308; flex-shrink: 0; padding-right: 4px; }
.player-unlock-task-arrow svg { width: 16px; height: 16px; display: block; }
.player-unlock-recommend-badge {
  position: absolute;
  top: -6px;
  right: -2px;
  background: linear-gradient(to right, #fb923c, #eab308);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 0 7px 0 7px;
}
.player-unlock-sub-card .player-unlock-task-icon-box { width: 32px; height: 32px; margin-bottom: 6px; }
.player-unlock-sub-card-name { margin: 0 0 2px; font-size: 0.6875rem; font-weight: 700; color: #1a2131; }
.player-unlock-sub-card-desc { margin: 0; font-size: 9px; line-height: 1.3; color: #9ca3af; font-weight: 400; }
.player-unlock-sub-card-desc--accent { color: #ec4899; font-weight: 500; }
.player-unlock-footer { margin-top: 12px; text-align: center; }
.player-unlock-footer p { margin: 0; font-size: 9px; font-weight: 500; color: #d1d5db; }

/* VIP 已解锁后：引导弹层（与解锁码表单共用 #codeOverlay） */
.player-unlock-funnel-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px 8px;
  box-sizing: border-box;
}
.player-unlock-funnel-check { margin-bottom: 10px; }
.player-unlock-funnel-check svg { display: block; }
.player-unlock-funnel-title {
  margin: 0 0 6px;
  font-size: 1.125rem;
  font-weight: 800;
  color: #1a2131;
  letter-spacing: -0.02em;
}
#codeOverlay .player-unlock-funnel-title:focus {
  outline: none;
}
.player-unlock-funnel-desc {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1.45;
  max-width: 15rem;
}
.player-unlock-funnel-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 45%, #5b21b6 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.player-unlock-funnel-cta:active {
  opacity: 0.92;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}
#codeOverlay .player-unlock-funnel-cta:focus {
  outline: none;
}
#codeOverlay .player-unlock-funnel-cta:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}
.player-unlock-funnel-cta-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.player-unlock-funnel-cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.player-unlock-funnel-cta-main { font-size: 0.9rem; font-weight: 800; }
.player-unlock-funnel-cta-sub { font-size: 0.65rem; font-weight: 500; opacity: 0.88; }
.player-unlock-funnel-cta-arrow { flex-shrink: 0; opacity: 0.95; display: flex; align-items: center; }
/* 已解锁弹窗：紫主按钮下的次要「关闭」（浅灰底 + × + 文案） */
.player-unlock-funnel-dismiss {
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.player-unlock-funnel-dismiss:hover {
  background: #e5e7eb;
  color: #374151;
}
.player-unlock-funnel-dismiss:active {
  opacity: 0.92;
}
.player-unlock-funnel-dismiss__ico {
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  opacity: 0.88;
}
#codeOverlay .player-unlock-funnel-dismiss:focus {
  outline: none;
}
#codeOverlay .player-unlock-funnel-dismiss:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

/* player 响应式 */
@media (max-width: 639px) {
  .player-video-card { border-radius: 0; margin-top: 0; }
  .player-body { padding: 12px 12px 28px; }
  .player-title { font-size: 16px; }
}
@media (min-width: 640px) { .player-body { max-width: 620px; } }
@media (max-width: 380px) {
  .player-stage-ui { padding: 8px 8px 6px; }
  .player-stage-online { max-width: min(58vw, 220px); overflow: hidden; text-overflow: ellipsis; font-size: 9px; padding: 2px 6px 2px 5px; gap: 3px; }
  .player-stage-online-dot { width: 5px; height: 5px; box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35); }
  .player-play-icon { width: 40px; height: 40px; }
  .player-play-icon .play-icon-svg { width: 22px; height: 22px; }
  .player-stage-bottom { font-size: 10px; gap: 5px; padding-bottom: 5px; }
  .player-stage-progress { height: 2px; }
  .player-stage-progress-inner { height: 2px; }
  .player-stage-progress-thumb { width: 4px; height: 4px; }
}
@media (max-width: 359px) {
  .player-code-overlay { padding: 8px; }
  .player-unlock-modal { max-width: 17.5rem; max-height: min(90vh, 520px); padding: 15px 12px 12px; border-radius: 18px; }
  .player-unlock-icon-box { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 6px; }
  .player-unlock-icon { width: 22px; height: 22px; }
  .player-unlock-title { font-size: 1rem; }
  .player-unlock-input { height: 40px; font-size: 0.875rem; border-radius: 11px; }
  .player-unlock-submit-btn { height: 40px; font-size: 0.8125rem; border-radius: 11px; }
  #codeOverlay .player-unlock-input { height: 40px; font-size: 0.875rem; border-radius: 11px; }
  #codeOverlay .player-unlock-submit-btn { height: 40px; font-size: 0.8125rem; border-radius: 11px; }
  .player-unlock-task-row { gap: 6px; }
  .player-unlock-gold-card, .player-unlock-indigo-card, .player-unlock-blue-card, .player-unlock-pink-card { border-radius: 12px; padding: 8px; }
  .player-unlock-sub-card { border-radius: 12px; padding: 8px 6px; }
  .player-unlock-task-icon-box { width: 34px; height: 34px; }
  .player-unlock-gold-card .player-unlock-task-icon-box,
  .player-unlock-indigo-card .player-unlock-task-icon-box,
  .player-unlock-blue-card .player-unlock-task-icon-box,
  .player-unlock-pink-card .player-unlock-task-icon-box { margin-right: 6px; }
  .player-unlock-task-name { font-size: 0.75rem; }
  .player-unlock-task-desc { font-size: 9px; }
  .player-unlock-sub-card .player-unlock-task-icon-box { width: 28px; height: 28px; margin-bottom: 5px; }
  .player-unlock-sub-card-name { font-size: 0.625rem; }
  .player-unlock-sub-card-desc { font-size: 8px; }
  .player-unlock-recommend-badge { font-size: 7px; padding: 2px 5px; }
  .player-unlock-footer { margin-top: 10px; }
  .player-unlock-footer p { font-size: 8px; }
}
@media (min-width: 360px) and (max-width: 639px) {
  .player-unlock-modal { max-width: 18.25rem; padding: 17px 15px 14px; border-radius: 20px; }
  .player-unlock-icon-box { width: 50px; height: 50px; border-radius: 14px; }
  .player-unlock-icon { width: 24px; height: 24px; }
  .player-unlock-title { font-size: 1.0625rem; }
  .player-unlock-input { height: 42px; font-size: 0.9rem; border-radius: 12px; }
  .player-unlock-submit-btn { height: 42px; font-size: 0.85rem; border-radius: 12px; }
  .player-unlock-gold-card, .player-unlock-indigo-card, .player-unlock-blue-card, .player-unlock-pink-card { border-radius: 14px; padding: 9px 10px; }
  .player-unlock-sub-card { border-radius: 14px; padding: 10px 8px; }
  .player-unlock-task-icon-box { width: 38px; height: 38px; }
  .player-unlock-sub-card .player-unlock-task-icon-box { width: 32px; height: 32px; }
  .player-unlock-sub-card-name { font-size: 0.6875rem; }
  .player-unlock-footer p { font-size: 8px; }
}
@media (min-width: 640px) {
  .player-unlock-modal { max-width: 20rem; max-height: min(86vh, 580px); padding: 20px 18px 16px; border-radius: 22px; }
  .player-unlock-icon-box { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 6px 14px rgba(248, 58, 124, 0.28); margin-bottom: 10px; }
  .player-unlock-icon { width: 28px; height: 28px; }
  .player-unlock-header { margin-bottom: 16px; }
  .player-unlock-title { font-size: 1.125rem; }
  .player-unlock-subtitle { font-size: 0.8125rem; }
  .player-unlock-input-area { gap: 9px; }
  .player-unlock-input { height: 46px; font-size: 0.9375rem; border-radius: 13px; padding: 0 16px; }
  .player-unlock-submit-btn { height: 46px; font-size: 0.9rem; border-radius: 13px; }
  .player-unlock-divider { margin-top: 14px; margin-bottom: 14px; }
  .player-unlock-tasks { gap: 10px; }
  .player-unlock-task-row { gap: 10px; }
  .player-unlock-gold-card, .player-unlock-indigo-card, .player-unlock-blue-card, .player-unlock-pink-card { border-radius: 16px; padding: 11px 12px; }
  .player-unlock-sub-card { border-radius: 16px; padding: 12px 10px; }
  .player-unlock-task-icon-box { width: 44px; height: 44px; }
  .player-unlock-gold-card .player-unlock-task-icon-box,
  .player-unlock-indigo-card .player-unlock-task-icon-box,
  .player-unlock-blue-card .player-unlock-task-icon-box,
  .player-unlock-pink-card .player-unlock-task-icon-box { margin-right: 10px; }
  .player-unlock-task-icon-box svg { width: 21px; height: 21px; }
  .player-unlock-task-icon-box--blue svg, .player-unlock-task-icon-box--pink svg, .player-unlock-task-icon-box--indigo svg { width: 17px; height: 17px; }
  .player-unlock-task-info { margin-right: 6px; }
  .player-unlock-task-name { font-size: 0.875rem; }
  .player-unlock-task-desc { font-size: 11px; }
  .player-unlock-task-arrow svg { width: 17px; height: 17px; }
  .player-unlock-recommend-badge { font-size: 9px; padding: 2px 7px; border-radius: 0 7px 0 7px; }
  .player-unlock-sub-card .player-unlock-task-icon-box { width: 36px; height: 36px; margin-bottom: 8px; }
  .player-unlock-sub-card-name { font-size: 0.8125rem; }
  .player-unlock-sub-card-desc { font-size: 9px; }
  .player-unlock-footer { margin-top: 16px; }
  /* Material Symbols Filled 状态（等同于 style="font-variation-settings:'FILL' 1"） */
  .icon-filled { font-variation-settings: 'FILL' 1; }

  /* NOTICE 轮换文字基础不透明（配合 JS 动画切换） */
  #noticeRotatorText { opacity: 1; transition: opacity 0.28s ease-out; }
}

/* ===== melon.html 补充样式 ===== */

/* 评论点赞按钮（melon.html 使用 .player-cmt-like-btn 而非 .player-cmt-like） */
.player-cmt-like-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.player-cmt-like-btn .material-symbols-outlined {
  transition: color 0.15s ease;
}

/* 收藏激活态 */
#playerFavBtn.is-faved .material-symbols-outlined {
  color: var(--primary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* 点赞按钮激活态（独立 id 选择器优先级更高） */
#playerLikeBtn.is-liked svg path {
  fill: var(--primary);
  stroke: var(--primary);
}
#playerLikeBtn.is-liked {
  color: var(--primary);
}
#playerLikeBtn {
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}
/* ================================================
   melon.html 样式（从内联样式迁移而来）
   ================================================ */

/* 标签行（在容器内，与作者卡片下方对齐） */
.player-source-tags-wrap .player-tags-row {
  margin-top: 10px;
}
.player-tags-row {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.player-tags-row::-webkit-scrollbar { display: none; }
.player-tags-row { -ms-overflow-style: none; }
.player-tag-item {
  flex-shrink: 0;
  background: var(--bg);
  color: var(--primary);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-weight: 600;
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* 分割线 */
.player-divider {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

/* 评论区域 */
.player-cmt-panel {
  padding: 18px 0 10px;
}
.player-cmt-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.player-cmt-panel-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
}
.player-cmt-panel-header-left .material-symbols-outlined {
  font-size: 18px;
}
.player-cmt-panel-sort-text {
  font-size: 12px;
  color: var(--muted);
}
.player-cmt-panel-end {
  padding-top: 32px;
  padding-bottom: 16px;
  display: flex;
  justify-content: center;
}
.player-cmt-panel-end-text {
  font-size: 12px;
  color: var(--muted);
}

/* 评论列表底部：解锁查看全部（B 站式浅灰信息条标签） */
.player-cmt-panel-end-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #61666d;
  background: #f4f4f5;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.player-cmt-panel-end-btn:hover {
  background: #e8e9ed;
  color: #18191c;
}
.player-cmt-panel-end-btn:active {
  transform: scale(0.98);
  opacity: 0.92;
}
.player-cmt-panel-end-btn:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}
.player-cmt-panel-end-btn__ico {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.9;
}

/* player-page 主内容预留底部导航高度（bottom-nav 60px） */
.player-page:has(.bottom-nav) .player-body {
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}

/* 底部播放栏 */
.bottom-player-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}
.bottom-player-bar-btn {
  background: linear-gradient(135deg, #fb7299, #d94674);
  border-radius: 9999px;
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(219, 71, 116, 0.3);
  transition: transform 0.15s ease;
}
.bottom-player-bar-btn:active { transform: scale(0.97); }
.bottom-player-bar-btn .material-symbols-outlined {
  margin-right: 8px;
  font-variation-settings: 'FILL' 1;
  font-size: 22px;
}

/* 作者来源卡片 + 标签统一容器 */
.player-source-tags-wrap {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}

/* 官方来源卡片（移除独立背景/边框，由外层容器承担） */
.player-source-card {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
}
.player-source-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.player-source-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.player-source-avatar-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(251, 114, 153, 0.2);
  flex-shrink: 0;
}
.player-source-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-source-info {
  display: flex;
  flex-direction: column;
}
.player-source-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-source-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.player-source-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
}
.player-source-desc {
  font-size: 11px;
  margin-top: 2px;
  color: var(--muted);
}
.player-source-follow-btn {
  font-size: 11px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.player-source-follow-btn:active { transform: scale(0.95); }
.player-source-follow-btn.followed {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}

/* Material Icons 尺寸工具类 */
.mat-icon { font-size: 20px; }
.mat-icon-lg { font-size: 24px; }

/* SVIP 评论徽章 */
.player-cmt-badge--vip {
  color: #fb7185;
}

/* 评论回复按钮 */
.player-cmt-replies-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 10px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  background: var(--bg);
  color: var(--muted);
  border: none;
}

/* 评论子信息（位置+时间） */
.player-cmt-subline {
  font-size: 10px;
  color: var(--muted);
}

/* 评论点赞数字 */
.player-cmt-likes-count {
  font-size: 10px;
  color: var(--muted);
}

/* ================================================
   END melon.html 样式
   ================================================ */

/* 吃瓜页标签项（替代 Tailwind 类） */
.melon-tag-item {
  flex-shrink: 0;
  background: var(--bg);
  color: var(--primary);
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 9999px;
  font-weight: 600;
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* ================================================
   melon.html 视觉优化（.melon-detail-page 作用域）
   ================================================ */

/* 内容区：加宽内距，呼吸感更好 */
.melon-detail-page .player-body {
  padding: 20px 16px 24px;
}

/* 标题：强化视觉层级 */
.melon-detail-page .player-title {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

/* 元信息行：胶囊化处理，柔和辨识度 */
.melon-detail-page .player-meta-row {
  gap: 6px 8px;
  font-size: 11px;
}
.melon-detail-page .melon-rank-fire {
  background: rgba(251, 114, 153, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: #e11d48;
  font-weight: 700;
}
.melon-detail-page .player-meta-views-with-icon,
.melon-detail-page .player-meta-time-plain {
  background: rgba(107, 114, 128, 0.06);
  padding: 3px 10px;
  border-radius: 999px;
}

/* 作者来源容器：白卡 + 微阴影（覆盖默认灰底） */
.melon-detail-page .player-source-tags-wrap {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(231, 237, 244, 0.8);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.04);
  text-align: left;
}

/* 头像：与昵称字号视觉同阶（略小于旧版 44px，避免头重脚轻） */
.melon-detail-page .player-source-avatar-wrap {
  width: 34px;
  height: 34px;
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #fb7299 0%, #f43f5e 100%) border-box;
}

/* 作者名与头像同阶：约等于头像可视高度内的排版 */
.melon-detail-page .player-source-name {
  font-size: 15px;
  line-height: 34px;
  font-weight: 800;
}
.melon-detail-page .player-source-name-row {
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
}
/* 头像与首行昵称顶对齐，多行简介时不把头像垂直拉到整块中间 */
.melon-detail-page .player-source-author {
  align-items: flex-start;
}
/* 昵称+简介列：显式 class，避免 #text 空白节点导致 nth-child 选错 */
.melon-detail-page .player-source-main {
  flex: 1;
  min-width: 0;
  text-align: left;
}
/* 情报摘要条（红前缀 + 灰正文，无整块底色） */
.melon-detail-page .melon-teaser {
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 0 0;
  text-align: left;
}
.melon-detail-page .melon-teaser-line1 {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
}
.melon-detail-page .melon-teaser-icon {
  margin-right: 2px;
  font-size: 14px;
  vertical-align: -0.1em;
}
.melon-detail-page .melon-teaser-prefix {
  color: #ff3b47;
  font-weight: 700;
}
.melon-detail-page .melon-teaser-story {
  color: #b0b0b0;
  font-weight: 400;
}
.melon-detail-page .melon-teaser-line2 {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #b0b0b0;
  font-weight: 400;
}

/* 标签行：粉调强化 */
.melon-detail-page .player-tags-row {
  margin-top: 14px;
}
.melon-detail-page .melon-tag-item {
  background: rgba(251, 114, 153, 0.06);
  color: #e11d48;
  border-color: rgba(251, 114, 153, 0.15);
  padding: 4px 14px;
  letter-spacing: 0.02em;
}

/* 分割线：更轻柔 */
.melon-detail-page .player-divider {
  margin: 20px 0 0;
  border-top-color: rgba(231, 237, 244, 0.6);
}

/* 评论排序栏：标题加粗 + 最热高亮 */
.melon-detail-page .player-cmt-sort--bar {
  padding: 18px 0 14px;
}
.melon-detail-page .player-cmt-sort-total-label {
  font-size: 15px;
  font-weight: 800;
}
.melon-detail-page .player-cmt-sort-hot-label {
  color: var(--primary);
}

/* 评论项：间距优化 + 分隔线柔化 */
.melon-detail-page .player-cmt-item {
  padding: 14px 0;
  border-bottom-color: rgba(231, 237, 244, 0.5);
  gap: 12px;
}
.melon-detail-page .player-cmt-avatar {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(231, 237, 244, 0.8);
}

/* 评论名：强化 */
.melon-detail-page .player-cmt-name {
  font-weight: 700;
}

/* 评论正文：更舒适的阅读体验 */
.melon-detail-page .player-cmt-text {
  font-size: 13.5px;
  line-height: 1.55;
  margin-top: 6px;
  color: #374151;
}

/* 评论子信息行间距 */
.melon-detail-page .player-cmt-subline {
  margin-top: 2px;
  margin-bottom: 4px;
}

/* 点赞按钮：hover 柔粉底 */
.melon-detail-page .player-cmt-like {
  align-self: center;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.melon-detail-page .player-cmt-like:hover {
  background: rgba(251, 114, 153, 0.06);
}

/* 置顶评论 */
.player-cmt-item--pinned {
  cursor: pointer;
}
.player-cmt-pinned-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.melon-detail-page .player-cmt-pinned-avatar {
  width: 36px;
  height: 36px;
}
.player-cmt-tiktok-note {
  font-size: 20px;
  color: #fff;
  line-height: 1;
}
.player-cmt-pinned-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #e11d48;
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.4;
  vertical-align: middle;
}
.player-cmt-pinned-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary, #fb7299);
}
.player-cmt-replies-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: #5b9bd5;
  margin-top: 8px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
.player-cmt-replies-link:hover {
  text-decoration: underline;
}

/* 吃瓜页弹窗去掉 scale 动画避免模糊 */
.melon-detail-page .player-code-overlay:not(.hidden) .player-unlock-modal {
  animation: none;
  opacity: 1;
  transform: none;
}

/* 吃瓜页与播放页统一为浅灰标签样式（见 .player-cmt-panel-end-btn） */

/* 移动端补偿 */
@media (max-width: 639px) {
  .melon-detail-page .player-body { padding: 16px 14px 24px; }
  .melon-detail-page .player-title { font-size: 16px; }
}

/* ================================================
   mine.html — 指挥官归队（对齐参考站布局，浅底 #f6f8fa）
   ================================================ */
body.mine-page {
  min-height: 100vh;
  padding-bottom: 72px;
  background: var(--bg);
  color: var(--text);
}

.mine-topbar {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px;
  display: flex;
  align-items: center;
}

.mine-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  color: #334155;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.mine-back:hover {
  background: #fff;
}

.mine-back:active {
  transform: scale(0.96);
}

.mine-back-icon {
  width: 22px;
  height: 22px;
  margin-left: -2px;
}

.mine-main {
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 20px 36px;
  background: var(--bg);
  position: relative;
  z-index: 0;
}

.mine-brand {
  text-align: center;
  margin-bottom: 28px;
}

.mine-app-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.mine-app-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.35) 0%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.mine-app-icon {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #312e81 0%, #4c1d95 45%, #831843 100%);
  box-shadow:
    0 12px 32px rgba(79, 70, 229, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.mine-app-rocket {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(125, 211, 252, 0.45));
}

.mine-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

.mine-status-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0d9488;
}

.mine-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #2dd4bf, #14b8a6);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.75);
  flex-shrink: 0;
}

.mine-form {
  width: 100%;
}

.mine-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 14px;
  min-height: 52px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mine-field-ico {
  flex-shrink: 0;
  color: #94a3b8;
  display: flex;
  align-items: center;
}

.mine-field-ico--shield {
  color: #7dd3fc;
}

.mine-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  color: #0f172a;
  outline: none;
  padding: 14px 0;
  font-family: inherit;
}

.mine-input::placeholder {
  color: #94a3b8;
}

.mine-input--flex {
  padding-right: 4px;
}

.mine-eye {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: -6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
}

.mine-eye:hover {
  color: #334155;
  background: rgba(148, 163, 184, 0.12);
}

.mine-eye .hidden {
  display: none !important;
}

.mine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.mine-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: #334155;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.mine-remember input {
  width: 17px;
  height: 17px;
  accent-color: #14b8a6;
  cursor: pointer;
}

.mine-forgot {
  background: none;
  border: none;
  padding: 6px 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
}

.mine-forgot:hover {
  text-decoration: underline;
}

.mine-form-msg {
  min-height: 1.25rem;
  margin: 8px 0 12px;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--muted);
}

.mine-form-msg--err {
  color: #ef4444;
}

.mine-form-msg--ok {
  color: #0d9488;
  font-weight: 600;
}

.mine-submit {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  background: linear-gradient(135deg, #fb7185 0%, #fb7299 40%, #e11d48 100%);
  box-shadow: 0 8px 24px rgba(251, 114, 153, 0.4);
  letter-spacing: 0.06em;
}

.mine-submit:active {
  transform: scale(0.99);
}

.mine-divider {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 26px 0 16px;
  letter-spacing: 0.02em;
}

.mine-gift {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #5eead4;
  background: rgba(255, 255, 255, 0.85);
  color: #0f766e;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(45, 212, 191, 0.12);
}

.mine-gift-ico {
  display: flex;
  color: #14b8a6;
}

.mine-gift:hover {
  background: #f0fdfa;
  border-color: #2dd4bf;
}

.mine-gift:active {
  transform: scale(0.99);
}

.mine-secure {
  text-align: center;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: #94a3b8;
  margin: 28px 0 0;
}

.mine-modal-card.modal-card {
  max-width: 360px;
}

/* ========== 解锁后视频区→「无法在本页播放」遮罩 ========== */
.player-stage:has(.player-blocked-overlay:not(.hidden)) .player-stage-poster {
  filter: blur(14px);
  transform: scale(1.06);
  opacity: 0.55;
}
/* z-index 高于 .player-stage-ui(25)；上下留白避免盖住返回钮与底栏；无整层底色（仅中间文案区） */
.player-blocked-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 50px;
  bottom: 56px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: transparent;
}
.player-blocked-overlay.hidden {
  display: none;
}
.player-stage:has(.player-blocked-overlay:not(.hidden)) .player-play-icon {
  visibility: hidden;
}
.player-blocked-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}
.player-blocked-icon {
  margin-bottom: 4px;
}
.player-blocked-icon svg {
  width: 30px;
  height: 30px;
}
.player-blocked-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 0, 0, 0.55);
}
.player-blocked-desc {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 8px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.player-blocked-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 48px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9, #5b21b6);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(124, 58, 237, 0.4);
}
.player-blocked-btn-main {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.player-blocked-btn-sub {
  font-size: 0.62rem;
  opacity: 0.7;
}
.player-blocked-btn:active {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

