/* =========================================================
   LUSHE Theme Lite - Dark Homepage Layer
   在原 style.css 之上做覆盖，不修改原文件本身。
   风格参考：Netflix / Apple TV / Disney+ 的深色极简语言。
   ========================================================= */

:root {
  --lushe-bg: #0b0b0d;
  --lushe-bg-elevated: #161619;
  --lushe-text: #f2f2f3;
  --lushe-text-dim: #a5a5aa;
  --lushe-accent: #e50914;
  --lushe-border: rgba(255, 255, 255, 0.08);
  --lushe-glass: rgba(20, 20, 22, 0.6);
  --lushe-radius: 10px;
}

/* ---------- 基础底色 ---------- */
body,
.homepage,
.homepage .main,
.homepage .content,
.page,
.page .main {
  background: var(--lushe-bg) !important;
  color: var(--lushe-text);
}

a { color: inherit; }

/* ---------- 固定导航（本身已是 position:fixed，这里只做玻璃质感） ---------- */
.header,
.sidebar {
  background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%) !important;
  border-bottom: none;
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}

.sidebar.sidebar-bg,
.header.sidebar-bg {
  background: var(--lushe-glass) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--lushe-border);
}

.navbar-item .links,
.logo a,
.header-op-list-btn,
.mac_user {
  color: var(--lushe-text) !important;
}

/* ---------- 修复删除搜索框后"观看记录/登录"挤到左边的问题 ---------- */
.header-op {
  margin-left: auto !important;
}

.search-input {
  background: rgba(255,255,255,0.08) !important;
  color: var(--lushe-text) !important;
  border-radius: 20px !important;
}

/* ---------- Hero Banner ---------- */
.container-slide {
  margin: 0 0 30px;
}

.container-slide .swiper-big {
  width: 100%;
}

.container-slide .swiper-big,
.container-slide .swiper-big .swiper-wrapper,
.container-slide .swiper-big .swiper-slide {
  height: 46vw;
  max-height: 620px;
  min-height: 320px;
}

.container-slide .banner {
  position: relative;
  height: 100%;
  border-radius: 0;
  display: block;
}

.container-slide .banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 55%, var(--lushe-bg) 100%),
              linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 55%);
  pointer-events: none;
}

.mobile-v-info {
  position: absolute;
  left: 5%;
  bottom: 12%;
  right: 5%;
  z-index: 2;
  color: #fff;
}

.mobile-v-info .v-title span {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.mobile-v-info .v-ins p {
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  max-width: 560px;
  margin-top: 6px;
}

.v-cta {
  margin-top: 18px;
  display: flex;
  gap: 12px;
}

.v-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.v-cta-play {
  background: #fff;
  color: #111 !important;
}

.v-cta-detail {
  background: rgba(255,255,255,0.18);
  color: #fff !important;
  backdrop-filter: blur(6px);
}

.v-cta-btn:hover { opacity: 0.85; }

.sm-swiper .swiper-small { display: none; } /* 只隐藏缩略图预览条，Netflix/Apple TV 风格不需要 */

.sm-swiper {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 5;
  pointer-events: none;
}

.sm-swiper .swiper-button-prev,
.sm-swiper .swiper-button-next {
  pointer-events: auto;
  top: -230px;
  opacity: 0.7;
}

.sm-swiper .swiper-button-prev:hover,
.sm-swiper .swiper-button-next:hover { opacity: 1; }

.sm-swiper .swiper-pagination {
  pointer-events: auto;
  position: static;
  text-align: center;
}

/* ---------- 内容模块（热门推荐 / 最近更新 / 分类推荐 通用） ---------- */
.module-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4vw;
}

