/* ========================================
   影视站模板样式 - 新闻门户风格
   ======================================== */

:root {
    --clr-primary: #e8202a;
    --clr-primary-dark: #c41820;
    --clr-primary-light: #ff3a44;
    --clr-bg: #f4f4f4;
    --clr-white: #ffffff;
    --clr-text: #1a1a1a;
    --clr-text-muted: #666666;
    --clr-text-light: #999999;
    --clr-border: #e0e0e0;
    --clr-section-bg: #ffffff;
    --clr-nav-bg: #e8202a;
    --clr-nav-text: #ffffff;
    --clr-header-bg: #e8202a;
    --clr-header-text: #ffffff;
    --clr-tag-bg: #e8202a;
    --clr-tag-text: #ffffff;
    --clr-footer-bg: #1a1a1a;
    --clr-footer-text: #cccccc;
    --radius-sm: 3px;
    --radius-md: 5px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.16);
    --font-main: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--clr-primary);
}

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ========================================
   布局容器
   ======================================== */

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-block {
    background: var(--clr-section-bg);
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ========================================
   顶部导航栏
   ======================================== */

.site-header {
    background: var(--clr-header-bg);
    color: var(--clr-header-text);
    padding: 10px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-zone {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.brand-logo {
    display: flex;
    align-items: baseline;
    gap: 4px;
    text-decoration: none;
}

.brand-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--clr-white);
    letter-spacing: -0.5px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.brand-title:hover {
    color: var(--clr-white);
}

.domain-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 3px 12px;
    white-space: nowrap;
}

.domain-badge .lbl {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}

.domain-badge .url-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--clr-white);
    letter-spacing: 0.3px;
}

/* ========================================
   横幅广告区域
   ======================================== */

.banner-zone {
    margin: 6px 0;
}

.banner-zone .wrap {
    padding: 0 15px;
}

/* ========================================
   栏目导航
   ======================================== */

.nav-panel {
    background: var(--clr-white);
    border-bottom: 2px solid var(--clr-border);
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

.nav-panel .wrap {
    padding: 0 15px;
}

.cat-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f0f0f0;
    min-height: 36px;
}

.cat-row:last-child {
    border-bottom: none;
}

.cat-zone-label {
    background: var(--clr-primary);
    color: var(--clr-white);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    min-width: 44px;
    text-align: center;
    flex-shrink: 0;
    writing-mode: horizontal-tb;
    line-height: 1.3;
    word-break: break-all;
}

.cat-links-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    gap: 0;
}

.cat-links-area a {
    font-size: 13px;
    color: var(--clr-text);
    padding: 6px 10px;
    display: inline-block;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
    text-align: center;
}

.cat-links-area a:hover,
.cat-links-area a.active {
    background: var(--clr-primary);
    color: var(--clr-white);
}

/* ========================================
   搜索区域
   ======================================== */

.search-zone {
    background: var(--clr-white);
    padding: 10px 0;
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

.search-zone .wrap {
    padding: 0 15px;
}

.search-form-box {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.search-form-box form {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    flex-wrap: nowrap;
    min-width: 0;
}

.search-form-box input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 2px solid var(--clr-primary);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--clr-text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.search-form-box input[type="text"]:focus {
    border-color: var(--clr-primary-dark);
}

.search-form-box button {
    height: 34px;
    padding: 0 10px;
    background: var(--clr-primary);
    color: var(--clr-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}

.search-form-box button:hover {
    background: var(--clr-primary-dark);
}

/* ========================================
   热搜标签
   ======================================== */

.hot-tags-block {
    background: var(--clr-white);
    padding: 8px 0;
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

.hot-tags-block .wrap {
    padding: 0 15px;
}

.hot-tags-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.hot-tags-inner h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--clr-primary);
    white-space: nowrap;
    margin-right: 6px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tags-list a {
    font-size: 12px;
    color: var(--clr-text);
    background: #f5f5f5;
    border: 1px solid var(--clr-border);
    border-radius: 2px;
    padding: 2px 8px;
    transition: all 0.15s;
}

.tags-list a:hover {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
}

/* ========================================
   内容区块 - 影片列表
   ======================================== */

.content-zone {
    padding: 6px 0;
}

.content-zone .wrap {
    padding: 0 15px;
}

.film-section {
    background: var(--clr-white);
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.film-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid var(--clr-primary);
    background: #fff;
}

.film-section-head h3.sec-title,
.film-section-head h4.sec-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--clr-text);
    position: relative;
    padding-left: 10px;
}

.film-section-head h3.sec-title::before,
.film-section-head h4.sec-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--clr-primary);
    border-radius: 2px;
}

