/**
 * 极简视界 (v_clean) - 苹果CMS v10 影视模板全局核心样式
 * 风格：极简、现代流媒体 (Netflix / Apple TV+ 风格)
 * 支持：深色模式 (默认) / 浅色模式切换、全端响应式
 */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  
  /* 深色主题色（默认） */
  --bg-body: #0b0c11;
  --bg-surface: #13151f;
  --bg-elevated: #1a1d29;
  --bg-card: #161824;
  --bg-glass: rgba(19, 21, 31, 0.78);
  --bg-glass-card: rgba(26, 29, 41, 0.65);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.06);
  --border-active: rgba(0, 229, 155, 0.45);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent: #00e59b;
  --accent-hover: #00c985;
  --accent-gradient: linear-gradient(135deg, #00e59b 0%, #00b4d8 100%);
  --accent-glow: rgba(0, 229, 155, 0.28);
  
  --gold: #ffb800;
  --gold-glow: rgba(255, 184, 0, 0.25);
  --danger: #ff4757;
  --danger-hover: #e03948;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 4px 20px var(--accent-glow);
  
  --header-height: 72px;
  --container-max: 1560px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 浅色主题变量 */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-glass-card: rgba(255, 255, 255, 0.75);
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.06);
  --border-active: rgba(0, 180, 120, 0.4);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent: #00b87a;
  --accent-hover: #009e67;
  --accent-gradient: linear-gradient(135deg, #00b87a 0%, #0284c7 100%);
  --accent-glow: rgba(0, 184, 122, 0.2);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.main-content {
  flex: 1;
  padding-top: var(--header-height);
  position: relative;
}

/* ==========================================================================
   全局顶部导航 (Header)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  background: transparent;
}

.site-header.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.site-logo svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.site-logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 主导航菜单 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  background: rgba(0, 0, 0, 0.06);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

/* 导航右侧工具条 */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 搜索胶囊 */
.search-box {
  position: relative;
  width: 240px;
  transition: width 0.3s ease;
}

.search-box:focus-within {
  width: 300px;
}

.search-form {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  transition: var(--transition);
}

.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input {
  width: 100%;
  padding-left: 8px;
  font-size: 14px;
  color: var(--text-primary);
}

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

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.search-btn:hover {
  color: var(--accent);
}

/* 图标按钮通用 */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  transform: translateY(-1px);
}

/* 观影历史弹窗 */
.history-dropdown {
  position: relative;
}

.history-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 110;
}

.history-dropdown:hover .history-popover,
.history-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.history-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.history-popover-head h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.history-clear-btn {
  font-size: 12px;
  color: var(--text-muted);
}

.history-clear-btn:hover {
  color: var(--danger);
}

.history-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  font-size: 13px;
  transition: var(--transition);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.history-title {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.history-part {
  font-size: 11px;
  color: var(--accent);
  margin-left: 6px;
}

.history-empty {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* 移动端菜单按钮 */
.mobile-nav-toggle {
  display: none;
}

/* ==========================================================================
   首页 Grand Hero 焦点图轮播
   ========================================================================== */
.hero-slider-section {
  position: relative;
  margin-bottom: 48px;
  overflow: hidden;
}

.hero-slider-wrap {
  position: relative;
  width: 100%;
  height: 580px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.85);
  transform: scale(1.02);
  transition: transform 6s ease;
}

.hero-slide.active .hero-backdrop-img {
  transform: scale(1.08);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11, 12, 17, 0.95) 0%,
    rgba(11, 12, 17, 0.8) 35%,
    rgba(11, 12, 17, 0.4) 65%,
    rgba(11, 12, 17, 0.1) 100%
  ),
  linear-gradient(
    0deg,
    rgba(11, 12, 17, 1) 0%,
    rgba(11, 12, 17, 0.4) 40%,
    transparent 100%
  );
}

