/* ==============================================
   全局重置 & 基础样式
   ============================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #fff;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: #000;
    text-decoration: underline;
}

ul, li {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: none;
}

input, button {
    border: none;
    outline: none;
    font-family: inherit;
}

h1, h2, h3, h4 {
    font-weight: 500;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ==============================================
   头部区域
   ============================================== */
.header {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    flex-shrink: 0;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 520px;
    min-width: 200px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.search-box:focus-within {
    border-color: #000;
}

.search-input {
    flex: 1;
    height: 36px;
    padding: 0 14px;
    border: none;
    font-size: 14px;
    background: transparent;
}

.search-submit {
    height: 36px;
    padding: 0 18px;
    background: #000;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.search-submit:hover {
    opacity: 0.85;
}

/* 快捷图标导航 */
.header-quick {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-shrink: 0;
    font-weight: 300;
}

.header-quick a {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 17px;
    color: #1a1a1a;
    white-space: nowrap;
    transition: color 0.2s;
    line-height: 1.2;
}

.header-quick .icon {
    font-size: 19px;
    line-height: 1;
    color: #444;
    font-weight: 500;
}

.header-quick a:hover {
    color: #000;
}
.header-quick a:hover .icon {
    color: #000;
}

/* 主导航 */
.nav {
    width: 100%;
    margin-top: 6px;
    background: #1a1a1a;
    border-radius: 8px;
}

.nav ul {
    display: flex;
    align-items: center;
    justify-content: space-around;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 54px;
}
.nav ul::-webkit-scrollbar {
    display: none;
}

.nav li {
    flex-shrink: 0;
}

.nav li a {
    display: block;
    font-size: 17px;
    color: #f1f1f1;
    margin: 6px 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav li a.active {
    color: #fff;
    font-weight: 600;
    font-size: 22px;
    padding-bottom: 2px;
}

.nav li a:hover {
    color: #fff;
}

/* ==============================================
   通用模块
   ============================================== */
/* 通栏广告 */
.ad-banner {
    width: 100%;
    max-width: 1200px;
    margin: 5px auto;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    border-radius: 8px;
}

.ad-banner .container {
    padding: 0 10px;
}

.ad-banner a {
    display: block;
    outline: none;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 4px;
    transition: opacity 0.2s;
}
.ad-banner img:hover {
    opacity: 0.92;
}

.ad-banner-empty {
    color: #999;
    font-size: 13px;
    padding: 8px 0;
    text-align: center;
}

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #1a1a1a;
}

.breadcrumb a {
    color: #666;
}
.breadcrumb a:hover {
    color: #000;
}

.breadcrumb span {
    margin: 0 6px;
}

/* 筛选区 */
.filter-wrap {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: nowrap;
    width: 100%;
}
.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 2px 0;
    font-weight: 500;
}

.filter-list {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
}
.filter-list::-webkit-scrollbar {
    display: none;
}

.filter-tag {
    font-size: 13px;
    color: #999;
    padding: 3px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
    border: 1px solid transparent;
}

.filter-tag.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
.filter-tag:hover:not(.active) {
    color: #000;
    border-color: #ddd;
}

/* 内容区块 */
.section {
    padding: 25px 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 17px;
    flex-wrap: wrap;
    gap: 6px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    border-left: 3px solid #000;
    padding-left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.section-title-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-sort {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.sort-tag {
    font-size: 13px;
    color: #999;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 40px;
    text-align: center;
    border: 1px solid transparent;
}

.sort-tag.active {
    font-size: 13px;
    color: #fff;
    background: #1a1a1a;
}
.sort-tag:hover:not(.active) {
    color: #000;
    border-color: #fff;
}

.section-more {
    font-size: 13px;
    color: #999;
    margin-left: 6px;
}
.section-more:hover {
    color: #000;
}

.empty-tip {
    padding: 60px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ==============================================
   视频列表 & 卡片
   ============================================== */
.video-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    width: 100%;
    align-items: stretch;
}

.video-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    transition: all 0.25s ease;
    padding-bottom: 6px;
}
.video-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.14), 0 3px 6px rgba(0,0,0,0.08);
}

.video-pic {
    width: 100%;
    padding-top: 66.67%;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.video-pic img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: 100% !important;
    max-height: 100% !important;
    loading: lazy;
}

