/* Media Portal — TSN News Dark-Header Style */

:root {
    --clr-brand: #e5001e;
    --clr-brand-dark: #b80018;
    --clr-topbar: #1a1a1a;
    --clr-topbar-border: #333;
    --clr-navbar: #212121;
    --clr-page: #f2f2f2;
    --clr-surface: #ffffff;
    --clr-surface-alt: #f7f7f7;
    --clr-border: #e0e0e0;
    --clr-border-soft: #ebebeb;
    --clr-text: #111111;
    --clr-text-sub: #444444;
    --clr-text-muted: #888888;
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.1);
    --r-xs: 3px;
    --r-sm: 4px;
    --r-md: 6px;
    --t: all 0.18s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', Arial, sans-serif;
    background: var(--clr-page);
    color: var(--clr-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== SITE HEADER ===== */
.site-topbar {
    background: var(--clr-topbar);
    border-bottom: 2px solid var(--clr-brand);
    padding: 0;
}

.topbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    flex-wrap: nowrap;
}

.brand-anchor {
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-badge {
    background: var(--clr-brand);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: var(--r-xs);
    font-style: normal;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.brand-name {
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    margin-left: 9px;
    border-bottom: none;
    font-style: normal;
    letter-spacing: 0.2px;
}

.domain-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.domain-lbl {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    background: rgba(255,255,255,0.07);
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 0.4px;
}

.domain-val {
    font-size: 18px;
    font-weight: 700;
    color: #ff7386;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2px;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.content { padding: 6px 0; }

/* ===== BANNER ===== */
.promo-strip {
    margin: 5px 0;
    overflow: hidden;
    border-radius: var(--r-sm);
}

.promo-strip img { display: block; width: 100%; }

/* ===== CATEGORY NAV ===== */
.catnav-panel {
    background: var(--clr-navbar);
    border-radius: var(--r-sm);
    overflow: hidden;
    margin-bottom: 7px;
    border: 1px solid var(--clr-topbar-border);
}

.catrow {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #2e2e2e;
}

.catrow:last-child { border-bottom: none; }

.catrow-lbl {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    background: rgba(0,0,0,0.28);
    white-space: nowrap;
    width: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    text-align: center;
    flex-shrink: 0;
    border-right: 1px solid #2e2e2e;
    letter-spacing: 0.4px;
}

.catrow-items {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 7px 8px;
    align-items: center;
}

.catrow-items a {
    display: inline-block;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--r-xs);
    border: 1px solid #3a3a3a;
    background: rgba(255,255,255,0.04);
    font-size: 13px;
    white-space: nowrap;
    text-align: center;
    transition: var(--t);
    width: calc((100% - 28px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.catrow-items a:hover,
.catrow-items a.active {
    background: var(--clr-brand);
    border-color: var(--clr-brand);
    color: #fff;
}

.catrow-items a.active { font-weight: 600; }

/* ===== SEARCH ===== */
.searchbar-box {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    margin-bottom: 7px;
    box-shadow: var(--shadow-xs);
}

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

.searchbar-box input[type="text"] {
    flex: 1;
    min-width: 50px;
    padding: 8px 12px;
    border: 1px solid var(--clr-border);
    border-radius: var(--r-xs);
    background: var(--clr-surface-alt);
    color: var(--clr-text);
    font-size: 13px;
    outline: none;
    transition: var(--t);
}

.searchbar-box input[type="text"]:focus {
    border-color: var(--clr-brand);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(229,0,30,0.1);
}

.searchbar-box input[type="text"]::placeholder { color: var(--clr-text-muted); }

.searchbar-box button {
    padding: 8px 13px;
    border: none;
    border-radius: var(--r-xs);
    background: var(--clr-brand);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--t);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.searchbar-box button:hover { background: var(--clr-brand-dark); }

/* ===== TAG CLOUD ===== */
.tagcloud-box {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
    padding: 8px 11px;
    margin-bottom: 7px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tagcloud-box a {
    padding: 4px 11px;
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border);
    border-radius: 18px;
    color: var(--clr-text-sub);
    text-decoration: none;
    font-size: 12px;
    transition: var(--t);
}

.tagcloud-box a:hover {
    background: var(--clr-brand);
    border-color: var(--clr-brand);
    color: #fff;
}

/* ===== SECTION PANEL ===== */
.mhlleset { margin-bottom: 8px; }

.mhlleset-main {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    padding: 13px;
    box-shadow: var(--shadow-xs);
}

.mhlleset-heading {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--clr-border-soft);
}

.mhlleset-heading::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 17px;
    background: var(--clr-brand);
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
}

.mhlleset-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--clr-text);
    margin: 0;
    letter-spacing: -0.2px;
}

.mhlleset-title a { color: var(--clr-text); text-decoration: none; }
.mhlleset-title a:hover { color: var(--clr-brand); }

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

.thumbnail2-group li { min-width: 0; }

.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xs);
    aspect-ratio: 600 / 350;
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border-soft);
}

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

.thumbnail2:hover img { transform: scale(1.07); }

.thumbnail2::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.22s ease;
    z-index: 1;
}

.thumbnail2:hover::after { opacity: 1; }

.thumbnail2::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #fff;
    font-size: 24px;
    z-index: 2;
    transition: transform 0.18s ease;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6));
}

.thumbnail2:hover::before { transform: translate(-50%, -50%) scale(1); }

.video-info { padding: 6px 2px 3px; }

.video-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-info h5 a { color: var(--clr-text); text-decoration: none; }
.video-info h5 a:hover { color: var(--clr-brand); }

/* ===== DOWNLOAD BUTTONS ===== */
.download {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 13px 0;
    flex-wrap: wrap;
}