[data-theme="light"] .hero-gradient-overlay {
  background: linear-gradient(
    90deg,
    rgba(248, 250, 252, 0.98) 0%,
    rgba(248, 250, 252, 0.85) 35%,
    rgba(248, 250, 252, 0.35) 65%,
    rgba(248, 250, 252, 0.05) 100%
  ),
  linear-gradient(
    0deg,
    rgba(248, 250, 252, 1) 0%,
    rgba(248, 250, 252, 0.4) 40%,
    transparent 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 60px;
  left: 60px;
  max-width: 620px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-tag.rating {
  background: var(--gold);
  color: #000;
  border: none;
}

.badge-tag.category {
  background: var(--accent);
  color: #000;
  border: none;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #000000;
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* 轮播指示点 */
.hero-slider-dots {
  position: absolute;
  bottom: 24px;
  right: 48px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.35);
  transition: var(--transition);
  cursor: pointer;
}

.slider-dot.active {
  width: 32px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

/* ==========================================================================
   影视版块通用标题与Tab (Section Header)
   ========================================================================== */
.section-wrap {
  margin-bottom: 48px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-icon {
  width: 6px;
  height: 22px;
  border-radius: var(--radius-xs);
  background: var(--accent-gradient);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.section-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

.section-more-link:hover {
  color: var(--accent);
  transform: translateX(3px);
}

/* ==========================================================================
   Netflix 风格 TOP 10 热榜
   ========================================================================== */
.top10-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.top10-card {
  position: relative;
  display: flex;
  border-radius: var(--radius-lg);
  overflow: visible;
  padding-left: 45px;
}

.top10-num {
  position: absolute;
  left: -15px;
  bottom: -10px;
  font-size: 96px;
  font-weight: 900;
  line-height: 1;
  font-family: Impact, "Arial Black", sans-serif;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.4);
  text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 2;
  transition: var(--transition);
}

[data-theme="light"] .top10-num {
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.35);
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
}

.top10-card:hover .top10-num {
  -webkit-text-stroke-color: var(--accent);
  transform: scale(1.08) translateY(-4px);
}

/* ==========================================================================
   电影/剧集海报卡片 (Vod Card Grid)
   ========================================================================== */
.vod-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.vod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.vod-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.vod-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.vod-card:hover .vod-card-thumb {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md), 0 0 16px var(--accent-glow);
  border-color: var(--border-active);
}

.vod-card:hover .vod-card-img {
  transform: scale(1.06);
}

/* 卡片浮动徽章 */
.card-badge {
  position: absolute;
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  z-index: 2;
  pointer-events: none;
}

.card-badge.top-left {
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--gold);
}

.card-badge.top-right {
  top: 8px;
  right: 8px;
  background: var(--accent-gradient);
  color: #000;
  font-weight: 700;
}

.card-badge.bottom-right {
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
}

/* 悬浮播放按钮微层 */
.card-hover-play {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.play-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vod-card:hover .card-hover-play {
  opacity: 1;
}

.vod-card:hover .play-icon-circle {
  transform: scale(1);
}

/* 卡片文案 */
.vod-card-info {
  margin-top: 10px;
}

.vod-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition);
}

.vod-card:hover .vod-card-title {
  color: var(--accent);
}

.vod-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   多维筛选栏 (Filter Bar)
   ========================================================================== */
.filter-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  padding-top: 4px;
  min-width: 44px;
}

.filter-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
}

.filter-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .filter-pill:hover {
  background: rgba(0, 0, 0, 0.06);
}

.filter-pill.active {
  background: var(--accent-gradient);
  color: #000;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   影视详情页 (Detail Hero & Playlists)
   ========================================================================== */
.detail-hero-section {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 40px;
  padding: 48px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

.detail-backdrop-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(60px) brightness(0.25);
  transform: scale(1.15);
  z-index: 0;
}

[data-theme="light"] .detail-backdrop-blur {
  filter: blur(60px) brightness(0.85);
  opacity: 0.25;
}

.detail-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 40px;
}

