/* Media Portal — Tencent News Style: White + Red Accent + Chinese Portal */

:root {
    --tx-red:         #cc0000;
    --tx-red-dark:    #aa0000;
    --tx-red-light:   #fff0f0;
    --tx-orange:      #e8410a;
    --tx-white:       #ffffff;
    --tx-bg:          #f4f5f7;
    --tx-bg2:         #f8f8f8;
    --tx-surface:     #ffffff;
    --tx-nav-bg:      #d92b2b;
    --tx-nav-top:     #ffffff;
    --tx-text:        #333333;
    --tx-text-sub:    #666666;
    --tx-text-light:  #999999;
    --tx-border:      #e5e5e5;
    --tx-border-lt:   #eeeeee;
    --tx-shadow-sm:   rgba(0, 0, 0, 0.06);
    --tx-shadow-md:   rgba(0, 0, 0, 0.12);
    --grad-red:       linear-gradient(135deg, #cc0000 0%, #e8410a 100%);
    --grad-header:    linear-gradient(90deg, #e02020 0%, #d92b2b 50%, #c41a1a 100%);
    --rad:            4px;
    --rad-sm:         3px;
    --spd:            0.2s ease;
}

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

body {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
    background: var(--tx-bg);
    color: var(--tx-text);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
}

/* ─── HEADER ─── */
.pg-header {
    background: var(--tx-white);
    border-bottom: 3px solid var(--tx-red);
    padding: 0.5rem 0;
    box-shadow: 0 1px 4px var(--tx-shadow-sm);
}

.hd-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hd-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
    justify-content: center;
}

.hd-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.hd-sitename {
    font-size: 24px;
    font-weight: 700;
    font-style: normal;
    color: var(--tx-red);
    letter-spacing: 1px;
    border-bottom: none;
    text-decoration: none;
    line-height: 1;
}

.hd-domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    background: var(--tx-red-light);
    border: 1px solid #ffcccc;
    border-radius: var(--rad);
}

.hd-domain-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--tx-red);
    white-space: nowrap;
}

.hd-domain-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--tx-red-dark);
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.2px;
}

/* ─── LAYOUT ─── */
.pg-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.pg-block {
    padding: 6px 0;
}

/* ─── BANNER ─── */
.pg-banner {
    width: 100%;
    margin: 1px 0;
    overflow: hidden;
}

.pg-banner a { display: block; }
.pg-banner img { display: block; width: 100%; }

/* ─── CATEGORY NAV ─── */
.nav-panel {
    background: var(--tx-surface);
    border-radius: var(--rad);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--tx-border);
    box-shadow: 0 1px 3px var(--tx-shadow-sm);
}

.nav-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--tx-border-lt);
}

.nav-strip:last-child { border-bottom: none; }

.nav-zone {
    font-size: 12px;
    font-weight: 700;
    color: var(--tx-white);
    background: var(--grad-red);
    width: 10%;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.3;
}

.nav-items {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px 8px;
    align-items: center;
    background: var(--tx-bg2);
}

.nav-items a {
    display: inline-block;
    color: var(--tx-text);
    text-decoration: none;
    padding: 4px 4px;
    border-radius: var(--rad-sm);
    transition: var(--spd);
    background: var(--tx-white);
    border: 1px solid var(--tx-border);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.nav-items a:hover {
    background: var(--tx-red);
    color: var(--tx-white);
    border-color: var(--tx-red);
}

.nav-items a.active {
    background: var(--tx-red);
    color: var(--tx-white);
    border-color: var(--tx-red);
    font-weight: 700;
}

/* ─── SEARCH ─── */
.search-bar {
    background: var(--tx-surface);
    border-radius: var(--rad);
    padding: 9px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--tx-border);
    box-shadow: 0 1px 3px var(--tx-shadow-sm);
}

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

.search-bar input[type="text"] {
    flex: 1;
    min-width: 50px;
    padding: 7px 12px;
    border: 1px solid #dddddd;
    border-radius: var(--rad-sm);
    background: var(--tx-white);
    color: var(--tx-text);
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: var(--spd);
}

.search-bar input[type="text"]:focus {
    border-color: var(--tx-red);
    box-shadow: 0 0 0 2px rgba(204,0,0,0.1);
}

.search-bar input[type="text"]::placeholder { color: #aaa; }

.search-bar button {
    padding: 7px 13px;
    border: none;
    border-radius: var(--rad-sm);
    background: var(--grad-red);
    color: var(--tx-white);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--spd);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.search-bar button:hover {
    background: var(--tx-red-dark);
    box-shadow: 0 2px 8px rgba(204,0,0,0.3);
}

/* ─── TAG CLOUD ─── */
.kw-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 12px;
    background: var(--tx-surface);
    border-radius: var(--rad);
    margin-bottom: 6px;
    border: 1px solid var(--tx-border);
    box-shadow: 0 1px 3px var(--tx-shadow-sm);
}

