/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: "PingFang SC","Microsoft YaHei",sans-serif; background: #f5f5f5; color: #333; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
ul { list-style: none; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ===== TOP BAR ===== */
.top-bar { background: #1a1a1a; height: 36px; line-height: 36px; font-size: 12px; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.tb-left, .tb-right { display: flex; align-items: center; }
.tb-link { color: #aaa; margin-right: 16px; transition: color .2s; }
.tb-link:hover { color: #FF6600; }
.tb-right .tb-link { margin-right: 0; margin-left: 16px; }

/* ===== HEADER ===== */
.site-header { background: #fff; height: 64px; box-shadow: 0 1px 4px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; height: 64px; gap: 20px; }

/* Logo */
.site-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.site-logo svg { width: 36px; height: 36px; }
.logo-text { font-size: 20px; font-weight: 700; background: linear-gradient(135deg,#FF6600,#FFaa00,#FF3366); -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; }

/* ===== NAVIGATION ===== */
.main-nav { flex: 1; }
.nav-ul { display: flex; flex-direction: row; align-items: center; }
.nav-ul > li { position: relative; }
.nav-ul > li > a { display: block; padding: 0 14px; height: 64px; line-height: 64px; font-size: 15px; color: #333; white-space: nowrap; transition: color .2s; }
.nav-ul > li > a:hover { color: #FF6600; }
.nav-ul > li.active > a, .nav-ul > .nav-home > a { color: #FF6600; font-weight: 600; }

/* Dropdown */
.nav-ul > li > .sub-menu { display: none; position: absolute; top: 64px; left: 0; background: #fff; min-width: 110px; box-shadow: 0 4px 16px rgba(0,0,0,.12); border-top: 2px solid #FF6600; z-index: 9999; padding: 6px 0; }
.nav-ul > li.has-sub:hover > .sub-menu { display: block; }
.sub-menu li a { display: block; padding: 9px 18px; font-size: 13px; color: #555; white-space: nowrap; transition: all .15s; }
.sub-menu li a:hover { color: #FF6600; background: #fff8f0; }

/* ===== SEARCH ===== */
.header-search { flex-shrink: 0; }
.search-form { display: flex; align-items: center; border: 1.5px solid #FF6600; border-radius: 24px; overflow: hidden; background: #fff; }
.search-input { border: none; outline: none; padding: 0 16px; height: 36px; width: 180px; font-size: 13px; color: #333; }
.search-btn { background: #FF6600; color: #fff; border: none; padding: 0 20px; height: 36px; font-size: 14px; cursor: pointer; transition: background .2s; white-space: nowrap; }
.search-btn:hover { background: #e55a00; }

/* ===== HEADER ICONS ===== */
.header-icons { display: flex; gap: 10px; flex-shrink: 0; }
.icon-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #666; font-size: 16px; transition: all .2s; }
.icon-btn:hover { background: #fff5f0; color: #FF6600; }

/* ===== CATEGORY TABS ===== */
.cat-tabs-wrap { background: #fff; padding: 14px 0; border-bottom: 1px solid #eee; margin-bottom: 0; }
.cat-tabs-inner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cat-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 18px; border-radius: 30px; background: #f5f5f5; color: #555; font-size: 14px; font-weight: 500; text-decoration: none; transition: all .2s; border: 1px solid transparent; }
.cat-tab:hover { background: #fff3ec; color: #FF6600; border-color: #FF6600; }
.cat-tab.active { background: #FF6600; color: #fff; border-color: #FF6600; }
.cat-tab .tab-icon { font-size: 16px; }

/* ===== MAIN LAYOUT ===== */
.main-wrap { max-width: 1200px; margin: 20px auto; padding: 0 15px; display: flex; gap: 18px; }
.main-col { flex: 1; min-width: 0; }
.sidebar-col { width: 240px; flex-shrink: 0; }

/* ===== SECTION TITLE ===== */
.sec-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #FF6600; }
.sec-title-left { display: flex; align-items: center; gap: 8px; }
.sec-title-icon { font-size: 20px; }
.sec-title-text { font-size: 18px; font-weight: 700; color: #222; }
.sec-title-more { font-size: 13px; color: #999; }
.sec-title-more:hover { color: #FF6600; }

/* ===== VIDEO CARD ===== */
.vod-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 30px; }
.vod-grid-3 { grid-template-columns: repeat(3,1fr); }
.vod-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; display: block; }
.vod-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.vod-card__thumb { position: relative; width: 100%; padding-top: 140%; overflow: hidden; background: #111; }
.vod-card__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.vod-card:hover .vod-card__thumb img { transform: scale(1.05); }
.vod-card__badge { position: absolute; top: 6px; right: 6px; background: rgba(255,102,0,.85); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 4px; }
.vod-card__badge-tl { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 4px; }
.vod-card__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.35); }
.vod-card__play span { font-size: 40px; color: #fff; }
.vod-card:hover .vod-card__play { opacity: 1; }
.vod-card__info { padding: 10px 10px 12px; }
.vod-card__title { font-size: 13px; font-weight: 600; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
.vod-card__meta { display: flex; align-items: center; gap: 8px; }
.vod-card__score { font-size: 14px; font-weight: 700; color: #FF6600; }
.vod-card__actors { font-size: 12px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* ===== SECTION BLOCK ===== */
.sec-block { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }

/* ===== SIDEBAR ===== */
.sidebar-widget { background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.widget-title { font-size: 16px; font-weight: 700; color: #222; padding-bottom: 10px; border-bottom: 2px solid #FF6600; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.rank-item:last-child { border-bottom: none; }
.rank-num { width: 22px; height: 22px; border-radius: 4px; background: #eee; color: #999; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-item:nth-child(1) .rank-num { background: #FF4444; color: #fff; }
.rank-item:nth-child(2) .rank-num { background: #FF6600; color: #fff; }
.rank-item:nth-child(3) .rank-num { background: #FFaa00; color: #fff; }
.rank-item__title { font-size: 13px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.rank-item__title:hover { color: #FF6600; }
.rank-item__count { font-size: 11px; color: #bbb; flex-shrink: 0; }

/* New arrivals list in sidebar */
.new-list .new-item { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #f5f5f5; }
.new-item:last-child { border-bottom: none; }
.new-item__title { font-size: 13px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.new-item__title:hover { color: #FF6600; }
.new-item__ep { font-size: 11px; background: #FF6600; color: #fff; padding: 1px 6px; border-radius: 3px; flex-shrink: 0; }

/* ===== FOOTER ===== */
.site-footer { background: #2b2b2b; color: #aaa; padding: 28px 0 20px; margin-top: 30px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.footer-links a { color: #888; font-size: 13px; }
.footer-links a:hover { color: #FF6600; }
.footer-disclaimer { font-size: 12px; line-height: 1.8; color: #777; margin-bottom: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #3a3a3a; padding-top: 14px; font-size: 12px; color: #666; }
.footer-logo { display: flex; align-items: center; gap: 6px; }
.footer-logo .logo-text { font-size: 15px; background: linear-gradient(135deg,#FF6600,#FFaa00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }

/* ===== BREADCRUMB ===== */
.breadcrumb { font-size: 13px; color: #999; margin-bottom: 16px; padding: 12px 0; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #FF6600; }

/* ===== VOD DETAIL PAGE ===== */
.vod-detail { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 18px; }
.vod-detail__cover { width: 200px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.vod-detail__cover img { width: 100%; border-radius: 8px; }
.vod-detail__body { flex: 1; }
.vod-detail__wrap { display: flex; gap: 24px; margin-bottom: 20px; }
.vod-detail__title { font-size: 24px; font-weight: 700; color: #222; margin-bottom: 12px; }
.vod-detail__meta { font-size: 13px; color: #777; line-height: 2.2; }
.vod-detail__meta span { color: #333; margin-right: 16px; }
.vod-detail__score-big { font-size: 36px; font-weight: 700; color: #FF6600; }
.vod-detail__desc { font-size: 13px; color: #777; line-height: 1.8; margin-top: 12px; }
.play-btn { display: inline-flex; align-items: center; gap: 8px; background: #FF6600; color: #fff; padding: 10px 28px; border-radius: 24px; font-size: 15px; margin-top: 16px; transition: background .2s; }
.play-btn:hover { background: #e55a00; }

/* Episode list */
.ep-section { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 18px; }
.ep-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-btn { padding: 6px 16px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #555; transition: all .15s; }
.ep-btn:hover, .ep-btn.active { background: #FF6600; color: #fff; border-color: #FF6600; }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 20px 0; }
.page-btn { padding: 7px 13px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #555; transition: all .15s; }
.page-btn:hover, .page-btn.active { background: #FF6600; color: #fff; border-color: #FF6600; }

/* ===== LEGACY ALIASES (for vod templates) ===== */
.section-block { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
.section-title { font-size: 18px; font-weight: 700; color: #222; display: flex; align-items: center; gap: 8px; }
.title-bar { width: 5px; height: 20px; background: linear-gradient(180deg,#FF6600,#ffaa00); border-radius: 3px; display: inline-block; flex-shrink: 0; }
.section-title-sm { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid #FF6600; }
.more-link { font-size: 13px; color: #999; }
.more-link:hover { color: #FF6600; }

/* Content area for vod templates */
.content-area { display: flex; gap: 18px; }
.content-main { flex: 1; min-width: 0; }
.sidebar { width: 240px; flex-shrink: 0; }
.sidebar-block { background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.sidebar-title { font-size: 16px; font-weight: 700; color: #222; padding-bottom: 10px; border-bottom: 2px solid #FF6600; margin-bottom: 12px; }

/* Filter bar */
.filter-wrap { background: #fff; border-radius: 8px; padding: 14px; margin-bottom: 16px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filter-bar:last-child { margin-bottom: 0; }
.filter-label { font-size: 13px; color: #999; margin-right: 4px; }
.filter-tag { display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 13px; color: #555; background: #f5f5f5; transition: all .15s; }
.filter-tag:hover, .filter-tag.active { background: #FF6600; color: #fff; }

/* VOD list grid */
.vod-list { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; }
.vod-item { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .2s; display: block; }
.vod-item:hover { transform: translateY(-3px); }
.vod-item__thumb { position: relative; padding-top: 140%; background: #111; }
.vod-item__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vod-item__badge { position: absolute; top: 6px; right: 6px; background: rgba(255,102,0,.85); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; }
.vod-item__info { padding: 8px; }
.vod-item__title { font-size: 13px; font-weight: 600; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-item__score { font-size: 12px; color: #FF6600; font-weight: 700; }

/* Back-to-top */
.back-top { position: fixed; bottom: 40px; right: 24px; width: 40px; height: 40px; background: #FF6600; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; opacity: 0; visibility: hidden; transition: all .3s; z-index: 9999; }
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { background: #e55a00; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .vod-list { grid-template-columns: repeat(4,1fr); }
}
@media (max-width: 900px) {
  .vod-grid { grid-template-columns: repeat(3,1fr); }
  .sidebar-col { display: none; }
  .sidebar { display: none; }
  .vod-list { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 640px) {
  .vod-grid { grid-template-columns: repeat(2,1fr); }
  .main-nav { display: none; }
  .search-input { width: 120px; }
  .vod-list { grid-template-columns: repeat(2,1fr); }
}