:root {
  --primary: var(--primary-raw, #1e88e5);
  --primary-dark: #1565c0;
  --secondary: var(--secondary-raw, #ff9800);
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #888888;
  --border: #ebedf2;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 20px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --header-height: 56px;
  --footer-bg: #1a2332;
  --footer-text: #9aa3ad;
  --gutter: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
}

/* 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
}

.main-nav {
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  white-space: nowrap;
}

.main-nav li a {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.main-nav li a:hover,
.main-nav li a.active {
  color: var(--primary);
  background: rgba(30,136,229,0.08);
}

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

.search-form {
  display: flex;
  position: relative;
  align-items: center;
}

.search-form input {
  width: 140px;
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f5f6fa;
  color: var(--text);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, width 0.2s;
}

@media (min-width: 768px) {
  .search-form input {
    width: 200px;
    padding: 8px 34px 8px 14px;
    font-size: 0.875rem;
  }
}

.search-form input:focus {
  width: 170px;
  background: #fff;
  border-color: var(--primary);
}

@media (min-width: 768px) {
  .search-form input:focus {
    width: 240px;
  }
}

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

.search-form input:focus {
  background: #fff;
  border-color: var(--primary);
}

.search-form button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.mobile-search-toggle,
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
}

.mobile-search-toggle svg,
.mobile-menu-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.mobile-menu-toggle span {
  display: none;
}

@media (min-width: 768px) {
  .mobile-menu-toggle,
  .mobile-search-toggle {
    display: none;
  }
}

@media (max-width: 767px) {
  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 8px var(--gutter) 16px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .main-nav li a {
    padding: 12px 8px;
    border-radius: var(--radius-sm);
  }
  .mobile-menu-toggle {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
  .mobile-menu-toggle svg {
    display: none;
  }
  .mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .mobile-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* 主内容 */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--gutter) 32px;
  min-height: calc(100vh - var(--header-height) - 220px);
}

@media (min-width: 768px) {
  main {
    padding-top: 20px;
  }
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, #1a2a4a 0%, #2d4a7c 100%);
  border-radius: var(--radius);
  padding: 24px var(--gutter);
  margin-bottom: 16px;
  color: #fff;
  text-align: center;
}

.hero-section h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 14px;
  line-height: 1.5;
}

.home-quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.home-quick-links a {
  display: inline-flex;
  padding: 6px 14px;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 0.8125rem;
  color: #fff;
  transition: background 0.2s;
}

.home-quick-links a:hover {
  background: rgba(255,255,255,0.22);
}

/* 今日推荐（大图轮播/卡片） */
.today-section {
  margin-bottom: 16px;
}

.today-section .section-header {
  margin-bottom: 12px;
}

.today-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .today-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.today-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a3a6b, #2d5f9e);
}

.today-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.today-featured .today-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
}

.today-featured .today-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.today-featured .today-meta {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.8);
}

.today-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) {
  .today-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 640px) {
  .today-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.today-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #e8eaf0;
}

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

.today-item .today-item-title {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 通用区块 */
.video-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

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

.section-title {
  font-size: 1.0625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: auto;
}

.section-more {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.section-more:hover {
  color: var(--primary);
}

/* 影片网格 */
.movie-grid,
.vod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) {
  .movie-grid,
  .vod-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (min-width: 768px) {
  .movie-grid,
  .vod-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .movie-grid,
  .vod-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }
}

/* 影片卡片 */
.movie-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-3px);
}

.movie-card__link {
  display: block;
  color: var(--text);
}

.movie-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e8eaf0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-card__poster img {
  transform: scale(1.05);
}

.movie-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card__play::after {
  content: '';
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231e88e5' d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 55% center;
  background-size: 16px 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.movie-card:hover .movie-card__play {
  opacity: 1;
}

.movie-card__badge,
.movie-card__score {
  position: absolute;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  line-height: 1;
  z-index: 2;
}

.movie-card__badge {
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.75);
  color: #fff;
}

.movie-card__score {
  top: 6px;
  right: 6px;
  background: var(--secondary);
  color: #fff;
}

.movie-card__body {
  padding: 10px 4px 4px;
}

.movie-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  min-height: 2.5em;
}

.movie-card__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图片占位符 */
.poster-placeholder,
.cover-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background: linear-gradient(135deg, #1a3a6b 0%, #2d5f9e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #fff;
  aspect-ratio: 2 / 3;
}

.cover-placeholder {
  aspect-ratio: 16 / 9;
}

.poster-emoji {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
}

.poster-name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.95;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 分类排行榜 */
.rank-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .rank-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .rank-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rank-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow);
}

.rank-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.rank-card__head a {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.rank-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
}

