:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --bg-hover: #2a2a2a;
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --accent: #00c853;
    --accent-hover: #00e676;
    --border: #2a2a2a;
    --border-light: #333333;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
    --header-height: 64px;
    --max-width: 1400px;
    --transition: all 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }
input, button, select { font-family: inherit; font-size: inherit; outline: none; }

.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10,10,10,0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); height: var(--header-height);
}
.header-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.header-logo a {
    display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 700; color: #fff;
}
.header-logo img { height: 36px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav > li { position: relative; }
.header-nav > li > a {
    display: block; padding: 8px 16px; font-size: 0.9rem; font-weight: 500;
    border-radius: var(--radius-sm); color: var(--text-secondary); white-space: nowrap;
}
.header-nav > li > a:hover,
.header-nav > li > a.active { color: #fff; background: var(--bg-tertiary); }
.header-nav > li > a .nav-arrow { font-size: 0.65rem; margin-left: 3px; vertical-align: middle; }

.header-subnav {
    position: absolute; top: 100%; left: 0; min-width: 140px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 6px 0; display: none; box-shadow: var(--shadow);
}
.header-nav > li:hover .header-subnav { display: block; }
.header-subnav li a {
    display: block; padding: 8px 20px; font-size: 0.85rem; color: var(--text-secondary);
}
.header-subnav li a:hover { color: #fff; background: var(--bg-hover); }

.header-search {
    display: flex; align-items: center; flex-shrink: 0;
    margin-left: 16px;
}
.header-search form {
    display: flex; align-items: center; background: var(--bg-tertiary);
    border: 1px solid var(--border); border-radius: 24px; overflow: hidden;
}
.header-search input[type="text"] {
    width: 200px; padding: 8px 16px; background: transparent; border: none; color: var(--text-primary);
    font-size: 0.85rem;
}
.header-search input[type="text"]::placeholder { color: var(--text-muted); }
.header-search input[type="submit"] {
    padding: 8px 18px; background: var(--accent); border: none; color: #000;
    font-weight: 600; cursor: pointer; font-size: 0.85rem; transition: var(--transition);
}
.header-search input[type="submit"]:hover { background: var(--accent-hover); }

.menu-toggle {
    display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px;
    background: transparent; border: none;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }

.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999; }
.overlay.active { display: block; }

.main-content { max-width: var(--max-width); margin: 0 auto; padding: calc(var(--header-height) + 20px) 20px 20px; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; font-size: 0.8rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-secondary); }

.banner-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 32px; aspect-ratio: 16/6; }
.banner-wrap .banner-item {
    position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease;
}
.banner-wrap .banner-item.active { opacity: 1; z-index: 1; }
.banner-wrap .banner-item:first-child.active { transition: none; }
.banner-wrap .banner-item img { width: 100%; height: 100%; object-fit: cover; }
.banner-info {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 32px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.banner-info h2 { font-size: 1.5rem; margin-bottom: 6px; }
.banner-info p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 4px; }
.banner-dots {
    position: absolute; bottom: 12px; right: 24px; z-index: 2;
    display: flex; gap: 8px;
}
.banner-dots .dot {
    width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.3);
    cursor: pointer; transition: var(--transition);
}
.banner-dots .dot.active { background: var(--accent); width: 24px; border-radius: 5px; }
.banner-dots .dot:first-child.active { transition: none; }

.section { margin-bottom: 36px; }
.section-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.section-title {
    font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.section-title::before {
    content: ''; width: 4px; height: 20px; background: var(--accent); border-radius: 2px;
}
.section-more { font-size: 0.8rem; color: var(--text-muted); }
.section-more:hover { color: var(--accent); }

.vod-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;margin-bottom: 20px;
}