.detail-poster-wrap {
  width: 260px;
  flex-shrink: 0;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.detail-meta-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  font-size: 14px;
  background: var(--bg-glass-card);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-subtle);
}

.data-row {
  display: flex;
  gap: 8px;
}

.data-label {
  color: var(--text-muted);
  white-space: nowrap;
}

.data-value {
  color: var(--text-secondary);
}

.data-value a:hover {
  color: var(--accent);
}

.detail-desc-box {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.detail-desc-text {
  position: relative;
}

.detail-desc-text.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.desc-toggle-btn {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  display: inline-block;
}

.detail-actions-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}

/* 播放列表区域 (Playlist Component) */
.playlist-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

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

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

.source-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition);
}

.source-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.source-tab-btn.active {
  background: var(--accent-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.playlist-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.playlist-tool-btn:hover {
  color: var(--text-primary);
}

.episode-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.episode-grid.active {
  display: grid;
}

.episode-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition);
}

.episode-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-active);
  transform: translateY(-1px);
}

.episode-pill.active {
  background: var(--accent-gradient);
  color: #000;
  font-weight: 700;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   播放页 (Play Page / Cinema Mode)
   ========================================================================== */
.player-page-wrap {
  margin-bottom: 48px;
}

.player-cinema-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin-bottom: 24px;
}

.player-main-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.player-frame-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.player-frame-box iframe,
.player-frame-box video {
  width: 100%;
  height: 100%;
  border: none;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.player-info-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.player-current-ep {
  color: var(--accent);
}

.player-tool-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 播放页右侧选集面板 */
.player-sidebar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 560px;
}

.sidebar-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-box-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.player-sidebar-sources {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.player-sidebar-episodes {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-right: 4px;
}

/* ==========================================================================
   搜索页 (Search Results)
   ========================================================================== */
.search-header-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.search-query-highlight {
  color: var(--accent);
  font-weight: 700;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-item-card {
  display: flex;
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

.search-item-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.search-item-thumb {
  width: 140px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.search-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-item-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.search-item-title em {
  font-style: normal;
  color: var(--accent);
}

/* ==========================================================================
   分页组件 (Pagination)
   ========================================================================== */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 48px 0;
}

.page-link,
.page-current,
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition);
}

.page-link:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.page-current {
  background: var(--accent-gradient);
  color: #000;
  font-weight: 700;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.page-ellipsis {
  border: none;
  background: transparent;
  color: var(--text-muted);
}

/* ==========================================================================
   空状态组件 (Empty State)
   ========================================================================== */
.empty-state-wrap {
  text-align: center;
  padding: 64px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  margin: 32px 0;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto 24px;
}

/* ==========================================================================
   全局底部 (Footer)
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 36px;
  margin-top: auto;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand p {
  margin-top: 10px;
  max-width: 380px;
  line-height: 1.7;
}

.footer-links-wrap {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 36px;
  right: 36px;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: var(--transition);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 关灯遮罩 */
.light-off-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  pointer-events: none;
}

.light-off-mask.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.player-frame-box.light-off-target {
  z-index: 99;
  position: relative;
}

/* ==========================================================================
   全新增强 1：全局 Spotlight 即时搜索中枢 (Command Palette)
   ========================================================================== */
.spotlight-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.spotlight-mask.open {
  opacity: 1;
  visibility: visible;
}

.spotlight-modal {
  width: 90%;
  max-width: 640px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 229, 155, 0.15);
  overflow: hidden;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotlight-mask.open .spotlight-modal {
  transform: translateY(0) scale(1);
}

.spotlight-input-bar {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 14px;
}

.spotlight-input-bar svg {
  color: var(--accent);
  flex-shrink: 0;
}

.spotlight-input {
  width: 100%;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
}

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

.spotlight-shortcut-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
}

.spotlight-body {
  max-height: 480px;
  overflow-y: auto;
  padding: 16px 20px;
}

.spotlight-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 10px 0 8px;
}