.rank-list .num {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-list li:nth-child(1) .num,
.rank-list li:nth-child(2) .num,
.rank-list li:nth-child(3) .num {
  background: var(--primary);
  color: #fff;
}

.rank-list .name {
  flex: 1;
  min-width: 0;
}

.rank-list a {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.rank-list a:hover {
  color: var(--primary);
}

/* 栏目页 */
.category-header {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.category-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.category-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* 子分类筛选 */
.category-filters {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.filter-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 2.8em;
  margin-right: 4px;
}

.filter-row a {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-row a:hover,
.filter-row a.active {
  background: var(--primary);
  color: #fff;
}

/* 排序与统计工具条 */
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.sort-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-right: 4px;
}

.sort-tabs a {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg);
  transition: all 0.2s;
}

.sort-tabs a:hover,
.sort-tabs a.active {
  background: var(--primary);
  color: #fff;
}

.list-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

.btn-back {
  display: inline-flex;
  padding: 10px 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.btn-back:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* 兜底推荐区 */
.fallback-section {
  margin-top: 8px;
}

/* 详情页：影片信息区 */
.video-info-section {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .video-info-section {
    grid-template-columns: 170px 1fr;
    gap: 20px;
    padding: 20px;
  }
}

@media (min-width: 768px) {
  .video-info-section {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }
}

.video-info-poster {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.video-info-poster img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.video-info-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.video-info-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .video-info-title {
    font-size: 1.5rem;
  }
}

.video-info-meta {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

@media (min-width: 480px) {
  .video-info-meta {
    grid-template-columns: 1fr 1fr;
  }
}

.video-info-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.meta-label {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 3em;
}

.meta-tag {
  display: inline-flex;
  padding: 2px 10px;
  background: rgba(30,136,229,0.08);
  color: var(--primary);
  border-radius: 12px;
  font-size: 0.8125rem;
}

.video-info-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 24px;
  box-shadow: 0 4px 14px rgba(30,136,229,0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-play:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30,136,229,0.42);
}

.btn-play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-play-lg {
  padding: 13px 34px;
  font-size: 1rem;
}

.video-info-tip {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* 剧情简介 */
.video-summary {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

/* 正文 */
.article-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 24px 0 12px;
  line-height: 1.4;
  color: var(--text);
}

.article-content h2 {
  font-size: 1.125rem;
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}

.article-content h3 {
  font-size: 1rem;
}

.article-content p {
  margin-bottom: 14px;
}

.article-content img {
  border-radius: var(--radius-sm);
  margin: 16px 0;
  max-width: 100%;
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content ul,
.article-content ol {
  margin: 12px 0 12px 20px;
  list-style: initial;
}

.article-content li {
  margin-bottom: 6px;
}

/* 选集 */
.episode-section {
  margin-bottom: 8px;
}

.episode-section h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.episode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.episode-grid a,
.episode-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--bg);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.episode-grid a:hover,
.episode-grid a.active,
.episode-list a:hover,
.episode-list a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* 播放页 */
.player-section {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}

.player-wrapper iframe,
.player-wrapper video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 20px;
  background: #0f0f0f;
}

.player-placeholder-poster {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 12px;
}

.player-placeholder-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.player-placeholder-tip {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}

.player-meta-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.player-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.player-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.link-detail {
  color: var(--primary);
  margin-left: auto;
}

.link-detail:hover {
  text-decoration: underline;
}

.source-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 16px;
}

.source-tabs button {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.source-tabs button.active,
.source-tabs button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* 上下篇 */
.prev-next-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .prev-next-wrapper {
    flex-direction: row;
    justify-content: space-between;
  }
}

.prev,
.next,
.prev-next-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  flex: 1;
}

.prev:hover,
.next:hover,
.prev-next-nav a:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.prev-next-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .prev-next-nav {
    flex-direction: row;
    justify-content: space-between;
  }
}

.prev .label,
.next .label,
.prev-next-nav .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.prev .title,
.next .title,
.prev-next-nav .title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary);
}

.next {
  align-items: flex-end;
  text-align: right;
}

/* 相关推荐 */
.related-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.related-section .movie-grid {
  margin-top: 4px;
}

/* 分页 */
.pagination-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.pagination-wrapper a,
.pagination-wrapper span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text);
  box-shadow: var(--shadow);
}

.pagination-wrapper a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-wrapper span.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* 默认列表卡片（article-card 系列） */
.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.article-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--primary);
}

.card-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(30,136,229,0.08);
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.card-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.card-readmore {
  color: var(--primary);
}

.card-readmore:hover {
  text-decoration: underline;
}

/* 纯文字列表 */
.article-text-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.article-text-item a {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-text-item a:hover {
  color: var(--primary);
}

.text-date,
.text-category {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.no-articles,
.no-related {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}

/* 页脚 */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 28px 0;
  margin-top: 16px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.footer-brand .logo {
  color: #fff;
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 0.8125rem;
  line-height: 1.7;
}

.footer-title {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-links,
.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8125rem;
}

.footer-links a,
.friend-links a {
  color: var(--footer-text);
}

.footer-links a:hover,
.friend-links a:hover {
  color: #fff;
}

.footer-keywords {
  margin-bottom: 24px;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-cloud a {
  display: inline-flex;
  padding: 6px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  font-size: 0.8125rem;
  color: var(--footer-text);
  transition: background 0.2s, color 0.2s;
}

.keyword-cloud a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.8;
}

.footer-bottom a {
  color: var(--footer-text);
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 99;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
