/* ==================== 主题变量 ==================== */
:root {
    --primary: #1a73e8;
    --primary-light: #4285f4;
    --primary-dark: #1557b0;
    --primary-bg: #e8f0fe;
    --navbar-bg: linear-gradient(135deg, #1a73e8, #4285f4);
    --accent: #ff6b35;
    --footer-bg: #1a1a2e;
    --footer-color: #888;
}
/* 黑金 */
body.theme-blackgold {
    --primary: #d4af37;
    --primary-light: #f0d060;
    --primary-dark: #b8941f;
    --primary-bg: #2a2520;
    --navbar-bg: linear-gradient(135deg, #1a1a1a, #2d2520);
    --accent: #d4af37;
}
body.theme-blackgold { --footer-bg: #0d0d0d; --footer-color: #888; }
body.theme-blackgold .navbar { background: var(--navbar-bg); }
body.theme-blackgold .filter-tag.active { background: linear-gradient(135deg,#d4af37,#f0d060); box-shadow: 0 3px 10px rgba(212,175,55,.35); }
body.theme-blackgold .section-title { border-left-color: #d4af37; }
body.theme-blackgold .banner-overlay { background: linear-gradient(transparent, rgba(0,0,0,.8)); }
/* 暗夜 */
body.theme-dark {
    --primary: #90caf9;
    --primary-light: #bbdefb;
    --primary-dark: #64b5f6;
    --primary-bg: #1e1e1e;
    --navbar-bg: linear-gradient(135deg, #121212, #1e1e1e);
    --accent: #90caf9;
}
body.theme-dark { background: #121212; color: #e0e0e0; }
body.theme-dark .navbar { background: var(--navbar-bg); }
body.theme-dark .filter-bar, body.theme-dark .video-card .info, body.theme-dark .admin-card { background: #1e1e1e; }
body.theme-dark .filter-tag { background: #2a2a2a; color: #bbb; }
body.theme-dark .filter-tag:hover { background: #333; color: #90caf9; border-color: #90caf9; }
body.theme-dark .filter-tag.active { background: linear-gradient(135deg,#1565c0,#42a5f5); }
body.theme-dark .video-card .title { color: #e0e0e0; }
body.theme-dark .video-card .meta { color: #888; }
body.theme-dark .section-title { color: #e0e0e0; border-left-color: #90caf9; }
body.theme-dark .empty { color: #888; }
body.theme-dark { --footer-bg: #0a0a0a; --footer-color: #666; }
body.theme-dark .footer { background: var(--footer-bg); color: var(--footer-color); }
/* 墨绿 */
body.theme-green {
    --primary: #2e7d32;
    --primary-light: #4caf50;
    --primary-dark: #1b5e20;
    --primary-bg: #e8f5e9;
    --navbar-bg: linear-gradient(135deg, #1b5e20, #2e7d32);
    --accent: #ff9800;
}
body.theme-green .navbar { background: var(--navbar-bg); }
body.theme-green .filter-tag.active { background: linear-gradient(135deg,#2e7d32,#4caf50); box-shadow: 0 3px 10px rgba(46,125,50,.35); }
body.theme-green .filter-tag:hover { color: #2e7d32; border-color: #2e7d32; background: #e8f5e9; }
body.theme-green { --footer-bg: #1b3a1e; --footer-color: #888; }
body.theme-green .section-title { border-left-color: #2e7d32; }
/* 暗紫 */
body.theme-purple {
    --primary: #7b1fa2;
    --primary-light: #9c27b0;
    --primary-dark: #4a148c;
    --primary-bg: #f3e5f5;
    --navbar-bg: linear-gradient(135deg, #4a148c, #7b1fa2);
    --accent: #ff5722;
}
body.theme-purple .navbar { background: var(--navbar-bg); }
body.theme-purple .filter-tag.active { background: linear-gradient(135deg,#7b1fa2,#9c27b0); box-shadow: 0 3px 10px rgba(123,31,162,.35); }
body.theme-purple .filter-tag:hover { color: #7b1fa2; border-color: #7b1fa2; background: #f3e5f5; }
body.theme-purple { --footer-bg: #2a1540; --footer-color: #888; }
body.theme-purple .section-title { border-left-color: #7b1fa2; }
/* 中国红 */
body.theme-red {
    --primary: #c62828;
    --primary-light: #e53935;
    --primary-dark: #b71c1c;
    --primary-bg: #ffebee;
    --navbar-bg: linear-gradient(135deg, #b71c1c, #c62828);
    --accent: #ffc107;
}
body.theme-red .navbar { background: var(--navbar-bg); }
body.theme-red .filter-tag.active { background: linear-gradient(135deg,#c62828,#e53935); box-shadow: 0 3px 10px rgba(198,40,40,.35); }
body.theme-red .filter-tag:hover { color: #c62828; border-color: #c62828; background: #ffebee; }
body.theme-red { --footer-bg: #3a1010; --footer-color: #888; }
body.theme-red .section-title { border-left-color: #c62828; }

/* ==================== 喜福影视采集站 样式 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* 导航栏 */
.navbar {
    background: var(--navbar-bg);
    color: #fff;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 8px;
}
.navbar .logo {
    font-size: 20px;
    font-weight: bold;
    margin-right: 24px;
    white-space: nowrap;
}
.navbar .nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}
.navbar .nav-links a {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: background .2s;
    white-space: nowrap;
}
/* 导航图标（仅手机端底部导航显示） */
.navbar .nav-links a::before {
    display: none;
    font-size: 18px;
    line-height: 1;
}
.navbar .nav-links a:nth-child(1)::before { content: "\1F3E0"; }
.navbar .nav-links a:nth-child(2)::before { content: "\1F4FA"; }
.navbar .nav-links a:nth-child(3)::before { content: "\1F3AC"; }
.navbar .nav-links a:nth-child(4)::before { content: "\1F3A8"; }
.navbar .nav-links a:nth-child(5)::before { content: "\1F3A4"; }
.navbar .nav-links a:nth-child(6)::before { content: "\1F4F1"; }

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    background: rgba(255,255,255,.2);
}
.navbar .search-box {
    display: flex;
    gap: 0;
}
.navbar .search-box button:hover { background: rgba(255,255,255,.4); }
.navbar .search-box input {
    padding: 6px 12px;
    border: none;
    border-radius: 6px 0 0 6px;
    font-size: 13px;
    width: 160px;
    outline: none;
}
.navbar .search-box button {
    padding: 6px 14px;
    border: none;
    background: rgba(255,255,255,.25);
    color: #fff;
    transition: background .2s;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 13px;
}

/* Banner */
.banner {
    background: var(--navbar-bg);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
}
.banner h1 { font-size: 28px; margin-bottom: 8px; }
.banner p { font-size: 14px; opacity: .9; }

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 区块标题 */
.section-title {
    font-size: 20px;
    font-weight: bold;
    margin: 24px 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.section-title a {
    font-size: 13px;
    color: var(--primary);
    font-weight: normal;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
}
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.video-card .cover {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: #eee;
    overflow: hidden;
}
.video-card .cover img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-card .cover .score {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,109,0,.9);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
.video-card .info {
    padding: 10px 12px;
}
.video-card .info .title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.video-card .info .meta {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.pagination .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all .2s;
}
.pagination .page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination .page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pagination .page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
}
.pagination .page-btn.ellipsis {
    border: none;
    background: none;
    cursor: default;
}

/* 播放页 */
.player-wrap {
    background: #000;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}
.player-wrap iframe {
    width: 100%;
    height: 500px;
    border: none;
    display: block;
}
.player-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 0 0 8px 8px;
    margin-bottom: 20px;
}
.player-controls button {
    padding: 8px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background .2s;
}
.player-controls button:hover { background: var(--primary-dark); }
.player-controls button:disabled {
    background: #555;
    cursor: not-allowed;
}

/* 详情信息 */
.detail-info {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.detail-info .poster {
    width: 140px;
    flex-shrink: 0;
}
.detail-info .poster img {
    width: 100%;
    border-radius: 6px;
}
.detail-info .detail-text h1 {
    font-size: 22px;
    margin-bottom: 10px;
}
.detail-info .detail-text .meta {
    color: #666;
    font-size: 13px;
    margin-bottom: 6px;
}
.detail-info .detail-text .desc {
    color: #888;
    font-size: 13px;
    line-height: 1.7;
    margin-top: 10px;
}

/* 播放源 */
.source-block {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.source-header {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.source-header img {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}
.source-header h3 { font-size: 15px; }
.source-header .count { font-size: 12px; opacity: .85; margin-left: auto; }
.episode-list {
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.episode-list a {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f0f0;
    color: #333;
    border-radius: 4px;
    font-size: 13px;
    transition: all .2s;
    min-width: 50px;
    text-align: center;
    cursor: pointer;
}
.episode-list a:hover {
    background: var(--primary);
    color: #fff;
}
.episode-list a.active {
    background: var(--primary);
    color: #fff;
}
.episode-list a.vip {
    background: #fff3e0;
    color: #ff6d00;
}
.episode-list a.vip:hover {
    background: #ff6d00;
    color: #fff;
}
.episode-list a.active.vip {
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* 页脚 */
.footer {
    background: var(--footer-bg);
    color: var(--footer-color);
    text-align: center;
    padding: 24px 20px;
    margin-top: 40px;
    font-size: 13px;
}
.footer a { color: #aaa; }

/* 空状态 */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* 响应式 */
@media (max-width: 768px) {
    body { padding-bottom: 64px; }
    .navbar-inner { height: 52px; gap: 8px; }
    .navbar .logo { font-size: 16px; margin-right: 0; flex-shrink: 0; }
    .navbar .search-box { margin-left: auto; flex-shrink: 0; }
    .navbar .search-box input { width: 90px; padding: 5px 8px; font-size: 12px; }
    .navbar .search-box button { padding: 5px 10px; font-size: 12px; }
    /* 底部悬浮导航 */
    .navbar .nav-links {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: var(--navbar-bg);
        justify-content: space-around;
        padding: 6px 0 8px;
        gap: 0;
        box-shadow: 0 -2px 12px rgba(0,0,0,.15);
        order: 0;
        width: auto;
    }
    .navbar .nav-links a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 4px 2px;
        font-size: 10px;
        gap: 3px;
        border-radius: 0;
        opacity: .7;
    }
    .navbar .nav-links a::before { display: block; }
    .navbar .nav-links a.active { opacity: 1; background: rgba(255,255,255,.15); }
    .navbar .nav-links a:hover { background: rgba(255,255,255,.1); }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
    .player-wrap iframe { height: 280px; }
    .detail-info { flex-direction: column; }
    .detail-info .poster { width: 100px; margin: 0 auto; }
    .banner h1 { font-size: 22px; }
    .container { padding: 12px; }
}

/* ==================== 筛选栏 ==================== */
.filter-bar {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.filter-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-row:last-child { border-bottom: none; }
.filter-label {
    flex-shrink: 0;
    width: 50px;
    font-size: 14px;
    color: #999;
    padding-top: 4px;
}
.filter-options {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.filter-tag {
    display: inline-block;
    padding: 5px 16px;
    background: #f5f7fa;
    color: #606266;
    border-radius: 20px;
    font-size: 13px;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.filter-tag::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(26,115,232,.15);
    transform: translate(-50%,-50%);
    transition: width .3s, height .3s;
}
.filter-tag:hover {
    background: #e8f0fe;
    color: #1a73e8;
    border-color: #1a73e8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26,115,232,.2);
}
.filter-tag:hover::before {
    width: 200px;
    height: 200px;
}
.filter-tag:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(26,115,232,.15);
}
.filter-tag.active {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(26,115,232,.35);
    font-weight: 500;
}
.filter-tag.active:hover {
    background: linear-gradient(135deg, #1557b0, #3367d6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,.4);
}
.filter-tag.active::before {
    background: rgba(255,255,255,.2);
}

/* 卡片标签 */
.video-card .cover .card-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

@media (max-width: 768px) {
    .filter-bar { padding: 12px; }
    .filter-label { width: 40px; font-size: 13px; }
    .filter-tag { padding: 3px 10px; font-size: 12px; }
}

/* ==================== Banner轮播 ==================== */
.banner-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.banner-slides {
    position: relative;
    width: 100%;
    padding-bottom: 35%;
    overflow: hidden;
}
.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.6s ease;
}
.banner-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}
.banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}
.banner-overlay h2 {
    font-size: 28px;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.banner-overlay p {
    font-size: 16px;
    opacity: 0.9;
}
.banner-prev, .banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}
.banner-prev:hover, .banner-next:hover {
    background: rgba(0,0,0,0.7);
}
.banner-prev { left: 15px; }
.banner-next { right: 15px; }
.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}
.banner-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 5px;
}

/* ==================== 综艺年份/月份筛选 ==================== */
.zy-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}
.zy-filter-btn, .zy-month-btn {
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.zy-filter-btn:hover, .zy-month-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.zy-filter-btn.active, .zy-month-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.zy-year-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.zy-year-label {
    font-size: 13px;
    color: #888;
    font-weight: bold;
}
.zy-month-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.zy-episode-list {
    padding: 16px;
    min-height: 60px;
}
.zy-episode-list .loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

@media (max-width: 768px) {
    .banner-slides { padding-bottom: 50%; }
    .banner-overlay { padding: 15px 20px; }
    .banner-overlay h2 { font-size: 18px; }
    .banner-overlay p { font-size: 13px; }
    .banner-prev, .banner-next { width: 32px; height: 32px; font-size: 14px; }
    .zy-filter-bar { padding: 10px; gap: 6px; }
    .zy-year-group { flex-wrap: wrap; }
}

/* 电影播放源集中显示 */
.movie-sources-block {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.movie-sources-block .source-header {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.movie-sources-block .source-header h3 { font-size: 15px; }
.movie-sources-block .episode-list {
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.movie-sources-block .play-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #f0f0f0;
    color: #333;
    border-radius: 6px;
    font-size: 14px;
    transition: all .2s;
    cursor: pointer;
    border: 2px solid transparent;
}
.movie-sources-block .play-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}
.movie-sources-block .play-link.active {
    background: var(--primary);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transform: translateY(-1px);
}
.movie-sources-block .play-link.vip {
    background: #fff3e0;
    color: #ff6d00;
}
.movie-sources-block .play-link.vip:hover {
    background: #ff6d00;
    color: #fff;
}
.movie-sources-block .play-link.active.vip {
    background: var(--primary) !important;
    color: #fff !important;
}

/* 友情链接（在footer内） */
.footer .friend-links {
    max-width: 1200px;
    margin: 0 auto 16px;
    padding: 0 16px;
    text-align: center;
}
.footer .friend-links-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    font-weight: normal;
}
.footer .friend-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.footer .friend-links-list a {
    color: #888;
    font-size: 12px;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 3px;
    background: rgba(255,255,255,.06);
    transition: all .2s;
}
.footer .friend-links-list a:hover {
    background: var(--primary);
    color: #fff;
}