.spotlight-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.spotlight-tag-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.spotlight-tag-chip:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.spotlight-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spotlight-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.spotlight-result-item:hover,
.spotlight-result-item.selected {
  background: var(--bg-elevated);
}

.spotlight-item-thumb {
  width: 44px;
  height: 60px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card);
}

.spotlight-item-meta {
  flex: 1;
  overflow: hidden;
}

.spotlight-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   全新增强 2：首页 Netflix 同款「继续观看 (Continue Watching)」记忆导轨
   ========================================================================== */
.continue-rail-wrap {
  margin-bottom: 48px;
  display: none; /* 有历史记录时由 JS 自动显示 */
}

.continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.continue-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.continue-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-md);
}

.continue-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-card);
}

.continue-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.continue-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.continue-progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px var(--accent);
}

.continue-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  opacity: 0;
  transition: var(--transition);
  z-index: 3;
}

.continue-card:hover .continue-remove-btn {
  opacity: 1;
}

.continue-remove-btn:hover {
  background: var(--danger);
}

.continue-card-body {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.continue-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.continue-card-ep {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* ==========================================================================
   全新增强 3：手机扫码看 (QR Code Modal)
   ========================================================================== */
.qrcode-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 210;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrcode-modal-mask.open {
  opacity: 1;
  visibility: visible;
}

.qrcode-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.qrcode-modal-mask.open .qrcode-card {
  transform: scale(1);
}

.qrcode-box-wrap {
  width: 180px;
  height: 180px;
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.qrcode-box-wrap canvas,
.qrcode-box-wrap img {
  width: 100%;
  height: 100%;
}

.qrcode-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--text-muted);
}

.qrcode-close-btn:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   全新增强 4：长篇动漫/剧集「集数分页分组器」
   ========================================================================== */
.episode-group-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.episode-group-tabs::-webkit-scrollbar {
  display: none;
}

.episode-group-btn {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}

.episode-group-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.episode-group-btn.active {
  background: var(--accent-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   全新增强 5：线路测速与画质芯片指示标签 (Line Badges)
   ========================================================================== */
.line-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

.line-badge.blue {
  background: rgba(0, 180, 255, 0.15);
  color: #00b4d8;
  border: 1px solid rgba(0, 180, 255, 0.3);
}

.line-badge.green {
  background: rgba(0, 229, 155, 0.15);
  color: #00e59b;
  border: 1px solid rgba(0, 229, 155, 0.3);
}

.line-badge.gold {
  background: rgba(255, 184, 0, 0.15);
  color: #ffb800;
  border: 1px solid rgba(255, 184, 0, 0.3);
}

/* ==========================================================================
   全新增强 6：播放快捷键控制悬浮条
   ========================================================================== */
.player-shortcuts-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.shortcut-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shortcut-chip kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-family: inherit;
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   全新增强 7：智能骨架屏 Shimmer 扫光
   ========================================================================== */
.skeleton-box {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
}

.skeleton-box::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.08) 20%,
    rgba(255, 255, 255, 0.16) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: skeletonShimmer 2s infinite;
}

[data-theme="light"] .skeleton-box::after {
  background-image: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0.04) 20%,
    rgba(0, 0, 0, 0.08) 60%,
    rgba(0, 0, 0, 0)
  );
}

@keyframes skeletonShimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ==========================================================================
   全新功能：追剧周表 / 每日放送时间表 (Weekly Schedule)
   ========================================================================== */
.week-schedule-section {
  margin: 40px 0;
}

.week-nav-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.week-nav-tabs::-webkit-scrollbar {
  display: none;
}

.week-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.week-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.week-tab-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.week-today-tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  line-height: 1.2;
}

.week-panel {
  display: none;
}

.week-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.week-empty-tip {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   全新功能：广告位优雅容器 (Ad Slots)
   ========================================================================== */
.ad-slot-container {
  margin: 24px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: center;
}

.ad-slot-container img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  margin: 0 auto;
}