.down_btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--clr-brand);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-xs);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--t);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.down_btn:hover {
    background: var(--clr-brand-dark);
    box-shadow: var(--shadow-sm);
}

/* ===== TORRENT PREVIEW ===== */
.torrent-capture-grid { margin-top: 11px; }

.torrent-capture-grid picture img,
.torrent-capture-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--r-xs);
}

/* ===== SHARE ===== */
.share-section {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
    padding: 10px 13px;
    margin: 9px 0;
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border-soft);
    border-radius: var(--r-xs);
    padding: 7px 10px;
    min-width: 0;
}

.share-label {
    font-size: 11px;
    color: var(--clr-text-muted);
    white-space: nowrap;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

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

.share-copy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 13px;
    background: var(--clr-brand);
    color: #fff;
    border: none;
    border-radius: var(--r-xs);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--t);
    text-transform: uppercase;
}

.share-copy-btn:hover { background: var(--clr-brand-dark); }
.share-icon { font-size: 13px; }

/* ===== PAGINATION ===== */
.page_info_div {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 13px 0;
}

.a_page_info, .page_info_focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--r-xs);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--t);
    min-width: 34px;
}

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

.a_page_info:hover {
    background: var(--clr-brand);
    color: #fff;
    border-color: var(--clr-brand);
}

.page_info_focus {
    background: var(--clr-brand);
    color: #fff;
    border: 1px solid var(--clr-brand);
    font-weight: 800;
    cursor: default;
}

.p_c { pointer-events: none; }

/* ===== FRIENDLY LINKS ===== */
.txtguanggao2 {
    padding: 9px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
}

.txtguanggao2 dl { margin: 0; }
.txtguanggao2 dd { display: inline-block; margin: 3px 4px; }

.txtguanggao2 a {
    color: var(--clr-text-sub);
    text-decoration: none;
    font-size: 13px;
    transition: var(--t);
}

.txtguanggao2 a:hover { color: var(--clr-brand); }
.pd5 { padding: 2px 4px; }

/* ===== FOOTER ===== */
.footer {
    background: var(--clr-topbar);
    border-top: 2px solid var(--clr-brand);
    padding: 16px 0;
    text-align: center;
    margin-top: 10px;
}

.footer p { color: rgba(255,255,255,0.42); font-size: 12px; margin: 4px 0; }
.footer a { color: rgba(255,255,255,0.52); text-decoration: none; }
.footer a:hover { color: #fff; }

/* ===== UTILS ===== */
.clearfix::after { content: ''; display: table; clear: both; }
.hide_mobile { display: block; }
.hide_pc { display: block; }
img[data-original] { background: var(--clr-surface-alt); }

.sec-heading-wrap { margin-bottom: 7px; }
.sec-heading-wrap h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--clr-text-sub);
    margin-bottom: 6px;
}

.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 8px 11px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
    margin-bottom: 7px;
}

.grid-item {
    padding: 4px 11px;
    background: var(--clr-surface-alt);
    border-radius: 16px;
    color: var(--clr-text-sub);
    text-decoration: none;
    font-size: 12px;
    transition: var(--t);
    border: 1px solid var(--clr-border);
}

.grid-item:hover {
    background: var(--clr-brand);
    color: #fff;
    border-color: var(--clr-brand);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container { padding: 0 8px; }

    .topbar-row { padding: 7px 0; gap: 10px; }

    .brand-badge { font-size: 16px; padding: 2px 6px; }
    .brand-name { font-size: 17px; margin-left: 7px; }
    .domain-val { font-size: 14px; }
    .domain-lbl { font-size: 10px; }

    .content { padding: 4px 0; }

    /* Nav mobile: 15% + 85%, 4-per-row */
    .catrow-lbl {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .catrow-items {
        width: 85%;
        gap: 3px;
        padding: 6px 4px;
    }

    .catrow-items a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 9px) / 4);
    }

    /* Grid: 2 per row */
    .thumbnail2-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .video-info h5 { font-size: 12px; }
    .mhlleset-title { font-size: 14px; }
    .mhlleset-main { padding: 10px; }
    .mhlleset { margin-bottom: 7px; }

    /* Search: single row, no wrap */
    .searchbar-box form { flex-wrap: nowrap; }

    .searchbar-box input[type="text"] {
        min-width: 50px;
        font-size: 12px;
        padding: 7px 9px;
    }

    .searchbar-box button {
        padding: 7px 9px;
        font-size: 11px;
    }

    .down_btn { padding: 9px 15px; font-size: 13px; }

    .share-section { padding: 8px 10px; gap: 7px; flex-wrap: nowrap; }
    .share-url-display { padding: 6px 9px; flex: 1; min-width: 0; }
    .share-label { font-size: 10px; }
    .share-url { font-size: 11px; }
    .share-copy-btn { padding: 7px 10px; font-size: 11px; }

    .hide_mobile { display: none !important; }
}

/* Large mobile 481–768: min 13px for nav */
@media (min-width: 481px) and (max-width: 768px) {
    .catrow-items a { font-size: 13px; }
}

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

@media (max-width: 480px) {
    .brand-badge { font-size: 14px; padding: 2px 5px; }
    .brand-name { font-size: 15px; margin-left: 6px; }
    .domain-val { font-size: 13px; }

    .catrow-lbl { width: 15%; font-size: 10px; padding: 5px 2px; }
    .catrow-items { width: 85%; gap: 3px; padding: 5px 3px; }
    .catrow-items a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

    .searchbar-box input[type="text"] { padding: 6px 7px; font-size: 11px; }
    .searchbar-box button { padding: 6px 7px; font-size: 10px; }

    .thumbnail2-group { gap: 7px; }
    .mhlleset-title { font-size: 13px; }
}
