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

:root {
  --primary: #e74c3c;
  --bg: #141414;
  --bg2: #1f1f1f;
  --bg3: #2a2a2a;
  --text: #e0e0e0;
  --text2: #999;
  --border: #333;
  --radius: 6px;
}

body { background: var(--bg); color: var(--text); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif; font-size: 14px; line-height: 1.6; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--bg2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; height: 56px; gap: 32px; }
.logo { font-size: 20px; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.main-nav { display: flex; gap: 20px; overflow-x: auto; margin-left: auto; }
.main-nav a { font-size: 14px; color: var(--text2); transition: color .2s; white-space: nowrap; }
.main-nav a:hover { color: var(--text); }

/* Main */
.main-content { min-height: calc(100vh - 56px - 60px); padding: 24px 0; }

/* Search */
.search-form { display: flex; margin-left: auto; gap: 0; }
.search-input { background: var(--bg3); border: 1px solid var(--border); border-right: none; color: var(--text); font-size: 13px; padding: 6px 12px; border-radius: var(--radius) 0 0 var(--radius); outline: none; width: 180px; transition: border-color .2s; }
.search-input:focus { border-color: var(--primary); }
.search-btn { background: var(--primary); color: #fff; border: none; padding: 6px 14px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 13px; transition: opacity .2s; }
.search-btn:hover { opacity: .85; }
.search-page { min-height: 300px; }
.search-hint { color: var(--text2); padding: 40px 0; text-align: center; }
.search-count { color: var(--text2); font-size: 13px; margin-bottom: 20px; }
.search-count strong { color: var(--primary); }

/* Site H1（SEO用，视觉弱化）*/
.site-h1 { font-size: 13px; color: var(--text2); margin-bottom: 20px; font-weight: normal; }

/* Section */
.section { margin-bottom: 40px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; border-left: 3px solid var(--primary); padding-left: 10px; }
.section-title { font-size: 18px; font-weight: 600; }
.section-more { color: var(--text2); font-size: 13px; }
.section-more:hover { color: var(--primary); }

/* Movie Grid */
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }

.movie-card { background: var(--bg2); border-radius: var(--radius); overflow: hidden; transition: transform .2s; }
.movie-card:hover { transform: translateY(-4px); }
.movie-cover { position: relative; aspect-ratio: 2/3; overflow: hidden; background: var(--bg3); }
.movie-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.movie-card:hover .movie-cover img { transform: scale(1.05); }
.movie-rating { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.7); color: #f5a623; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 3px; }
.movie-info { padding: 8px 10px; }
.movie-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-meta { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* Category Grid */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.category-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; transition: border-color .2s; display: flex; flex-direction: column; gap: 4px; }
.category-item:hover { border-color: var(--primary); }
.cat-name { font-size: 15px; font-weight: 500; }
.cat-count { font-size: 12px; color: var(--text2); }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--primary); }

/* Page Header */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; margin-bottom: 4px; }
.page-header p { color: var(--text2); font-size: 13px; }

