* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Header */
.header { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 15px; display: flex; align-items: center; height: 64px; gap: 20px; }
.logo { font-size: 22px; font-weight: 700; color: #e4393c; white-space: nowrap; }
.nav { flex: 1; display: flex; gap: 4px; overflow-x: auto; }
.nav-link { padding: 8px 14px; border-radius: 4px; font-size: 14px; color: #555; white-space: nowrap; transition: all .2s; }
.nav-link:hover, .nav-link.active { background: #e4393c; color: #fff; }
.header-right { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; }
.search-box input { width: 180px; padding: 7px 12px; border: 1px solid #ddd; border-radius: 4px 0 0 4px; outline: none; font-size: 13px; }
.search-box button { padding: 7px 14px; border: none; background: #e4393c; color: #fff; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 13px; }
.menu-toggle { display: none; padding: 8px 12px; background: #e4393c; color: #fff; border: none; border-radius: 4px; cursor: pointer; }

/* Hot search */
.hot-search { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-size: 13px; color: #666; flex-wrap: wrap; }
.hs-label { color: #999; white-space: nowrap; }
.hs-tags a { color: #666; margin-right: 12px; text-decoration: none; font-size: 13px; }
.hs-tags a:hover { color: #e4393c; }

/* Banner */
.banner { position: relative; height: 360px; border-radius: 8px; overflow: hidden; margin-bottom: 20px; background: #1a1a2e; }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; display: flex; align-items: center; padding: 0 60px; background-size: cover; background-position: center; background-repeat: no-repeat; }
.banner-slide.active { opacity: 1; }
.banner-content { max-width: 500px; color: #fff; }
.banner-content h2 { font-size: 32px; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.banner-content p { font-size: 14px; opacity: .85; margin-bottom: 20px; }
.screen-play { display: inline-block; padding: 10px 24px; background: #e4393c; color: #fff; border-radius: 4px; font-size: 14px; transition: background .2s; }
.screen-play:hover { background: #c12e2f; }
.banner-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; }
.dot.active { background: #e4393c; }

/* Layout */
.main-layout { display: flex; gap: 20px; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 280px; flex-shrink: 0; }

/* Section */
.section { background: #fff; border-radius: 8px; margin-bottom: 20px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-head h3 { font-size: 18px; color: #333; display: flex; align-items: center; gap: 8px; }
.sec-head h3 .icon { color: #e4393c; font-size: 14px; }
.sec-head a { font-size: 13px; color: #999; }
.sec-head a:hover { color: #e4393c; }

/* Item list */
.item-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.item-list > a { display: block; min-width: 0; text-decoration: none; color: inherit; }
.item-thumb { aspect-ratio: 2/3; border-radius: 6px; background-size: cover; background-position: center; background-color: #eee; position: relative; overflow: hidden; }
.item-title { display: block; font-size: 13px; color: #333; margin-top: 8px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* More link */
.more-link { color: #e4393c; text-decoration: none; font-size: 13px; }
.more-link:hover { color: #c12e2f; }

/* Sidebar */
.side-box { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.side-box h4 { font-size: 16px; margin-bottom: 12px; color: #333; }
.rank-list { list-style: none; }
.rank-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.rank-list li:last-child { border-bottom: none; }
.rank-list a { font-size: 13px; color: #555; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.rank-list a:hover { color: #e4393c; }

/* Footer */
.footer { background: #222; color: #999; padding: 40px 0 20px; font-size: 13px; margin-top: 40px; }
.footer-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 30px; }
.footer-section h4 { font-size: 15px; color: #fff; margin-bottom: 16px; font-weight: 600; }
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 10px; }
.footer-section a { color: #aaa; font-size: 13px; transition: color .2s; }
.footer-section a:hover { color: #e4393c; }
.footer-disclaimer { border-top: 1px solid #333; padding: 20px 0; margin-bottom: 20px; }
.footer-disclaimer p { color: #777; font-size: 12px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; }
.footer-bottom p { color: #666; font-size: 12px; }

/* ==========================================
   通用影片卡片（列表页 / 详情页共用）
   ========================================== */
.screen-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-bottom: 30px; }
.screen-card { background: #fff; border-radius: 8px; overflow: hidden; transition: transform .3s, box-shadow .3s; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.08); min-width: 0; }
.screen-card:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.archive-cover { position: relative; width: 100%; padding-top: 140%; overflow: hidden; background: #e8e8e8; }
.archive-cover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.screen-card:hover .archive-cover img { transform: scale(1.05); }
.archive-poster { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; padding: 15px; text-align: center; }
.archive-poster .archive-icon { font-size: 40px; margin-bottom: 10px; opacity: .9; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.archive-poster .archive-overlay { position: absolute; bottom: 0; left: 0; right: 0; height: 50%; background: linear-gradient(transparent, rgba(0,0,0,0.5)); pointer-events: none; }
.archive-tone { background: linear-gradient(135deg, #e63946, #d62828 50%, #9b2226); }
.poster-color-2 { background: linear-gradient(135deg, #457b9d, #1d3557 50%, #0d1b2a); }
.poster-color-3 { background: linear-gradient(135deg, #2a9d8f, #264653 50%, #1a3c40); }
.poster-color-4 { background: linear-gradient(135deg, #e9c46a, #f4a261 50%, #e76f51); }
.poster-color-5 { background: linear-gradient(135deg, #6a0572, #8b2f97 50%, #ab83a1); }
.poster-color-6 { background: linear-gradient(135deg, #2d6a4f, #40916c 50%, #52b788); }
.poster-color-7 { background: linear-gradient(135deg, #7b2cbf, #9d4edd 50%, #c77dff); }
.poster-color-8 { background: linear-gradient(135deg, #ff6d00, #ff8500 50%, #ff9e00); }
.poster-color-9 { background: linear-gradient(135deg, #0077b6, #00b4d8 50%, #90e0ef); }
.poster-color-10 { background: linear-gradient(135deg, #d00000, #dc2f02 50%, #e85d04); }
.poster-color-11 { background: linear-gradient(135deg, #5f0f40, #9a031e 50%, #fb8b24); }
.poster-color-12 { background: linear-gradient(135deg, #003049, #669bbc 50%, #d6ad60); }
.archive-meta { padding: 12px; }
.archive-name { font-size: 14px; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.screen-card:hover .archive-name { color: #e4393c; }

/* ==========================================
   分页
   ========================================== */
.archive-pages { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 30px 0; }
.archive-plink { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0 12px; background: #fff; color: #555; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; transition: all .2s; }
.archive-plink:hover { background: #f5f5f5; border-color: #ccc; }
.archive-plink.active { background: #e4393c; color: #fff; border-color: #e4393c; }

/* ==========================================
   分类列表页
   ========================================== */
.archive-page { padding: 20px 0; }
.archive-head { margin-bottom: 20px; }
.archive-crumb { font-size: 13px; color: #999; }
.archive-crumb a { color: #666; }
.archive-crumb a:hover { color: #e4393c; }
.archive-title { font-size: 24px; color: #333; margin-top: 8px; }
.archive-filter { background: #fff; padding: 16px 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.archive-frow { display: flex; align-items: flex-start; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.archive-frow:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.archive-flabel { width: 50px; font-size: 13px; color: #888; flex-shrink: 0; padding-top: 4px; }
.archive-fopts { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-fopt { padding: 4px 12px; background: #f0f0f0; color: #555; border-radius: 4px; font-size: 13px; cursor: pointer; transition: all .2s; }
.archive-fopt:hover { background: #e0e0e0; color: #333; }
.archive-fopt.active { background: #e4393c; color: #fff; }
.archive-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.archive-card { background: #fff; border-radius: 8px; overflow: hidden; transition: transform .3s, box-shadow .3s; box-shadow: 0 1px 3px rgba(0,0,0,0.05); min-width: 0; }
.archive-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.archive-card .archive-cover { padding-top: 140%; }

/* ==========================================
   详情页
   ========================================== */
.screen-page { padding: 20px 0; }
.screen-head { display: flex; gap: 24px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #e0e0e0; }
.screen-poster { width: 220px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #e8e8e8; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.screen-poster img { width: 100%; height: auto; display: block; aspect-ratio: 2/3; object-fit: cover; }
.screen-info { flex: 1; min-width: 0; }
.screen-info h1 { font-size: 26px; color: #333; margin-bottom: 15px; }
.screen-meta { margin-bottom: 15px; }
.screen-meta-item { font-size: 14px; color: #888; margin-bottom: 6px; }
.screen-meta-item span { color: #555; }
.screen-score { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.screen-score-num { font-size: 30px; font-weight: 700; color: #e4393c; }
.screen-stars { display: flex; gap: 3px; }
.screen-star { width: 16px; height: 16px; 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%); }
.screen-star.empty { background: #ddd; }
.screen-desc { font-size: 14px; color: #666; line-height: 1.8; margin-bottom: 20px; }
.screen-actions { display: flex; gap: 12px; }
.screen-collect { padding: 10px 24px; background: transparent; color: #e4393c; border: 1px solid #e4393c; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all .2s; }
.screen-collect:hover { background: rgba(228,57,60,0.08); }

/* 播放列表 */
.play-list-section { margin-bottom: 30px; }
.play-archive-title { font-size: 18px; color: #333; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #e0e0e0; }
.play-archive-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.play-list-item { display: inline-block; padding: 8px 16px; background: #f0f0f0; color: #555; border-radius: 4px; font-size: 13px; transition: all .2s; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.play-list-item:hover { background: #e4393c; color: #fff; }

/* ==========================================
   播放页
   ========================================== */
.play-page { padding: 20px 0; }
.play-title { font-size: 22px; color: #333; margin-bottom: 16px; font-weight: 600; }
.play-container { position: relative; width: 100%; background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 24px; aspect-ratio: 16/9; }
.play-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999; cursor: pointer; background: #111; }
.play-placeholder .big-play { width: 70px; height: 70px; background: rgba(228,57,60,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; transition: transform .2s; }
.play-placeholder:hover .big-play { transform: scale(1.08); }
.play-placeholder .big-play::before { content: ''; width: 0; height: 0; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.play-episode-selector { background: #fff; border-radius: 8px; padding: 16px 20px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.episode-header { margin-bottom: 14px; }
.episode-header h3 { font-size: 16px; color: #333; font-weight: 600; }
.play-archive-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.play-list-item { display: inline-block; padding: 8px 16px; background: #f0f0f0; color: #555; border-radius: 4px; font-size: 13px; transition: all .2s; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.play-list-item:hover { background: #e4393c; color: #fff; }
.play-list-item.active { background: #e4393c; color: #fff; }
.play-meta-box { background: #fff; padding: 20px; border-radius: 8px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.play-meta-box h3 { font-size: 16px; color: #333; margin-bottom: 12px; font-weight: 600; }

/* 猜你喜欢 */
.screen-guess { margin-top: 30px; }
.screen-sec-head { margin-bottom: 16px; }
.screen-sec-title { font-size: 20px; color: #333; padding-left: 10px; border-left: 3px solid #e4393c; }
.screen-guess .screen-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

/* ==========================================
   响应式
   ========================================== */
@media (max-width: 992px) {
  .main-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .screen-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-guess .screen-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 12px; row-gap: 10px; }
  .nav { order: 3; flex: 1 0 100%; width: 100%; display: none; flex-direction: column; background: #fff; border-top: 1px solid #f2f2f2; padding: 4px 0; overflow: visible; }
  .nav.show { display: flex; }
  .nav-link { padding: 12px 10px; border-radius: 0; border-bottom: 1px solid #f2f2f2; }
  .nav-link:hover, .nav-link.active { background: #fafafa; color: #e4393c; }
  .header-right { flex: 1; justify-content: flex-end; }
  .menu-toggle { display: block; }
  .search-box input { width: 120px; }
  .banner { height: 260px; }
  .banner-slide { padding: 0 20px; }
  .banner-content { max-width: 100%; }
  .banner-content h2 { font-size: 22px; }
  .item-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-guess .screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-info h1 { font-size: 20px; }
  .archive-filter { padding: 12px; }
  .archive-frow { flex-direction: column; gap: 8px; }
  .archive-flabel { width: 100%; }
  .screen-head { flex-direction: column; align-items: center; text-align: center; }
  .screen-poster { width: 160px; }
  .footer-content { grid-template-columns: 1fr; gap: 24px; }
  .footer { padding: 30px 15px 20px; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .logo { font-size: 20px; }
  .header-inner { gap: 10px; }
  .search-box input { width: 90px; }
  .hot-search { padding: 10px 0; }
  .banner { height: 220px; border-radius: 6px; }
  .banner-content h2 { font-size: 18px; margin-bottom: 8px; }
  .banner-content p { font-size: 13px; margin-bottom: 14px; }
  .screen-play { padding: 8px 18px; font-size: 13px; }
  .section { padding: 12px; }
  .item-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item-title { font-size: 12px; }
  .sec-head h3 { font-size: 16px; }
  .side-box { padding: 12px; }
  .screen-grid { gap: 10px; }
  .archive-grid { gap: 10px; }
}

/* ===== 卡片骨架变体兼容（域名稳定选择） ===== */
ul.item-list { list-style: none; margin: 0; padding: 0; }
a.item-card, .item-card { display: block; text-decoration: none; }
.cover-link, .card-link { display: block; }
span.thumb { display: block; height: 180px; overflow: hidden; }
/* 防止原图大图撑破 grid 轨道 */
span.thumb img,
span.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-ph { aspect-ratio: 2/3; background: linear-gradient(135deg, #eee, #ddd); }
.rating { font-size: 12px; color: #f5a623; display: inline-flex; align-items: center; gap: 2px; }
.item-card .info { padding: 10px 12px 12px; }


span.poster{display:block;width:100%;height:100%}

figure{margin:0}

p.meta{margin:0}

/* ===== 骨架变体兜底（零特异性 :where，只补缺失、不覆盖已有样式） =====
 * 无论 dy_tpl_card 输出哪种结构，卡片都不错版/撑破。
 * 已有规则特异性 > 0，优先级恒高于本块。
 */
:where(ul.item-list, ol.item-list) { list-style: none; margin: 0; padding: 0; }
:where(.item-list > li, .item-list > div, .item-list > a, .item-list > article, .item-list > figure) { min-width: 0; }
:where(a.item-card, .item-card) { display: block; text-decoration: none; }
:where(.item-card img, .item-thumb img, .thumb img, span.thumb img, span.poster img) { width: 100%; height: 100%; object-fit: cover; display: block; }
:where(span.poster) { display: block; width: 100%; height: 100%; }
:where(.item-title) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.item-meta) { display: block; }
:where(.info) { min-width: 0; }