.kw-tag {
    padding: 3px 11px;
    background: var(--tx-bg2);
    border-radius: var(--rad-sm);
    color: var(--tx-text-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--spd);
    border: 1px solid var(--tx-border);
}

.kw-tag:hover {
    background: var(--tx-red);
    color: var(--tx-white);
    border-color: var(--tx-red);
}

/* ─── SECTION HEAD ─── */
.media-sect {
    margin-bottom: 12px;
}

.sect-hd {
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--tx-border);
    position: relative;
}

.sect-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--grad-red);
}

.sect-ttl {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--tx-text);
}

.sect-ttl a {
    color: var(--tx-text);
    text-decoration: none;
    transition: var(--spd);
}

.sect-ttl a:hover { color: var(--tx-red); }

/* ─── FILM GRID ─── */
.film-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
}

.film-grid li { animation: fadeUp 0.35s ease backwards; }
.film-grid li:nth-child(1) { animation-delay: 0.03s; }
.film-grid li:nth-child(2) { animation-delay: 0.06s; }
.film-grid li:nth-child(3) { animation-delay: 0.09s; }
.film-grid li:nth-child(4) { animation-delay: 0.12s; }
.film-grid li:nth-child(5) { animation-delay: 0.15s; }
.film-grid li:nth-child(6) { animation-delay: 0.18s; }
.film-grid li:nth-child(7) { animation-delay: 0.21s; }
.film-grid li:nth-child(8) { animation-delay: 0.24s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.film-cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rad);
    aspect-ratio: 600 / 350;
    background: var(--tx-bg2);
    border: 1px solid var(--tx-border);
}

.film-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease;
    display: block;
}

.film-cover:hover img { transform: scale(1.06); }

.film-cover:hover {
    border-color: var(--tx-red);
    box-shadow: 0 3px 10px var(--tx-shadow-md);
}

.film-info { padding: 6px 0 2px; }

.film-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.45;
}

.film-info h5 a {
    color: var(--tx-text);
    text-decoration: none;
    transition: var(--spd);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.film-info h5 a:hover { color: var(--tx-red); }

/* ─── VIDEO PLAYER ─── */
.vp-container {
    width: 100%;
    height: 600px;
    max-height: 600px;
    margin-bottom: 12px;
    background: #000;
    border-radius: var(--rad);
    overflow: hidden;
    box-shadow: 0 3px 12px var(--tx-shadow-md);
    position: relative;
}

.vp-container iframe,
.vp-container video,
.vp-container #video-container {
    width: 100%;
    height: 100%;
    border: none;
}

.MacPlayer {
    background: #000;
    border-radius: var(--rad);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 3px 12px var(--tx-shadow-md);
}

/* ─── TORRENT PREVIEW ─── */
.snap-grid img,
.snap-grid .img_item img {
    width: 100%;
    height: auto;
    border-radius: var(--rad-sm);
    border: 1px solid var(--tx-border);
    display: block;
}

.snap-grid .img_item { width: 100%; }

/* ─── DOWNLOAD BUTTONS ─── */
.dl-row {
    text-align: center;
    padding: 12px;
    background: var(--tx-surface);
    border-radius: var(--rad);
    margin: 10px 0;
    border: 1px solid var(--tx-border);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.down_btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--grad-red);
    color: var(--tx-white);
    text-decoration: none;
    border-radius: var(--rad-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--spd);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}

.down_btn:hover {
    background: var(--tx-red-dark);
    box-shadow: 0 3px 10px rgba(204,0,0,0.3);
}

