/* ========================================
   全局重置 & 基础样式
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #141414;
  --bg-secondary: #1a1a1a;
  --bg-card: #1f1f1f;
  --bg-header: rgba(20, 20, 20, 0.95);
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #808080;
  --accent: #e50914;
  --accent-hover: #f40612;
  --accent-yellow: #ffd700;
  --accent-green: #46d369;
  --accent-blue: #4da6ff;
  --border-color: #2a2a2a;
  --card-radius: 6px;
  --transition: all 0.3s ease;
  --max-width: 1400px;
  --header-height: 70px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   头部导航
======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  color: var(--accent);
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

/* 平台标签 */
.platform-tags {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.platform-tag {
  padding: 4px 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.platform-tag:hover {
  background: var(--accent);
  color: #fff;
}

/* 搜索框 */
.search-box {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 40px 0 15px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.search-box input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--accent);
}

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

.search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}

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

/* 主导航 */
.main-nav {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.nav-item {
  padding: 8px 16px;
  font-size: 15px;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

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

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ========================================
   轮播Banner
======================================== */
.banner {
  margin-top: var(--header-height);
  position: relative;
  height: 480px;
  overflow: hidden;
  background: #000;
}

.banner-slides {
  position: relative;
  height: 100%;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
}

.banner-slide.active {
  opacity: 1;
}

.banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5);
}

.banner-content {
  position: relative;
  z-index: 2;
  padding: 0 60px;
  max-width: 600px;
}

.banner-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  border-radius: 3px;
  margin-bottom: 15px;
}

.banner-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.8;
}

.banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.banner-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* 轮播指示器 */
.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner-dot {
  width: 30px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
}

.banner-dot.active {
  width: 50px;
  background: var(--accent);
}

/* 轮播箭头 */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 80px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: var(--transition);
}

.banner:hover .banner-arrow {
  opacity: 1;
}

.banner-arrow:hover {
  background: rgba(0,0,0,0.8);
}

.banner-arrow.prev { left: 0; }
.banner-arrow.next { right: 0; }

