/* 模板组27 - 暗色主题 CSS */

/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif; background: #0f1117; color: #c8cdd3; line-height: 1.6; min-height: 100vh; }
a { color: #c8cdd3; text-decoration: none; transition: color .3s; }
a:hover { color: #ff6b35; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input { font-family: inherit; outline: none; border: none; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f1117; }
::-webkit-scrollbar-thumb { background: #252836; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #5a5f6a; }

/* 头部 */
.header { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: rgba(15,17,23,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid #252836; z-index: 1000; display: flex; align-items: center; padding: 0 40px; }
.header-inner { display: flex; align-items: center; width: 100%; max-width: 1400px; margin: 0 auto; justify-content: space-between; }
.logo { font-size: 22px; font-weight: 700; color: #ff6b35; margin-right: 30px; white-space: nowrap; }
.nav { display: flex; gap: 0; }
.nav a { color: #8a8f9a; padding: 0 12px; font-size: 14px; transition: color .3s; white-space: nowrap; }
.nav a:hover, .nav a.active { color: #ff6b35; }
.header-right { display: flex; align-items: center; gap: 10px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box input { width: 180px; height: 32px; background: #161822; color: #c8cdd3; font-size: 13px; padding: 0 36px 0 12px; border-radius: 20px; }
.search-box button { position: absolute; right: 8px; width: 20px; height: 20px; background: #ff6b35; border-radius: 50%; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }

/* Banner */
.banner { position: relative; height: 420px; margin-top: 60px; overflow: hidden; }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; background-size: cover; background-position: center; }
.banner-slide.active { opacity: 1; }
.banner-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(15,17,23,0.95) 30%, rgba(15,17,23,0.4) 60%, rgba(15,17,23,0.3)); z-index: 1; }
.banner-content { position: absolute; top: 50%; left: 60px; transform: translateY(-50%); z-index: 2; max-width: 520px; color: #fff; }
.banner-content h2 { font-size: 36px; font-weight: 700; margin-bottom: 12px; line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.banner-content p { font-size: 15px; color: #8a8f9a; line-height: 1.6; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 32px; background: linear-gradient(135deg, #ff6b35, #ff8c5a); color: #fff; font-size: 16px; font-weight: 600; border-radius: 28px; transition: all .3s; box-shadow: 0 4px 20px rgba(255,107,53,0.3); }
.banner-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255,107,53,0.45); }

.banner-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.banner-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all .3s; }
.banner-dots span.active { background: #ff6b35; width: 28px; border-radius: 5px; }

/* 主内容区 */
.container { max-width: 1400px; margin: 0 auto; padding: 30px 40px; }
.hot-search { padding: 20px 0 30px; color: #8a8f9a; font-size: 13px; }
.hot-search a { color: #8a8f9a; margin-right: 16px; transition: color .3s; }
.hot-search a:hover { color: #ff6b35; }

/* 分类区块 */
.section { margin-bottom: 40px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 22px; font-weight: 700; padding-left: 16px; border-left: 4px solid #ff6b35; color: #c8cdd3; }
.section-more { font-size: 13px; color: #5a5f6a; transition: color .3s; }
.section-more:hover { color: #ff6b35; }

/* 详情页 */
.detail-page { padding-top: 90px; }
.detail-breadcrumb { margin-bottom: 24px; font-size: 13px; color: #5a5f6a; }
.detail-breadcrumb a { color: #8a8f9a; }
.detail-breadcrumb a:hover { color: #ff6b35; }
.detail-header { display: grid; grid-template-columns: 260px 1fr; gap: 32px; margin-bottom: 40px; }
.detail-poster { border-radius: 12px; overflow: hidden; background: #161822; aspect-ratio: 3/4; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { display: flex; flex-direction: column; justify-content: center; }
.detail-title { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 16px; line-height: 1.3; }
.detail-score { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.score-num { font-size: 28px; font-weight: 700; color: #ff6b35; }
.score-stars { display: flex; gap: 4px; }
.star { width: 18px; height: 18px; background: #ffc107; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.star.half { background: linear-gradient(90deg, #ffc107 50%, #444 50%); }
.star.empty { background: #444; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 20px; font-size: 14px; color: #8a8f9a; }
.detail-meta-item span { color: #c8cdd3; }
.detail-desc { font-size: 14px; color: #8a8f9a; line-height: 1.8; margin-bottom: 24px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.detail-actions { display: flex; gap: 16px; }

/* 播放页 - douya内置渲染器使用的类名 */
.play-page { padding-top: 90px; padding-bottom: 40px; }
.play-page .container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }
.list-breadcrumb { margin-bottom: 20px; font-size: 13px; color: #5a5f6a; }
.list-breadcrumb a { color: #8a8f9a; }
.list-breadcrumb a:hover { color: #ff6b35; }
.play-title { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 20px; }

/* 播放器容器 */
.play-container { position: relative; width: 100%; min-height: 400px; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 24px; display: flex; align-items: center; justify-content: center; }
.play-placeholder { text-align: center; color: #8a8f9a; padding: 60px 20px; }
.play-placeholder .big-play { width: 80px; height: 80px; margin: 0 auto 16px; background: #ff6b35; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; }
.play-placeholder .big-play::after { content: ''; display: block; width: 0; height: 0; border-left: 24px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 4px; }
.play-placeholder p { font-size: 16px; color: #c8cdd3; margin-bottom: 4px; }

/* 选集区域 */
.play-episode-selector { margin-bottom: 36px; }
.episode-header { margin-bottom: 16px; }
.episode-header h3 { font-size: 18px; font-weight: 600; color: #c8cdd3; }
.filter-option { padding: 6px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all .3s; }
.filter-option.active { background: #ff6b35; color: #fff; }
.play-list-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.play-list-item { display: block; padding: 10px 12px; text-align: center; background: #1a1d2e; border: 1px solid #252836; border-radius: 8px; color: #c8cdd3; font-size: 13px; transition: all .3s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-list-item:hover { border-color: #ff6b35; color: #ff6b35; }
.play-list-item.active { background: #ff6b35; border-color: #ff6b35; color: #fff; }

/* 猜你喜欢 - 内置渲染器使用 movie- 前缀类名 */
.guess-section { margin-bottom: 40px; }
.movie-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.movie-card { border-radius: 10px; overflow: hidden; background: #1a1d2e; transition: all .3s; border: 1px solid transparent; }
.movie-card:hover { transform: translateY(-6px); border-color: #ff6b35; box-shadow: 0 8px 30px rgba(255,107,53,0.15); }
.movie-cover { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #161822; }
.movie-poster { position: relative; width: 100%; height: 100%; }
.movie-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.movie-card:hover .movie-poster img { transform: scale(1.08); }
.poster-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); opacity: 0; transition: opacity .3s; }
.movie-card:hover .poster-overlay { opacity: 1; }
.movie-meta { padding: 12px; }
.movie-name { font-size: 14px; font-weight: 600; color: #c8cdd3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 剧集 - 自定义view模板兼容 */
.episode-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.episode-btn { padding: 10px 20px; background: #1a1d2e; border: 1px solid #252836; border-radius: 8px; color: #c8cdd3; font-size: 14px; transition: all .3s; }
.episode-btn:hover { border-color: #ff6b35; color: #ff6b35; }
.episode-btn.active { background: #ff6b35; border-color: #ff6b35; color: #fff; }

/* 列表页 */
.list-page { padding-top: 90px; }
.list-page .section { margin-bottom: 36px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 30px; padding-bottom: 20px; }
.page-btn { min-width: 38px; height: 38px; background: #1a1d2e; color: #8a8f9a; font-size: 14px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all .3s; border: 1px solid transparent; }
.page-btn:hover { color: #ff6b35; border-color: #ff6b35; }
.page-btn.active { background: #ff6b35; color: #fff; border-color: #ff6b35; }
.page-btn.arrow { font-size: 18px; }

/* 视频网格 */
.video-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.video-card { cursor: pointer; border-radius: 10px; overflow: hidden; background: #1a1d2e; transition: all .3s; border: 1px solid transparent; }
.video-card:hover { transform: translateY(-6px); border-color: #ff6b35; box-shadow: 0 8px 30px rgba(255,107,53,0.15); }

.card-poster { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #161822; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.video-card:hover .card-poster img { transform: scale(1.08); }

.card-info { padding: 12px; }
.card-title { font-size: 14px; font-weight: 600; color: #c8cdd3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 侧边栏 */
.main-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.sidebar .side-box { margin-bottom: 20px; background: #161822; border: 1px solid #252836; border-radius: 10px; padding: 16px; }
.sidebar h4 { font-size: 15px; font-weight: 600; color: #c8cdd3; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #252836; }
.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 6px; }
.sidebar li a { color: #8a8f9a; font-size: 13px; line-height: 1.7; transition: color .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sidebar li a:hover { color: #ff6b35; }

/* 底部 */
.footer { background: #161822; border-top: 1px solid #252836; padding: 40px 40px 30px; text-align: center; }
.footer-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 30px; text-align: left; }
.footer-section h4 { font-size: 15px; color: #c8cdd3; margin-bottom: 16px; }
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 8px; }
.footer-section a { color: #5a5f6a; font-size: 13px; transition: color .3s; }
.footer-section a:hover { color: #ff6b35; }
.footer-bottom { border-top: 1px solid #252836; padding-top: 20px; text-align: center; }
.footer-bottom p { color: #5a5f6a; font-size: 12px; }

/* 通用样式 */
.item-list, .item-thumb, .item-title { display: none; }

/* 响应式 */
@media (max-width: 1200px) {
  .main-content { padding: 24px; }
  .header { padding: 0 24px; }
  .play-page .container { padding: 0 24px; }
  .video-grid, .movie-grid { grid-template-columns: repeat(5, 1fr); }
  .play-list-grid { grid-template-columns: repeat(6, 1fr); }
  .detail-header { grid-template-columns: 220px 1fr; gap: 24px; }
}
@media (max-width: 992px) {
  .banner { height: 320px; }
  .banner-content { left: 30px; }
  .banner-content h2 { font-size: 28px; }
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .video-grid, .movie-grid { grid-template-columns: repeat(4, 1fr); }
  .play-list-grid { grid-template-columns: repeat(5, 1fr); }
  .play-container { min-height: 300px; }
  .detail-header { grid-template-columns: 180px 1fr; }
  .detail-info .detail-title { font-size: 24px; }
}
@media (max-width: 768px) {
  .container { padding: 16px; }
  .play-page .container { padding: 0 16px; }
  .header { padding: 0 16px; }
  .banner { height: 260px; }
  .banner-content { left: 16px; max-width: 260px; }
  .banner-content h2 { font-size: 20px; }
  .section-title { font-size: 18px; }
  .video-grid, .movie-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .play-list-grid { grid-template-columns: repeat(4, 1fr); }
  .play-container { min-height: 240px; }
  .play-title { font-size: 20px; }
  .detail-header { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .video-grid, .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .play-list-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .nav { display: none; }
  /* 移动端头部：logo 收缩省略、搜索框弹性伸缩、汉堡按钮固定最右 */
  .header { padding: 0 12px; }
  .header-inner { gap: 10px; }
  .logo { font-size: 15px; margin-right: 0; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-right { flex: 1; min-width: 0; }
  .search-box { width: 100%; min-width: 0; }
  .search-box input { width: 100%; min-width: 0; }
}

/* 移动端汉堡按钮 */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* 移动端菜单：头部下方全宽下拉 */
@media (max-width: 480px) {
  .menu-toggle {
    display: flex;
  }
  .nav.show {
    display: flex;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #0f1117;
    border-top: 1px solid #252836;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 24px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 999;
  }
  .nav.show a {
    padding: 14px 0;
    border-bottom: 1px solid #252836;
    font-size: 16px;
  }
  .nav.show a.active {
    color: #ff6b35;
  }
}