.module-title {
  color: var(--lushe-text) !important;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.module-title-en {
  color: var(--lushe-text-dim) !important;
  font-size: 12px;
  margin-left: 8px;
}

.module-heading-more {
  color: var(--lushe-text-dim) !important;
}

.module-main,
.module-items {
  padding: 0 4vw;
}

/* 海报卡片：圆角 + 悬浮放大，Netflix/Disney+ 卡片手感 */
.module-poster-item {
  border-radius: var(--lushe-radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: var(--lushe-bg-elevated);
}

.module-poster-item:hover {
  transform: translateY(-4px) scale(1.035);
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
  z-index: 3;
}

.module-item-cover,
.module-item-pic,
.module-item-pic img {
  border-radius: var(--lushe-radius);
}

.module-poster-item-title {
  color: var(--lushe-text) !important;
  font-size: 13px;
}

.module-item-note {
  background: rgba(0,0,0,0.65);
  color: #fff;
  border-radius: 4px;
}

/* ---------- 广告位（顶部 / 中部 / 底部）---------- */
.lushe-ad-slot {
  margin: 24px 4vw;
  border-radius: var(--lushe-radius);
  overflow: hidden;
}

.lushe-ad-slot:empty {
  display: none;
  margin: 0;
}

/* ---------- 合作伙伴 Logo 滚动墙（三排） ---------- */
.lushe-partners-title {
  margin: 20px 4vw 14px;
  padding: 14px 20px;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  border-radius: var(--lushe-radius);
  background: linear-gradient(90deg, #7b2ff7, #f107a3);
}

.lushe-partners {
  margin: 20px 4vw 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lushe-partners-row {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.lushe-partners-track {
  display: flex;
  width: max-content;
  animation: lushe-marquee 32s linear infinite;
}

.lushe-partners-row-reverse .lushe-partners-track {
  animation-direction: reverse;
  animation-duration: 26s;
}

.lushe-partners-row:hover .lushe-partners-track {
  animation-play-state: paused;
}

.lushe-partner-item {
  width: 72px;
  height: 72px;
  margin: 0 12px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--lushe-bg-elevated);
  border: 1px solid var(--lushe-border);
  flex-shrink: 0;
}

.lushe-partner-item:empty {
  display: none;
}

.lushe-partner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes lushe-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 767px) {
  .lushe-partner-item { width: 56px; height: 56px; margin: 0 8px; }
}

/* ---------- 顶部横幅广告行 ---------- */
.lushe-banner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 4vw 0;
}

.lushe-banner-item {
  flex: 1 1 260px;
  border-radius: var(--lushe-radius);
  overflow: hidden;
}

.lushe-banner-item:empty {
  display: none;
}

.lushe-banner-item img {
  width: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .lushe-partners-track {
    animation: none;
  }
}

/* ---------- 页脚 ---------- */
.footer,
.footer-content,
.foot-copyright {
  background: var(--lushe-bg) !important;
  color: var(--lushe-text-dim) !important;
  border-top: 1px solid var(--lushe-border);
}

.foot-copyright a { color: var(--lushe-text-dim) !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .container-slide .swiper-big,
  .container-slide .swiper-big .swiper-wrapper,
  .container-slide .swiper-big .swiper-slide,
  .container-slide .banner { height: 56vw; }
}

@media (max-width: 767px) {
  .container-slide .swiper-big,
  .container-slide .swiper-big .swiper-wrapper,
  .container-slide .swiper-big .swiper-slide,
  .container-slide .banner { height: 62vw; min-height: 260px; }
  .mobile-v-info .v-title span { font-size: 22px; }
  .mobile-v-info { bottom: 8%; }
  .module-heading, .module-main, .module-items { padding: 0 16px; }
  .lushe-ad-slot { margin: 16px; }
}

/* =========================================================
   Stage 3 - 分类页 / 搜索页 / 详情页 / 播放页
   ========================================================= */

/* ---------- 分类页：筛选 + 排序 (vod/screen.html) ---------- */
.module-class-items {
  padding: 10px 4vw;
  border-bottom: 1px solid var(--lushe-border);
}

.module-item-title {
  color: var(--lushe-text-dim);
  font-size: 13px;
  margin-bottom: 6px;
}

.module-item-box a {
  display: inline-block;
  padding: 4px 12px;
  margin: 3px 6px 3px 0;
  border-radius: 16px;
  font-size: 13px;
  color: var(--lushe-text-dim) !important;
  background: rgba(255,255,255,0.05);
}

.module-item-box a.active,
.module-item-box a:hover {
  color: #fff !important;
  background: var(--lushe-accent);
}

/* ---------- 分页 (public/paging.html) ---------- */
#page {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 30px 4vw;
  flex-wrap: wrap;
}

#page .page-link {
  min-width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  border-radius: 6px;
  color: var(--lushe-text-dim) !important;
  background: var(--lushe-bg-elevated);
  padding: 0 10px;
}

#page .page-current {
  background: var(--lushe-accent);
  color: #fff !important;
}

/* ---------- 搜索页 ---------- */
.module-heading-search-result {
  color: var(--lushe-text);
  padding: 0 4vw;
}

.module-heading-search-result strong {
  color: var(--lushe-accent);
}

.lushe-search-assist {
  padding: 4px 4vw 14px;
}

.lushe-search-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.lushe-search-label {
  color: var(--lushe-text-dim);
  font-size: 12px;
  min-width: 60px;
}

.lushe-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lushe-search-tag {
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: var(--lushe-text-dim) !important;
  font-size: 12px;
}