/* ========================================
   上映信息条
======================================== */
.release-bar {
  background: var(--bg-secondary);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.release-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.release-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.release-date {
  color: var(--accent);
  font-size: 14px;
  font-weight: bold;
}

.release-count {
  color: var(--text-secondary);
  font-size: 14px;
}

.release-tags {
  display: flex;
  gap: 10px;
}

.release-tag {
  padding: 4px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.release-tag:hover {
  background: var(--accent);
  color: #fff;
}

/* ========================================
   内容板块
======================================== */
.section {
  padding: 30px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 22px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.section-more {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

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

/* ========================================
   视频卡片网格
======================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.video-card {
  display: block;
  background: var(--bg-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.video-card:hover .video-overlay {
  opacity: 1;
}

.video-card:hover .video-thumb img {
  transform: scale(1.1);
}

/* 封面图 */
.video-thumb {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #2a2a2a;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* 悬浮遮罩 */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.play-icon {
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  transition: var(--transition);
}

.play-icon:hover {
  transform: scale(1.2);
}

/* 标签 */
.video-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.badge-item {
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-item.hd {
  background: var(--accent-blue);
}

.badge-item.score {
  background: var(--accent-yellow);
  color: #000;
  font-weight: bold;
}

/* 集数 */
.video-episodes {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 12px;
  color: var(--text-secondary);
}

/* 卡片信息 */
.video-info {
  padding: 12px;
}

.video-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.video-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.video-actor {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ========================================
   横排卡片（敬请期待）
======================================== */
.coming-section {
  padding: 30px 0;
}

.coming-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.coming-card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  transition: var(--transition);
  cursor: pointer;
}

.coming-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.coming-thumb {
  width: 100px;
  flex-shrink: 0;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #2a2a2a;
}

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

.coming-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.coming-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

.coming-date {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 6px;
}

.coming-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   分页
======================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.page-item {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: var(--bg-card);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.page-item:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.page-item.active {
  background: var(--accent);
  color: #fff;
}

.page-item.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ========================================
   分类列表页
======================================== */
.list-page {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  padding: 30px 0;
}

.list-header {
  margin-bottom: 25px;
}

.list-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
}

/* 筛选栏 */
.filter-bar {
  background: var(--bg-secondary);
  padding: 15px 20px;
  border-radius: var(--card-radius);
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-label {
  width: 60px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.filter-option {
  padding: 5px 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-option:hover,
.filter-option.active {
  background: var(--accent);
  color: #fff;
}

/* ========================================
   详情页
======================================== */
.detail-page {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  padding: 30px 0;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--card-radius);
  margin-bottom: 25px;
  font-size: 14px;
}

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

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

.breadcrumb-sep {
  color: var(--text-muted);
  margin: 0 2px;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: bold;
}

.detail-header {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
}

.detail-poster {
  width: 280px;
  flex-shrink: 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #2a2a2a;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.detail-info {
  flex: 1;
}

.detail-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.detail-meta-item {
  font-size: 14px;
  color: var(--text-secondary);
}

.detail-meta-item span {
  color: var(--text-primary);
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--accent-yellow);
  color: #000;
  border-radius: 3px;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 20px;
}

.detail-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.detail-btn.primary {
  background: var(--accent);
  color: #fff;
}

.detail-btn.primary:hover {
  background: var(--accent-hover);
}

.detail-btn.secondary {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.detail-btn.secondary:hover {
  background: rgba(255,255,255,0.2);
}

.detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--card-radius);
}

/* 剧集列表 */
.episode-section {
  margin-top: 30px;
}

.episode-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

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

.episode-btn {
  min-width: 70px;
  padding: 10px 15px;
  background: var(--bg-card);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.episode-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ========================================
   播放页
======================================== */
.play-page {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

.player-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-placeholder {
  text-align: center;
  color: var(--text-secondary);
}

.player-big-play {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  margin: 0 auto 20px;
  cursor: pointer;
  transition: var(--transition);
}

.player-big-play:hover {
  transform: scale(1.15);
  background: var(--accent-hover);
}

.play-info {
  padding: 20px 0;
}

.play-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

.play-meta {
  font-size: 14px;
  color: var(--text-muted);
}

/* 播放源切换 */
.source-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.source-tab {
  padding: 8px 20px;
  background: var(--bg-card);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.source-tab:hover,
.source-tab.active {
  background: var(--accent);
  color: #fff;
}

/* ========================================
   底部分类
======================================== */
.footer-section {
  background: var(--bg-secondary);
  padding: 40px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-category {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--card-radius);
}

.footer-cat-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

.footer-cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.footer-cat-item:hover {
  color: var(--text-primary);
}

.footer-cat-item .score {
  color: var(--accent-yellow);
  font-weight: bold;
  font-size: 12px;
}

/* 页脚 */
.footer {
  background: #0a0a0a;
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-color);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

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

/* ========================================
   友情链接
======================================== */
.friend-links {
  background: var(--bg-secondary);
  padding: 25px 0;
  border-top: 1px solid var(--border-color);
}

.friend-links-inner {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.friend-links-label {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-primary);
  padding-top: 5px;
}

.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.friend-links-list a {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.friend-links-list a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ========================================
   响应式
======================================== */
@media (max-width: 1200px) {
  .video-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .platform-tags {
    display: none;
  }
  .banner {
    height: 380px;
  }
  .banner-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  .coming-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .main-nav {
    display: none;
  }
  .banner {
    height: 300px;
  }
  .banner-content {
    padding: 0 20px;
  }
  .banner-title {
    font-size: 24px;
  }
  .detail-header {
    flex-direction: column;
  }
  .detail-poster {
    width: 200px;
    margin: 0 auto;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .coming-grid {
    grid-template-columns: 1fr;
  }
  .search-box {
    display: none;
  }
  .logo {
    font-size: 20px;
  }
}

/* ========================================
   滚动条美化
======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* ========================================
   回到顶部
======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

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

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