.video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    font-size: 11px;
    color: #fff;
    border-radius: 4px;
    background: rgba(0,0,0,0.7);
}
.badge-hot { background: rgba(220,38,38,0.9); }
.badge-new { background: rgba(1,1,1,0.6); top:auto; left:auto; bottom:8px; right:8px; }
.badge-finish { background: rgba(107,114,128,0.9); }

.video-title {
    font-size: 14px;
    line-height: 1.4;
    margin: 8px 6px 0;
    font-weight: 500;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.8em;
}

.video-sub {
    font-size: 12px;
    color: #999;
    margin: 3px 6px 6px;
    display: flex;
    justify-content: space-between;
}

.video-tag-wrap, .video-tag {
    margin: 6px 6px 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag-item {
    font-size: 11px;
    color: #666;
    padding: 2px 6px;
    border: 1px solid #eee;
    border-radius: 3px;
    transition: all 0.2s;
}
.tag-item:hover {
    border-color: #000;
    color: #000;
}

/* ==============================================
   播放页专用（player-main 完全保持原始写法）
   ============================================== */
.play-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
}
.player-box {
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
.player-box.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-radius: 0;
    margin-bottom: 0;
}
.player-main {
    width: 100%;
    aspect-ratio: 16/9;
}

.player-box.fixed {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
    width: 320px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.player-box.fixed .player-main {
    min-height: 180px;
}

.source-tab {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.source-tab a {
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    border: 1px solid #eee;
    background: #fff;
}
.source-tab a.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 8px;
    margin-bottom: 25px;
}

.episode-list a {
    display: block;
    padding: 6px 8px;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    border: 1px solid #eee;
    background: #fff;
}
.episode-list a.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.detail-info {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 25px;
}

.detail-info h2 {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    border-left: 3px solid #000;
    padding-left: 10px;
    margin-bottom: 12px;
}

.detail-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    text-indent: 2em;
}

/* ==============================================
   分页 & 页脚 & 返回顶部
   ============================================== */
.black_pages {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    font-size: 14px;
    color: #666;
}
.page_info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.page_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 39px;
    height: 39px;
    padding: 0;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}
.page_link:hover {
    border-color: #000;
    color: #000;
    background: #fafafa;
}
.page_link.page_current {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
    font-weight: 500;
    font-size: 20px;
    cursor: default;
}
.wrap {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 15px;
}

.footer {
    border-top: 1px solid #eee;
    padding: 25px 0;
    margin-top: 40px;
    font-size: 13px;
    line-height: 1.8;
    color: #888;
}
.footer .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}
.footer-seo-content {
    text-align: left;
    color: #363636;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.footer-seo-content strong {
    color: #242424;
    font-weight: 500;
}
.footer-seo-content h2 {
    font-size: 14px;
    margin: 10px 0 5px;
    color: #555;
    font-weight: 600;
}
.footer-seo-content p {
    margin-bottom: 8px;
}
.footer-seo-content a {
    color: #be0000;
    text-decoration: none;
    border-bottom: 1px solid rgba(190,0,0,0.3);
    transition: all 0.2s ease;
}
.footer-seo-content a:hover {
    color: #000;
    border-bottom-color: #000;
}
.footer-icp {
    font-size: 11px;
    color: #ccc;
    margin-top: 12px;
    text-align: center;
}

#backTop {
    position: fixed;
    right: 25px;
    bottom: 140px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    color: #666;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 999;
}
#backTop.show {
    opacity: 1;
    visibility: visible;
}
#backTop:hover {
    border-color: #000;
    background: #1a1a1a;
    color: #fff;
}
/* ========== 标签页专属样式（与全站风格统一） ========== */
.tag-list-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 0;
}
.tag-list-wrap .tag-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 13px;
    color: #666;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.tag-list-wrap .tag-item:hover {
    color: #fff;
    background: #1a1a1a;
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.empty-tip {
    width: 100%;
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}
/* ==============================
   报错弹窗 · 遮罩层 + 弹窗主体
============================== */
/* 遮罩层：全屏 + 弹性居中 */
.mac_pop_bg {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 弹窗本身：禁止任何偏移，交给父容器自动居中 */
.mac_pop {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
    /* 下面是你原来的外观样式，保留不动 */
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    overflow: hidden;
}

/* 弹窗头部 */
.mac_pop .pop_top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
}
.mac_pop .pop_top h2 {
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    margin: 0;
}
.mac_pop .pop_close {
    font-size: 18px;
    color: #999999;
    cursor: pointer;
    transition: color 0.2s;
}
.mac_pop .pop_close:hover {
    color: #111111;
}