.vod-card { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-secondary); transition: var(--transition); }
.vod-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.vod-card-thumb { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--bg-tertiary); }
.vod-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.vod-card:hover .vod-card-thumb img { transform: scale(1.05); }
.vod-card-score {
    position: absolute; top: 8px; right: 8px; background: var(--accent); color: #000;
    font-size: 0.75rem; font-weight: 700; padding: 3px 7px; border-radius: 4px;
}
.vod-card-remark {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 6px 8px; background: linear-gradient(transparent, rgba(0,0,0,0.7));
    font-size: 0.72rem; color: #fff;
}
.vod-card-title {
    padding: 10px 10px 12px; font-size: 0.85rem; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.filter-bar {
    background: var(--bg-secondary); border-radius: var(--radius-md);
    padding: 16px; margin-bottom: 20px; border: 1px solid var(--border);
}
.filter-submenu {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 12px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.filter-submenu a {
    padding: 5px 14px; font-size: 0.82rem; border-radius: var(--radius-sm);
    background: var(--bg-tertiary); color: var(--text-secondary);
    transition: var(--transition);
}
.filter-submenu a:hover,
.filter-submenu a.active {
    background: var(--accent); color: #000;
}
.filter-row {
    display: flex; margin-bottom: 10px;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-label {
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; min-width: 56px;
    font-size: 0.82rem; color: var(--text-muted); font-weight: 500;
}
.filter-options {
    display: flex; flex-wrap: wrap; gap: 6px; flex: 1;
}
.filter-options a {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 4px 12px; font-size: 0.8rem; border-radius: var(--radius-sm);
    background: var(--bg-tertiary); color: var(--text-secondary);
    border: 1px solid transparent; white-space: nowrap;
    transition: var(--transition);
}
.filter-options a:hover { color: #fff; border-color: var(--border-light); }
.filter-options a.active { background: var(--accent); color: #000; border-color: var(--accent); }

.page-header-row {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.page-title { font-size: 1.3rem; font-weight: 700; }
.page-count { font-size: 0.85rem; color: var(--text-muted); }

.pagination {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 24px 0; flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px; font-size: 0.85rem;
    border-radius: var(--radius-sm); background: var(--bg-secondary);
    color: var(--text-secondary); border: 1px solid var(--border);
    transition: var(--transition);
}
.pagination a:hover { color: #fff; border-color: var(--accent); }
.pagination a.active, .pagination span.active { background: var(--accent); color: #000; border-color: var(--accent); }
.pagination span { color: var(--text-muted); }

.detail-container { display: flex; gap: 24px; margin-bottom: 32px; }
.detail-poster { flex-shrink: 0; width: 240px; }
.detail-poster img { width: 100%; border-radius: var(--radius-md); }
.detail-info { flex: 1; min-width: 0; }
.detail-info h1 { font-size: 1.5rem; margin-bottom: 12px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; font-size: 0.85rem; color: var(--text-secondary); }
.detail-meta span { color: var(--text-muted); }
.detail-meta strong { color: var(--text-primary); font-weight: 500; }
.detail-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.detail-desc.expanded { display: block; -webkit-line-clamp: unset; }
.detail-desc-toggle { color: var(--accent); font-size: 0.8rem; cursor: pointer; display: inline-block; margin-bottom: 16px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail-tag { padding: 3px 10px; font-size: 0.78rem; background: var(--bg-tertiary); border-radius: var(--radius-sm); color: var(--text-secondary); }
.detail-tag:hover { background: var(--bg-hover); color: #fff; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px;
    font-size: 0.9rem; font-weight: 600; border-radius: var(--radius-md); cursor: pointer;
    transition: var(--transition); border: none;
}
.detail-btn-primary { background: var(--accent); color: #000; }
.detail-btn-primary:hover { background: var(--accent-hover); color: #000; }

.play-section { margin-bottom: 24px; }
.play-section-title {
    font-size: 1rem; font-weight: 600; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.play-section-title::before { content: ''; width: 3px; height: 16px; background: var(--accent); border-radius: 2px; }

.play-source-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.play-source-tab {
    padding: 6px 16px; font-size: 0.8rem; border-radius: var(--radius-sm); cursor: pointer;
    background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid transparent;
    transition: var(--transition);
}
.play-source-tab.active, .play-source-tab:hover { color: #fff; border-color: var(--accent); background: var(--bg-hover); }

.play-episode-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.play-episode-grid a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 52px; padding: 6px 14px; font-size: 0.8rem;
    border-radius: var(--radius-sm); background: var(--bg-tertiary);
    border: 1px solid var(--border); color: var(--text-secondary);
    transition: var(--transition);
}
.play-episode-grid a:hover, .play-episode-grid a.current {
    background: var(--accent); color: #000; border-color: var(--accent);
}

/* ===== 播放页 ===== */
.play-header {
    text-align: center; margin-bottom: 24px; padding: 24px 0 12px;
}
.play-title {
    font-size: 1.6rem; font-weight: 700; color: #fff; margin-bottom: 10px;
    line-height: 1.4;
}
.play-meta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 0.85rem; color: var(--text-secondary); flex-wrap: wrap;
}
.play-meta-divider { color: var(--border-light); font-size: 0.7rem; }

.play-main { max-width: var(--max-width); margin-bottom: 28px; }

.player-container {
    position: relative; aspect-ratio: 16/9; background: #000;
    border-radius: var(--radius-md); overflow: hidden;
}
.player-container iframe { width: 100%; height: 100%; border: none; }
.player-status {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: var(--text-secondary);
}

/* 介绍区域 */
.play-info-section { margin-bottom: 36px; }
.play-info-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.play-info-box {
    background: var(--bg-secondary); border-radius: var(--radius-md);
    padding: 20px; border: 1px solid var(--border);
}
.play-info-box h3 {
    font-size: 1rem; font-weight: 600; margin-bottom: 16px;
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.play-info-content { }
.play-info-row {
    display: flex; padding: 7px 0; font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}
.play-info-row:last-child { border-bottom: none; }
.play-info-label {
    color: var(--text-muted); flex-shrink: 0; min-width: 56px;
}
.play-info-value { color: var(--text-secondary); flex: 1; min-width: 0; }
.play-info-value a { color: var(--text-secondary); }
.play-info-value a:hover { color: var(--accent); }
.play-blurb {
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.8;
}

.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-item { display: flex; gap: 16px; padding: 16px; background: var(--bg-secondary); border-radius: var(--radius-md); border: 1px solid var(--border); transition: var(--transition); }
.article-item:hover { border-color: var(--border-light); }
.article-item-img { width: 180px; height: 120px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.article-item-img img { width: 100%; height: 100%; object-fit: cover; }
.article-item-content { flex: 1; min-width: 0; }
.article-item-content h3 { font-size: 1.05rem; margin-bottom: 8px; }
.article-item-content .art-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.article-item-content .art-blurb { font-size: 0.85rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.article-detail { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 24px; border: 1px solid var(--border); }
.article-detail h1 { font-size: 1.6rem; margin-bottom: 12px; text-align: center; }
.article-detail .art-info { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.article-detail .art-body { font-size: 0.95rem; line-height: 1.9; color: var(--text-secondary); }
.article-detail .art-body img { max-width: 100%; border-radius: var(--radius-md); margin: 12px 0; }

.footer { margin-top: 48px; border-top: 1px solid var(--border); padding: 32px 20px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 16px; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-divider { color: var(--border); }
.footer-text { font-size: 0.75rem; color: var(--text-muted); line-height: 1.8; }

@media (max-width: 1200px) {
    .vod-grid { grid-template-columns: repeat(4, 1fr); }
    .detail-poster { width: 200px; }
}
@media (max-width: 992px) {
    .vod-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-container { flex-direction: column; }
    .detail-poster { width: 180px; margin: 0 auto; }
    .banner-wrap { min-height: 300px; margin-bottom: 0px;}
    .play-info-grid { grid-template-columns: 1fr; }
    .play-title { font-size: 1.4rem; }
}
@media (max-width: 768px) {
    :root { --header-height: 56px; }
    .header { backdrop-filter: none; background: var(--bg-primary); }
    .vod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .header-search { display: none; }
    .menu-toggle { display: flex; }
    .header-nav {
        position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0;
        z-index: 1001;
        background: var(--bg-primary); flex-direction: column; padding: 16px;
        transform: translateX(-100%); transition: transform 0.3s ease;
        overflow-y: auto; gap: 2px; align-items: stretch;
    }
    .header-nav.open { transform: translateX(0); }
    .header-nav > li > a { padding: 12px 16px; font-size: 0.95rem;  }
    .header-subnav { position: static; display: none; background: transparent; border: none; box-shadow: none; }
    .header-nav > li.open .header-subnav { display: block; }
    .header-subnav li a { text-align: center; padding: 8px 16px; }
    .banner-wrap { aspect-ratio: 16/9; }
    .banner-info { padding: 24px 16px 16px; }
    .banner-info h2 { font-size: 1.1rem; }
    .section-title { font-size: 1rem; }
    .filter-bar { padding: 10px; }
    .filter-row { flex-direction: column; }
    .filter-label { justify-content: flex-start; min-width: auto; height: auto; margin-bottom: 4px; }
    .article-item { flex-direction: column; }
    .article-item-img { width: 100%; height: 160px; }
    .detail-poster { width: 140px; }
    .detail-info h1 { font-size: 1.2rem; }
    .article-detail { padding: 16px; }
    .article-detail h1 { font-size: 1.2rem; }
    .main-content { padding-top:  12px; }
    .play-header { padding: 12px 0; }
    .play-title { font-size: 1.2rem; }
    .play-meta { font-size: 0.8rem; }
    .play-info-grid { grid-template-columns: 1fr; gap: 12px; }
    .play-info-box { padding: 14px; }
}
@media (max-width: 480px) {
    .vod-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .vod-card-title { font-size: 0.78rem; padding: 6px 8px 8px; }
    .pagination a, .pagination span { min-width: 30px; height: 30px; font-size: 0.75rem; padding: 0 6px; }
}

.mac_total { font-weight: 600; color: var(--accent); }