/* Movie Detail */
.movie-detail { display: flex; gap: 32px; margin-bottom: 32px; }
.movie-detail-left { flex-shrink: 0; }
.detail-cover { width: 200px; border-radius: var(--radius); }
.movie-detail-right { flex: 1; }
.detail-title { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.detail-original { color: var(--text2); font-size: 14px; margin-bottom: 12px; }
.detail-rating { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.rating-score { font-size: 36px; font-weight: 700; color: #f5a623; }
.rating-label { color: var(--text2); font-size: 13px; }
.detail-meta { border-collapse: collapse; margin-bottom: 16px; }
.detail-meta td { padding: 5px 12px 5px 0; font-size: 13px; vertical-align: top; }
.detail-meta td:first-child { color: var(--text2); white-space: nowrap; width: 50px; }
.detail-meta a:hover { color: var(--primary); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { background: var(--bg3); color: var(--text2); font-size: 12px; padding: 3px 8px; border-radius: 3px; }
.btn-play { display: inline-block; background: var(--primary); color: #fff; font-size: 15px; font-weight: 600; padding: 10px 32px; border-radius: 24px; transition: opacity .2s; }
.btn-play:hover { color: #fff; opacity: .85; }

/* Detail Section */
.detail-section { margin-bottom: 32px; }
.detail-section h2 { font-size: 16px; font-weight: 600; border-left: 3px solid var(--primary); padding-left: 10px; margin-bottom: 14px; }
.detail-desc { color: var(--text2); line-height: 1.8; font-size: 14px; }

/* Player */
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; }
#dplayer { width: 100%; height: 100%; }
.player-tip { color: var(--text2); font-size: 13px; padding: 16px 0; text-align: center; }

/* Pagination */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.page-btn { display: inline-block; padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; color: var(--text2); transition: all .2s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-ellipsis { border-color: transparent; cursor: default; }

/* Keyword Page */
.kw-header { margin-bottom: 24px; }
.kw-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.kw-header p { color: var(--text2); font-size: 13px; }
.kw-header strong { color: var(--primary); }
.no-result { color: var(--text2); padding: 40px 0; text-align: center; }
.related-kw { margin-top: 40px; }
.related-kw h2 { font-size: 16px; font-weight: 600; border-left: 3px solid var(--primary); padding-left: 10px; margin-bottom: 14px; }
.kw-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.kw-tag { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); font-size: 13px; padding: 6px 14px; border-radius: 20px; transition: all .2s; }
.kw-tag:hover { border-color: var(--primary); color: var(--primary); }

/* 404 */
.not-found { text-align: center; padding: 80px 0; }
.not-found-code { font-size: 96px; font-weight: 700; color: var(--primary); line-height: 1; }
.not-found-title { font-size: 24px; margin: 16px 0 8px; }
.not-found-desc { color: var(--text2); margin-bottom: 32px; }
.not-found-links { margin-top: 24px; display: flex; justify-content: center; gap: 20px; }
.not-found-links a { color: var(--text2); font-size: 14px; }
.not-found-links a:hover { color: var(--primary); }

/* Back to top */
.back-top { position: fixed; right: 20px; bottom: 30px; width: 40px; height: 40px; background: var(--bg3); border: 1px solid var(--border); border-radius: 50%; color: var(--text2); font-size: 22px; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 99; }
.back-top.visible { opacity: 1; pointer-events: auto; }
.back-top:hover { color: var(--primary); border-color: var(--primary); }

/* Footer */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 16px 0; text-align: center; color: var(--text2); font-size: 12px; }
.site-footer a { color: var(--text2); }
.site-footer a:hover { color: var(--primary); }
.site-footer .footer-links { margin: 0 0 6px 0; }
.site-footer .footer-links a { margin: 0 4px; }
.site-footer .footer-links .dot { color: #555; opacity:.5; }
.site-footer .footer-host { color: #888; opacity:.7; font-size: 11px; }

/* Responsive */
@media (max-width: 768px) {
  .movie-detail { flex-direction: column; }
  .detail-cover { width: 140px; }
  .detail-title { font-size: 20px; }
  .rating-score { font-size: 28px; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
}
@media (max-width: 480px) {
  .movie-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 广告位公共样式 */
.ad-slot { margin: 12px auto; text-align: center; overflow: hidden; line-height: 0; }
.ad-slot:empty { display: none !important; }
.ad-slot img { max-width: 100%; height: auto; display: inline-block; }
.ad-slot iframe { max-width: 100%; border: 0; }
.ad-float-bottom { line-height: 0; }
.ad-float-bottom .close-btn { position: absolute; right: 6px; top: 6px; background: rgba(0,0,0,.4); color: #fff; padding: 2px 6px; font-size: 11px; border-radius: 3px; cursor: pointer; }
@media (min-width: 769px) { .ad-float-bottom { display: none !important; } }

/* 公告条 */
.site-announcement { background: #fef3c7; color: #92400e; text-align: center; padding: 8px 16px; font-size: 13px; border-bottom: 1px solid #fde68a; }

