/* ============================================
   a004 - Vibrant Orange Compact Theme
   Accent: #f97316 (Orange)  Background: #fff
   Bilibili-inspired dense, information-rich layout
   ============================================ */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; font-size: 13px; color: #333; background: #f4f5f7; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
a:hover { color: #f97316; }
ul, ol { list-style: none; }
img { max-width: 100%; border: 0; vertical-align: middle; display: block; }
input, button { border: none; outline: none; font-family: inherit; -webkit-appearance: none; }
.hide { display: none !important; }

/* ============================================
   Header - Compact top bar
   ============================================ */
.header { background: #fff; border-bottom: 1px solid #e5e5e5; position: sticky; top: 0; z-index: 1000; }
.header-wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; max-width: 1300px; margin: 0 auto; padding: 0 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: #333; }
.logo:hover { color: #333; }
.logo-box { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 20px; background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; font-size: 10px; font-weight: 700; border-radius: 4px; letter-spacing: -0.5px; }

/* Nav Bar */
.nav-bar { display: flex; gap: 4px; }
.nav-bar a { padding: 6px 12px; font-size: 13px; color: #666; border-radius: 4px; transition: all .15s; }
.nav-bar a:hover { color: #f97316; background: rgba(249,115,22,.06); }
.nav-bar a.on { color: #f97316; font-weight: 600; }

/* Header Tools */
.header-tools { display: flex; align-items: center; gap: 8px; }
.search-wrap { display: flex; align-items: center; height: 32px; background: #f4f5f7; border-radius: 16px; overflow: hidden; }
.search-wrap input { width: 140px; height: 100%; padding: 0 12px; background: transparent; font-size: 12px; color: #333; }
.search-wrap input::placeholder { color: #999; }
.search-wrap button { width: 36px; height: 32px; background: transparent; color: #999; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color .15s; }
.search-wrap button:hover { color: #f97316; }
.search-wrap svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.nav-btn { display: none; width: 36px; height: 36px; background: transparent; cursor: pointer; color: #666; }
.nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ============================================
   Main Content
   ============================================ */
.main-wrap { max-width: 1300px; margin: 0 auto; padding: 16px; background: #fff; min-height: calc(100vh - 120px); }

/* Block / Section */
.block { margin-bottom: 24px; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #f97316; }
.block-head h2 { font-size: 15px; font-weight: 600; color: #333; }
.more-btn { font-size: 12px; color: #999; }
.more-btn:hover { color: #f97316; }

.page-bar { padding: 12px 0 16px; border-bottom: 1px solid #eee; margin-bottom: 16px; }
.page-bar h1 { font-size: 18px; font-weight: 600; color: #333; }

/* ============================================
   Video List - Dense 6-column grid
   ============================================ */
.vlist { display: grid; gap: 12px; }
.cols-6 { grid-template-columns: repeat(6, 1fr); }

.vitem { background: #fff; }
.vitem-pic { position: relative; display: block; padding-bottom: 140%; border-radius: 4px; overflow: hidden; background: #f0f0f0; }
.vitem-pic img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.vitem:hover .vitem-pic img { transform: scale(1.05); }

.vitem-mark { position: absolute; right: 4px; bottom: 4px; padding: 2px 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; font-style: normal; border-radius: 2px; }

.vitem-tit { display: block; padding: 8px 2px 4px; font-size: 13px; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 44px; }
.vitem-tit:hover { color: #f97316; }

/* ============================================
   Breadcrumb
   ============================================ */
.crumb { padding: 8px 0 12px; font-size: 12px; color: #999; }
.crumb a { color: #666; }
.crumb a:hover { color: #f97316; }

/* ============================================
   Detail Page
   ============================================ */
.detail-box { display: flex; gap: 20px; padding: 16px; background: #fafafa; border-radius: 8px; margin-bottom: 20px; }
.detail-cover { width: 180px; flex-shrink: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.detail-cover img { width: 100%; display: block; }

.detail-main { flex: 1; padding: 4px 0; }
.detail-main h1 { font-size: 20px; font-weight: 700; color: #333; margin-bottom: 10px; line-height: 1.3; }

.detail-score { display: inline-block; font-size: 28px; font-weight: 700; color: #f97316; margin-bottom: 12px; }
.detail-score small { font-size: 12px; font-weight: 400; color: #999; margin-left: 2px; }

.detail-list { margin-bottom: 16px; }
.detail-list li { display: flex; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed #eee; }
.detail-list li:last-child { border-bottom: none; }
.detail-list label { width: 50px; color: #999; flex-shrink: 0; }
.detail-list span { color: #333; flex: 1; }

.play-btn { display: inline-block; padding: 10px 32px; background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; font-size: 14px; font-weight: 600; border-radius: 20px; transition: transform .2s, box-shadow .2s; }
.play-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249,115,22,.4); color: #fff; }
.play-btn.off { background: #ddd; color: #999; cursor: not-allowed; box-shadow: none; }

/* Source & Episode */
.source-box { background: #fafafa; border-radius: 8px; padding: 14px; margin-bottom: 16px; }
.source-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.source-head strong { font-size: 14px; color: #f97316; }
.ep-count { font-size: 12px; color: #999; }

.ep-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-list a, .ep-list span { display: inline-block; min-width: 48px; padding: 6px 12px; text-align: center; background: #fff; color: #666; font-size: 12px; border: 1px solid #e5e5e5; border-radius: 4px; transition: all .15s; }
.ep-list a:hover { border-color: #f97316; color: #f97316; background: rgba(249,115,22,.04); }
.ep-list span.cur { background: #f97316; color: #fff; border-color: #f97316; font-weight: 600; }

/* Description */
.desc-box { padding: 16px; background: #fafafa; border-radius: 8px; margin-bottom: 20px; }
.desc-box h3 { font-size: 14px; color: #333; margin-bottom: 10px; }
.desc-box p { font-size: 13px; color: #666; line-height: 1.8; }

/* ============================================
   Player Page
   ============================================ */
.play-page .main-wrap { padding: 0; background: #0f0f0f; }
.player-area { position: relative; width: 100%; max-width: 900px; aspect-ratio: 16/9; background: #000; }
.player-area iframe, .player-area video, .player-area embed, .player-area object { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.player-tip { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1a1a1a; z-index: 2; color: #666; gap: 12px; }
.ld-spin { width: 32px; height: 32px; border: 3px solid #333; border-top-color: #f97316; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.play-info { padding: 16px; background: #fff; }
.play-info h1 { font-size: 16px; font-weight: 600; color: #333; margin-top: 8px; }

.play-page .source-box, .play-page .block { margin: 0; padding: 16px; background: #fff; border-top: 1px solid #eee; }

/* ============================================
   Paging - Progress style
   ============================================ */
.paging { display: flex; justify-content: center; padding: 24px 0; }
.paging ul { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.paging ul li a, .paging a { display: inline-block; min-width: 32px; height: 28px; line-height: 28px; text-align: center; padding: 0 8px; background: #f4f5f7; color: #666; font-size: 12px; border-radius: 4px; transition: all .15s; }
.paging ul li a:hover, .paging a:hover { background: rgba(249,115,22,.1); color: #f97316; }
.paging ul li.active a, .paging .active a { background: #f97316; color: #fff; font-weight: 600; }
.paging ul li.disabled a, .paging .disabled a { background: #f9fafb; color: #ccc; cursor: not-allowed; }

/* Empty */
.empty-box { text-align: center; padding: 40px 0; color: #999; }

/* ============================================
   Footer
   ============================================ */
.footer { background: #fff; border-top: 1px solid #e5e5e5; padding: 20px 0; margin-top: 0; }
.footer-inner { max-width: 1300px; margin: 0 auto; padding: 0 16px; text-align: center; }
.footer-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.footer-row a { font-size: 12px; color: #999; }
.footer-row a:hover { color: #f97316; }
.footer p { font-size: 11px; color: #ccc; }

/* ============================================
   Responsive
   ============================================ */

/* Tablet ≤1024px */
@media (max-width: 1024px) {
    .cols-6 { grid-template-columns: repeat(4, 1fr); }
    .detail-cover { width: 150px; }
    .nav-bar { display: none; position: fixed; top: 52px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px 16px; gap: 0; z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
    .nav-bar.show { display: flex; }
    .nav-bar a { padding: 12px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; border-radius: 0; }
    .nav-btn { display: flex; align-items: center; justify-content: center; }
}

/* Mobile ≤768px */
@media (max-width: 768px) {
    .main-wrap { padding: 12px; }
    .cols-6 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .header-wrap { padding: 0 12px; }
    .search-wrap { display: none; }
    .detail-box { flex-direction: column; padding: 12px; gap: 12px; }
    .detail-cover { width: 120px; }
    .detail-main h1 { font-size: 17px; }
    .block-head h2 { font-size: 14px; }
    .page-bar h1 { font-size: 16px; }
    .vitem-tit { font-size: 12px; height: 38px; }
}

/* Small phone ≤480px */
@media (max-width: 480px) {
    .cols-6 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .vitem-tit { padding: 6px 2px 2px; }
    .ep-list a, .ep-list span { min-width: 40px; padding: 5px 8px; font-size: 11px; }
    .paging ul li a, .paging a { min-width: 28px; height: 26px; line-height: 26px; padding: 0 6px; font-size: 11px; }
    .footer-row { gap: 10px; }
}