.film-section-head h3.sec-title a,
.film-section-head h4.sec-title a {
    color: var(--clr-text);
}

.film-section-head h3.sec-title a:hover,
.film-section-head h4.sec-title a:hover {
    color: var(--clr-primary);
}

.film-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 14px;
}

.film-item {
    position: relative;
    min-width: 0; /* 防止 grid 子元素溢出容器 */
    overflow: hidden;
}

.film-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #ddd;
    aspect-ratio: 600 / 350;
}

.film-thumb img {
    width: 100%;
    max-width: 100%; /* 严格限制不超出父容器 */
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.film-thumb:hover img {
    transform: scale(1.04);
}

.film-meta {
    padding: 5px 2px 2px;
}

.film-meta h5 {
    font-size: 12px;
    font-weight: 500;
    color: var(--clr-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.film-meta h5 a:hover {
    color: var(--clr-primary);
}

/* ========================================
   详情页 - 影片信息
   ======================================== */

.detail-title-bar {
    background: var(--clr-white);
    border-left: 4px solid var(--clr-primary);
    padding: 12px 16px;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.6;
    word-break: break-all;
    box-shadow: var(--shadow-sm);
}

.detail-title-bar a.cat-link {
    color: var(--clr-primary);
    font-weight: 700;
    margin-right: 8px;
}

.detail-title-bar b {
    color: var(--clr-text);
}

.detail-info-box {
    background: var(--clr-white);
    padding: 18px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.9;
    box-shadow: var(--shadow-sm);
    color: var(--clr-text);
}

/* ========================================
   种子截图网格
   ======================================== */

.capture-grid-box {
    margin-top: 12px;
}

.capture-grid-box picture {
    display: block;
    width: 100%;
}

.capture-grid-box picture img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

/* ========================================
   下载按钮区
   ======================================== */

.dl-btn-zone {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    flex-wrap: wrap;
}

.dl-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--clr-primary);
    color: var(--clr-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}

.dl-btn:hover {
    background: var(--clr-primary-dark);
    color: var(--clr-white);
    transform: translateY(-1px);
}

.client-link-pc,
.client-link-mobile {
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
}

.client-link-pc a,
.client-link-mobile a {
    color: var(--clr-primary);
    font-weight: 600;
}

/* ========================================
   分享区域
   ======================================== */

.share-panel {
    background: var(--clr-white);
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-url-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.share-lbl {
    font-size: 12px;
    color: var(--clr-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-url-txt {
    font-size: 12px;
    color: var(--clr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: var(--clr-primary);
    color: var(--clr-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-main);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}

.share-copy-btn:hover {
    background: var(--clr-primary-dark);
}

/* ========================================
   分页
   ======================================== */

.paging-zone {
    margin: 12px 0 6px;
    display: flex;
    justify-content: center;
}

.pager {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.pager a,
.pager .cur-pg {
    display: inline-block;
    min-width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    padding: 0 6px;
}

.pager a {
    background: var(--clr-white);
    color: var(--clr-text);
    border: 1px solid var(--clr-border);
    transition: all 0.15s;
}

.pager a:hover {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
}

.pager .cur-pg {
    background: var(--clr-primary);
    color: var(--clr-white);
    border: 1px solid var(--clr-primary);
    font-weight: 700;
}

/* ========================================
   友情链接
   ======================================== */

.links-section {
    background: var(--clr-white);
    padding: 10px 14px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

.links-section .sec-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--clr-text-muted);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--clr-border);
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.links-list dd {
    margin: 0;
}

.links-list a.lnk-item {
    display: inline-block;
    font-size: 12px;
    color: var(--clr-text-muted);
    background: #f7f7f7;
    border: 1px solid var(--clr-border);
    padding: 3px 10px;
    border-radius: 2px;
    transition: all 0.15s;
}

.links-list a.lnk-item:hover {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
}

/* ========================================
   页脚
   ======================================== */

.site-footer {
    background: var(--clr-footer-bg);
    padding: 16px 0;
    margin-top: 8px;
}

.site-footer .wrap {
    padding: 0 15px;
}

.footer-copy {
    text-align: center;
    font-size: 12px;
    color: var(--clr-footer-text);
    line-height: 1.8;
}

/* ========================================
   显示隐藏辅助
   ======================================== */

.pc-only { display: block; }
.mobile-only { display: none; }

/* ========================================
   响应式 - 平板 (≤ 1024px)
   ======================================== */

@media (max-width: 1024px) {
    .film-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
}

/* ========================================
   响应式 - 大屏手机 (≤ 768px)
   ======================================== */

@media (max-width: 768px) {
    .pc-only { display: none; }
    .mobile-only { display: block; }

    .wrap {
        padding: 0 10px;
    }

    /* 顶部品牌 */
    .brand-title {
        font-size: 20px;
    }

    .domain-badge .url-val {
        font-size: 13px;
    }

    /* 导航栏 */
    .cat-zone-label {
        font-size: 10px;
        min-width: 42px;
        width: 15%;
        padding: 0 3px;
    }

    .cat-links-area {
        width: 85%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    .cat-links-area a {
        font-size: 13px;
        padding: 5px 4px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 搜索框 */
    .search-form-box {
        flex-wrap: nowrap;
    }

    .search-form-box form {
        flex-wrap: nowrap;
    }

    .search-form-box input[type="text"] {
        font-size: 12px;
        height: 32px;
    }

    .search-form-box button {
        height: 32px;
        font-size: 11px;
        padding: 0 7px;
    }

    /* 影片网格 */
    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 8px 10px;
    }

    .film-section {
        overflow: hidden; /* 防止子元素撑破卡片 */
    }

    /* 详情页 */
    .detail-title-bar {
        font-size: 14px;
        padding: 10px 12px;
    }

    .detail-info-box {
        font-size: 13px;
        padding: 12px;
    }

    /* 按钮 */
    .dl-btn {
        padding: 9px 16px;
        font-size: 13px;
    }

    /* 热搜 */
    .tags-list a {
        font-size: 11px;
        padding: 2px 6px;
    }

    /* 分页 */
    .pager a, .pager .cur-pg {
        min-width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 12px;
    }

    /* 片头分区标签宽度 */
    .film-section-head {
        padding: 8px 10px;
    }
}

/* ========================================
   响应式 - 小屏手机 (≤ 480px)
   ======================================== */

@media (max-width: 480px) {
    .brand-title {
        font-size: 18px;
    }

    .domain-badge .url-val {
        font-size: 12px;
    }

    .domain-badge {
        padding: 3px 8px;
    }

    .cat-zone-label {
        font-size: 10px;
        min-width: 38px;
        width: 15%;
    }

    .cat-links-area a {
        font-size: 12px;
        padding: 5px 3px;
    }

    .search-form-box input[type="text"] {
        height: 30px;
        font-size: 11px;
    }

    .search-form-box button {
        height: 30px;
        font-size: 11px;
        padding: 0 6px;
    }

    .film-meta h5 {
        font-size: 11px;
    }

    .dl-btn-zone {
        gap: 8px;
    }

    .dl-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ========================================
   PC端导航栏宽度均分
   ======================================== */

@media (min-width: 769px) {
    .cat-row {
        min-height: 40px;
    }

    .cat-zone-label {
        font-size: 13px;
        min-width: 70px;
        padding: 0 10px;
        writing-mode: horizontal-tb;
    }

    .cat-links-area {
        display: flex;
        flex-wrap: nowrap;
    }

    .cat-links-area a {
        flex: 1;
        font-size: 14px;
        padding: 8px 5px;
        text-align: center;
    }
}

/* ========================================
   视频播放器容器
   ======================================== */

.player-wrap {
    background: #000;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* ========================================
   列表页标题计数
   ======================================== */

.count-badge {
    font-size: 12px;
    font-weight: 400;
    color: var(--clr-text-light);
    margin-left: 8px;
}