.lushe-search-tag:hover { color: #fff !important; background: var(--lushe-accent); }

.lushe-search-clear {
  color: var(--lushe-text-dim);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.module-card-item {
  background: var(--lushe-bg-elevated);
  border-radius: var(--lushe-radius);
  overflow: hidden;
}

.module-card-item-title strong,
.module-card-item-info { color: var(--lushe-text) !important; }

/* ---------- 详情页 (vod/desc.html) ---------- */
.module-info {
  padding: 0 4vw;
}

.module-info-heading h1 { color: var(--lushe-text); }

.module-info-tag-link a { color: var(--lushe-text-dim) !important; }

.module-info-tag-link {
  background: var(--lushe-bg-elevated) !important;
}

.module-info-item-title { color: var(--lushe-text-dim) !important; }

.module-info-item-content,
.module-info-item-content a { color: var(--lushe-text) !important; }

.module-info-introduction-content p { color: var(--lushe-text-dim); line-height: 1.7; }

.module-item-pic img,
.module-info-poster .module-item-cover {
  border-radius: var(--lushe-radius);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

.main-btn,
.btn-large,
.btn-collect {
  border-radius: 6px !important;
}

/* ---------- 播放页 (vod/play_list.html) ---------- */
.module-player-handle-item .handle-btn {
  color: var(--lushe-text-dim);
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  padding: 6px 14px;
}

.module-player-handle-item .handle-btn:hover { color: #fff; }

.module-player-handle-item .btn-collect {
  background: rgba(255,255,255,0.05) !important;
  padding: 6px 14px !important;
  border-radius: 16px !important;
  color: var(--lushe-text-dim) !important;
  white-space: nowrap;
}

.lushe-like-btn.liked {
  color: var(--lushe-accent) !important;
  background: rgba(229,9,20,0.12);
}

.module-play-list-link {
  border-radius: 6px;
  color: var(--lushe-text-dim) !important;
  background: var(--lushe-bg-elevated);
}

.module-play-list-link.active {
  background: var(--lushe-accent) !important;
  color: #fff !important;
}

.module-play-list-link:hover {
  background: rgba(229,9,20,0.18) !important;
  color: var(--lushe-accent) !important;
}

.module-tab-item {
  color: var(--lushe-text-dim) !important;
}

.module-tab-item.active {
  background: var(--lushe-accent) !important;
  color: #fff !important;
}

/* ---------- 修复骨架屏加载动画的浅色配色 ---------- */
.skeleton-bg,
.skeleton .module-poster-item-title,
.skeleton .module-card-item-title,
.skeleton .module-info-item span,
.skeleton .module-card-item-footer span,
.skeleton.module-play-list-link {
  background: linear-gradient(90deg, var(--lushe-bg-elevated) 25%, #232326 37%, var(--lushe-bg-elevated) 63%) !important;
  background-size: 400% 500% !important;
}

.skeleton .module-item-cover {
  background: linear-gradient(90deg, transparent 25%, #232326 37%, transparent 63%) !important;
  background-size: 400% 500% !important;
}

/* ---------- 修复详情页简介卡片、选集按钮容器的白色背景 ---------- */
.module-info-content {
  background: var(--lushe-bg-elevated) !important;
}

.module-list {
  background: transparent !important;
}

/* ---------- 修复播放页右侧信息面板的浅灰色背景 ---------- */
.module-player-info,
.module-player-side {
  background: var(--lushe-bg-elevated) !important;
}

.player-heading {
  background: var(--lushe-bg-elevated) !important;
}

.module-player-handle-items {
  border-top-color: var(--lushe-border) !important;
  background: var(--lushe-bg-elevated) !important;
}

.player-box {
  background: var(--lushe-bg) !important;
}

/* ---------- 修复手机端"XX首页/XX库"标签行背景（手机端专属规则，跟桌面端不是同一条） ---------- */
.module-heading-tab {
  background: transparent !important;
}

.module-heading-tab::after {
  background: var(--lushe-border) !important;
}

.MacPlayer,
.player-box-main {
  border-radius: var(--lushe-radius);
  overflow: hidden;
  background: #000;
}

/* =========================================================
   Stage 4 - 视觉收尾：圆角 / 毛玻璃 / 动画
   ========================================================= */

/* ---------- 下拉面板 / 弹层统一毛玻璃 + 圆角（只在实际展开时生效，平时保持透明不可见） ---------- */
.drop:hover .drop-content,
.searchbar-main.open .search-recommend,
.module-tab-items {
  background: var(--lushe-glass) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--lushe-radius) !important;
  border: 1px solid var(--lushe-border);
}

.popup,
.popup-tips {
  background: var(--lushe-bg-elevated) !important;
  border-radius: 14px !important;
  border: 1px solid var(--lushe-border);
}

/* ---------- 圆角统一：按钮 / 输入框 / 标签 ---------- */
button,
input,
textarea,
.handle-btn,
.module-tab-name,
.search-input {
  border-radius: 8px;
}

/* ---------- 轻量入场动画 ---------- */
@keyframes lushe-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.module {
  animation: lushe-fade-up 0.5s ease both;
}

.module-poster-item {
  animation: lushe-fade-up 0.4s ease both;
}

.v-cta-btn,
.module-item-box a,
.lushe-search-tag,
#page .page-link {
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.v-cta-btn:active { transform: scale(0.97); }

/* ---------- 减少动态效果（无障碍：尊重用户系统设置）---------- */
@media (prefers-reduced-motion: reduce) {
  .module,
  .module-poster-item,
  .module-poster-item:hover {
    animation: none;
    transition: none;
    transform: none;
  }
}

/* ---------- 站点副标题（Logo 旁边） ---------- */
.lushe-site-subtitle {
  display: inline-block;
  margin-left: 10px;
  font-size: 13px;
  color: var(--lushe-text-dim);
  vertical-align: middle;
}

.lushe-site-subtitle:empty {
  display: none;
}

/* ---------- Logo 放大（原主题给固定24px高，文字版Logo太小看不清） ---------- */
.logo {
  height: 40px !important;
  display: flex !important;
  align-items: center;
  flex-shrink: 0;
}

.logo a {
  height: 40px !important;
  display: flex !important;
  align-items: center;
}

.logo img {
  height: 40px !important;
  max-height: 40px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain;
}

/* ---------- 修复手机端首页头部被设计成220px大横幅的问题 ---------- */
@media (max-width: 559px) {
  .homepage .header {
    height: auto !important;
    padding: 12px 15px !important;
  }

  .homepage:after {
    background: none !important;
    height: 0 !important;
  }

  .logo {
    display: none !important;
  }
}

@media (min-width: 559px) and (max-width: 1024px) {
  .logo a {
    width: auto !important;
    overflow: visible !important;
  }
}

/* ---------- 修复"回到顶部"悬浮按钮的白色背景（原浅色主题遗留） ---------- */
.fixedGroup {
  background-color: var(--lushe-bg-elevated) !important;
  border: 1px solid var(--lushe-border);
}

.fixedGroup .fixedGroup-item:hover i {
  background-color: rgba(255,255,255,0.08) !important;
}

.fixedGroup .fixedGroup-item i {
  color: var(--lushe-text);
}

/* ---------- 修复底部"友情链接"标题的浅色背景块（原浅色主题遗留） ---------- */
.links-list {
  border-top-color: var(--lushe-border) !important;
}

.links-list .module-heading {
  background: var(--lushe-bg) !important;
}

.links-list h3 {
  color: var(--lushe-text);
}

.links-list-go {
  color: var(--lushe-text-dim) !important;
}

/* ---------- 修复分类页"XX首页/XX库"切换标签文字颜色（原浅色主题配色，深色下选中态几乎不可见） ---------- */
.module-heading-tab-link {
  color: var(--lushe-text-dim) !important;
}

.module-heading-tab .module-heading-tab-link.active {
  color: var(--lushe-text) !important;
}

.module-heading-tab .line {
  background: var(--lushe-border) !important;
}

.module-heading-tab-link {
  font-size: 20px !important;
}

/* ---------- 站点公告条 ---------- */
.lushe-announcement {
  margin: 0 4vw 16px;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(229,9,20,0.1);
  border: 1px solid rgba(229,9,20,0.25);
  color: #ffb3b3;
  font-size: 13px;
  line-height: 1.6;
}

.lushe-announcement:empty {
  display: none;
  margin: 0;
}

/* ---------- 修复左侧分类栏"选中项"的白色装饰块（原浅色主题遗留，深色下会穿帮） ---------- */
.radian::before,
.navbar-item.active::before,
.radian .links::before,
.navbar-item.active .links::before {
  background: var(--lushe-bg) !important;
}

.radian::after,
.navbar-item.active::after,
.radian .links::after,
.navbar-item.active .links::after {
  background: var(--lushe-bg-elevated) !important;
}

@media (min-width: 559px) {
  .navbar-item.active::before,
  .navbar-item.active .links::before {
    border-color: var(--lushe-border) !important;
  }

  .navbar-item.active {
    background: linear-gradient(to right, var(--lushe-bg) 0%, var(--lushe-bg-elevated) 90%, var(--lushe-bg) 90%) !important;
  }

  .navbar-item.active a {
    background: linear-gradient(to right, var(--lushe-bg) 0%, var(--lushe-bg) 90%) !important;
  }
}
@media (min-width: 559px) {
  .sidebar {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }
}