/* ─── SHARE ─── */
.share-section {
    background: var(--tx-surface);
    border-radius: var(--rad);
    padding: 11px 14px;
    margin: 10px 0;
    border: 1px solid var(--tx-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-url-display {
    background: var(--tx-bg2);
    border: 1px solid var(--tx-border);
    border-radius: var(--rad-sm);
    padding: 7px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.share-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--tx-red);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-url {
    font-size: 12px;
    color: var(--tx-text-sub);
    font-family: 'Courier New', Courier, monospace;
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.share-copy-btn {
    padding: 8px 15px;
    background: var(--grad-red);
    color: var(--tx-white);
    border: none;
    border-radius: var(--rad-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--spd);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.share-copy-btn:hover {
    background: var(--tx-red-dark);
    box-shadow: 0 2px 8px rgba(204,0,0,0.25);
}

.share-copy-btn:active { transform: scale(0.98); }

.share-icon { font-size: 14px; }

/* ─── PAGINATION ─── */
.page_info_div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 14px 0;
}

.a_page_info,
.page_info_focus {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--rad-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--spd);
    min-width: 32px;
    text-align: center;
}

.a_page_info {
    background: var(--tx-surface);
    color: var(--tx-text);
    border: 1px solid var(--tx-border);
}

.a_page_info:hover {
    background: var(--tx-red);
    border-color: var(--tx-red);
    color: var(--tx-white);
}

.page_info_focus {
    background: var(--grad-red);
    color: var(--tx-white);
    border: 1px solid transparent;
    cursor: default;
}

/* ─── FOOTER ─── */
.pg-footer {
    padding: 18px 0;
    text-align: center;
    border-top: 2px solid var(--tx-red);
    margin-top: 16px;
    background: var(--tx-surface);
}

.ftr-copy p {
    margin: 5px 0;
    color: var(--tx-text-sub);
    font-size: 13px;
}

.ftr-copy a {
    color: var(--tx-text-sub);
    text-decoration: none;
    transition: var(--spd);
}

.ftr-copy a:hover { color: var(--tx-red); }

/* ─── LINKS ─── */
.links-panel {
    padding: 9px 12px;
    background: var(--tx-surface);
    border-radius: var(--rad);
    border: 1px solid var(--tx-border);
}

.links-panel dl { margin: 0; }

.links-panel dd {
    display: inline-block;
    margin: 3px;
}

.links-panel a {
    color: var(--tx-text-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--spd);
}

.links-panel a:hover { color: var(--tx-red); }

.pd5 { padding: 2px 6px; display: inline-block; }

/* ─── UTILITY ─── */
.clearfix::after { content: ""; display: table; clear: both; }
img[data-original] { background: var(--tx-bg2); }

/* ════════════════════════════
   RESPONSIVE ≤ 768 px
   ════════════════════════════ */
@media (max-width: 768px) {
    .pg-wrap { padding: 0 8px; }

    .pg-header { padding: 0.42rem 0; }

    .hd-brand { gap: 10px; }

    .hd-sitename { font-size: 18px; }

    .hd-domain-pill { padding: 4px 9px; gap: 5px; }

    .hd-domain-label { font-size: 9px; }

    .hd-domain-val { font-size: 14px; }

    .pg-block { padding: 5px 0; }

    /* NAV: zone=15%, links=85%, 4 per row → 2 rows */
    .nav-strip .nav-zone {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
        line-height: 1.2;
        word-break: keep-all;
    }

    .nav-strip .nav-items {
        width: 85%;
        gap: 4px;
        padding: 6px 4px;
    }

    .nav-strip .nav-items a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
        text-align: center;
    }

    /* GRID: 2 columns */
    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    /* SEARCH: one line, no wrap */
    .search-bar { padding: 8px 9px; }

    .search-bar form { flex-wrap: nowrap; gap: 5px; }

    .search-bar input[type="text"] {
        min-width: 50px;
        padding: 7px 9px;
        font-size: 13px;
    }

    .search-bar button { padding: 7px 9px; font-size: 11px; }

    .film-info h5 { font-size: 12px; }

    .media-sect { margin-bottom: 10px; }

    .sect-ttl { font-size: 15px; }

    .kw-cloud { padding: 8px; gap: 5px; }

    .kw-tag { padding: 3px 9px; font-size: 12px; }

    .down_btn { padding: 8px 13px; font-size: 12px; }

    .dl-row { padding: 9px 7px; margin: 8px 0; gap: 6px; }

    .share-section { padding: 9px; margin: 8px 0; gap: 6px; flex-wrap: nowrap; }

    .share-url-display { padding: 6px 9px; gap: 5px; flex: 1; min-width: 0; }

    .share-label { font-size: 10px; }

    .share-url { font-size: 10px; }

    .share-copy-btn { padding: 7px 9px; font-size: 11px; flex-shrink: 0; }

    .share-icon { font-size: 13px; }

    .vp-container { height: 56.25vw; max-height: 360px; margin-bottom: 10px; }

    .page_info_div { padding: 10px 0; gap: 3px; }

    .a_page_info,
    .page_info_focus { padding: 5px 10px; font-size: 12px; min-width: 30px; }

    .pg-footer { padding: 14px 0; margin-top: 13px; }
}

/* 481–768 px */
@media (min-width: 481px) and (max-width: 768px) {
    .nav-strip .nav-items a { font-size: 13px; }
    .nav-strip .nav-zone   { font-size: 10px; }
}

/* ≤ 480 px */
@media (max-width: 480px) {
    .hd-sitename { font-size: 16px; }

    .hd-domain-pill { padding: 3px 7px; }

    .hd-domain-label { font-size: 9px; }

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

    .nav-strip .nav-zone  { width: 15%; font-size: 10px; padding: 5px 2px; }

    .nav-strip .nav-items { width: 85%; gap: 3px; padding: 5px 3px; }

    .nav-strip .nav-items a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

    .film-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

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

    .sect-ttl { font-size: 14px; }

    .vp-container { height: 56.25vw; max-height: 260px; }

    .dl-row { gap: 5px; padding: 7px 4px; }

    .down_btn { padding: 7px 10px; font-size: 11px; }

    .share-section { padding: 7px; gap: 4px; }

    .share-copy-btn { padding: 6px 8px; font-size: 10px; }

    .share-icon { font-size: 12px; }
}

/* ─── HIDE HELPERS ─── */
.hide_mobile { display: block; }
.hide_pc     { display: block; }

@media (max-width: 768px) { .hide_mobile { display: none !important; } }
@media (min-width: 769px) { .hide_pc     { display: none !important; } }