/* 弹窗内容区 */
.mac_pop .pop_content {
    padding: 16px;
}

/* 表单提示 */
.mac_report .msg_cue {
    font-size: 13px;
    color: #666666;
    margin-bottom: 8px;
}

/* 文本域 */
.mac_report .gbook_content {
    width: 100% !important;
    height: 150px !important;
    border: 1px solid #dddddd;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    color: #333333;
    line-height: 1.5;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
}
.mac_report .gbook_content:focus {
    border-color: #111111;
}

/* 提交按钮 */
.mac_report .gbook_submit {
    width: 100px !important;
    height: 32px !important;
    margin: 10px auto 0 !important;
    background: #111111;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.mac_report .gbook_submit:hover {
    opacity: 0.85;
}
.share-box{padding:15px 0;}
.share-row{margin-bottom:16px;}
.share-label{display:block;font-size:13px;color:#666;margin-bottom:6px;}
.share-val{font-size:14px;color:#222;word-break:break-all;line-height:1.5;}
.share-link-wrap{display:flex;gap:8px;}
.share-input{flex:1;padding:7px 10px;border:1px solid #ddd;border-radius:4px;font-size:13px;outline:none;}
.share-copy-btn{padding:7px 15px;border:none;border-radius:4px;background:#222;color:#fff;font-size:13px;cursor:pointer;transition:opacity .2s;}
.share-copy-btn:hover{opacity:.85;}
/* ==============================================
   响应式适配
   ============================================== */
/* 平板及以下 */
@media (max-width: 991px) {
    .video-list { grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .section { padding: 20px 0; }
    .header-quick { gap: 22px; }
    .search-box { max-width: 400px; }
    .filter-wrap { padding: 18px 0; }
    .filter-tag { padding: 3px 8px; min-width: 36px; }
    .section-head { margin-bottom: 17px; }
    .player-main { min-height: 360px; }
    .player-box.fixed { width: 280px; }
}

/* 手机端 */
@media (max-width: 767px) {
    .header-inner { gap: 6px; align-items: center; }
    .logo { order: 1; }
    .search-box { display: none !important; }
    .header-quick {
        order: 2;
        gap: 15px;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .header-quick a {
        flex-direction: column;
        gap: 3px;
        font-size: 14px;
        text-align: center;
    }
    .header-quick a span {
        font-size: 25px;
    }
    .header-quick .icon { font-size: 18px; }
    .nav { order: 3; width: 100%; }
    .nav ul { justify-content: flex-start; }
    .video-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .section { padding: 15px 0; }
    .filter-wrap { padding: 15px 0; }
    .page-wrap { margin-top: 20px; }
    .video-title { min-height: 2.8em; }
    .section-head { margin-bottom: 15px; }
    .player-main { min-height: 240px; }
    .episode-list { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); }
    .player-box.fixed {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        top: 123px;
    }
    .mac_pages { margin: 20px 10px; }
    .page_info { gap: 5px; }
    .page_link {
        min-width: 39px;
        height: 39px;
        font-size: 17px;
        border-radius: 8px;
    }
    .page_link.page_current { font-size: 18px; }
    .footer {
        padding: 20px 10px;
        margin-top: 30px;
        font-size: 12px;
    }
    .footer-seo-content h2 { font-size: 13px; }
    .footer-icp { font-size: 10px; }
    #backTop {
        right: 12px;
        bottom: 150px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .tag-list-wrap {
            gap: 8px;
            padding: 15px 10px;
        }
        .tag-list-wrap .tag-item {
            padding: 5px 12px;
            font-size: 12px;
            border-radius: 4px;
        }
}
/* 响应式适配 */
@media (max-width: 480px) {
    .mac_pop {
        width: 92% !important;
        height: auto !important;
        max-height: 80vh;
    }
    .mac_report .gbook_content {
        height: 120px !important;
    }
}