/* =========================================================
   Video Site Template — Tencent Portal Inspired
   White bg · Coral-red nav bar · Orange accent
   Classic Chinese portal aesthetic, clean & dense
   ========================================================= */

:root {
    --t-red:       #e8392a;
    --t-red-dk:    #c42b1f;
    --t-red-lt:    #ff5a4b;
    --t-orange:    #f5821e;
    --t-orange-lt: #ffaa55;
    --t-coral:     #f04e37;
    /* nav gradient like QQ/Tencent coral-to-orange */
    --t-nav-grad:  linear-gradient(90deg, #e8392a 0%, #f5821e 100%);
    --t-accent:    #e8392a;
    --t-link:      #0066cc;
    --t-link-hv:   #e8392a;
    --t-bg:        #f4f5f7;
    --t-surface:   #ffffff;
    --t-surface2:  #f8f9fa;
    --t-border:    #e0e3e8;
    --t-border2:   #f5c6c2;
    --t-text:      #1a1a1a;
    --t-muted:     #555e6e;
    --t-sub:       #9aa3b2;
    --t-shadow:    rgba(0,0,0,0.08);
    --t-shadow-md: rgba(0,0,0,0.14);
    --t-grad-btn:  linear-gradient(135deg, #e8392a 0%, #f5821e 100%);
    --r:           6px;
    --rs:          4px;
    --tr:          all 0.20s ease;
    --mw:          1060px;
}

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system,
                 BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--t-bg);
    color: var(--t-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── HEADER ── white top bar ─────────────────────────── */
.pg-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--t-border);
    padding: 0.5rem 0;
    box-shadow: 0 1px 4px var(--t-shadow);
}

.pg-topbar .fw {
    max-width: var(--mw);
    margin: 0 auto;
    padding: 0 14px;
}

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

.hd-brand {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

/* Tencent-style circle-Q icon */
.hd-brand::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--t-grad-btn);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(232,57,42,0.35);
}

.hd-sitename {
    font-size: 22px;
    font-weight: 900;
    color: var(--t-red);
    letter-spacing: -0.3px;
    line-height: 1;
    border-bottom: none;
    font-style: normal;
}

.hd-brand:hover .hd-sitename { color: var(--t-red-dk); }

.hd-domain-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(232,57,42,0.06) 0%, rgba(245,130,30,0.06) 100%);
    border: 1px solid var(--t-border2);
    border-radius: 5px;
    padding: 4px 12px;
}

.hd-domain-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--t-red);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.hd-domain-txt {
    font-size: 17px;
    font-weight: 700;
    color: var(--t-red-dk);
    letter-spacing: 0.2px;
    font-family: 'Courier New', monospace;
}

/* ── RED NAV BAR like Tencent ─────────────────────────── */
.pg-navbar {
    background: var(--t-nav-grad);
    padding: 0;
    /* NO sticky — as required */
}

/* ── LAYOUT ───────────────────────────────────────────── */
.fw {
    max-width: var(--mw);
    margin: 0 auto;
    padding: 0 14px;
}

.rg { padding: 5px 0; }

/* ── NAV PANEL ────────────────────────────────────────── */
.cat-board {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-top: 2px solid var(--t-red);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: 0 1px 4px var(--t-shadow);
}

.cat-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--t-border);
}

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

.cat-row .seg-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--t-grad-btn);
    white-space: nowrap;
    width: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.25);
    text-align: center;
}

.cat-row .seg-urls {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 7px 8px;
    align-items: center;
    background: #fff;
}

.cat-row .seg-urls a {
    display: inline-block;
    color: var(--t-muted);
    text-decoration: none;
    padding: 4px 3px;
    border-radius: var(--rs);
    transition: var(--tr);
    background: var(--t-surface2);
    border: 1px solid var(--t-border);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 28px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
}

.cat-row .seg-urls a:hover {
    background: var(--t-red);
    color: #fff;
    border-color: var(--t-red);
}

.cat-row .seg-urls a.active {
    background: var(--t-grad-btn);
    color: #fff;
    border-color: var(--t-red);
    font-weight: 600;
}

/* ── SEARCH ───────────────────────────────────────────── */
.srch-box {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--r);
    padding: 10px;
    margin-bottom: 6px;
    box-shadow: 0 1px 4px var(--t-shadow);
}

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

.srch-box input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1.5px solid var(--t-border);
    border-radius: var(--rs);
    background: var(--t-surface2);
    color: var(--t-text);
    font-size: 13px;
    outline: none;
    transition: var(--tr);
    font-family: inherit;
}

.srch-box input[type="text"]:focus {
    border-color: var(--t-red);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(232,57,42,0.10);
}

.srch-box input[type="text"]::placeholder { color: var(--t-sub); }

.srch-box button {
    padding: 8px 14px;
    border: none;
    border-radius: var(--rs);
    background: var(--t-grad-btn);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.srch-box button:hover {
    filter: brightness(1.10);
    box-shadow: 0 3px 10px rgba(232,57,42,0.28);
}

/* ── HOT TAGS ─────────────────────────────────────────── */
.hot-kws {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px;
    background: var(--t-surface);
    border-radius: var(--r);
    margin-bottom: 6px;
    border: 1px solid var(--t-border);
    box-shadow: 0 1px 4px var(--t-shadow);
}

.hot-kw-item {
    padding: 4px 11px;
    background: var(--t-surface2);
    border-radius: 3px;
    color: var(--t-muted);
    text-decoration: none;
    font-size: 13px;
    transition: var(--tr);
    border: 1px solid var(--t-border);
}

.hot-kw-item:hover {
    background: var(--t-red);
    color: #fff;
    border-color: var(--t-red);
}

/* ── SECTION HEADINGS ─────────────────────────────────── */
.mhlleset          { margin-bottom: 10px; }
.mhlleset-main     { width: 100%; }

.mhlleset-heading {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--t-border);
    position: relative;
}

.mhlleset-heading::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 40px; height: 2px;
    background: var(--t-grad-btn);
    border-radius: 1px;
}

.mhlleset-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--t-text);
    margin: 0;
}

.mhlleset-title a { color:inherit; text-decoration:none; transition:var(--tr); }
.mhlleset-title a:hover { color: var(--t-red); }

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

.thumbnail2-group li { position: relative; }

.thumbnail2 {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--rs);
    aspect-ratio: 600 / 350;
    background: var(--t-surface2);
    border: 1px solid var(--t-border);
    transition: var(--tr);
}

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

.thumbnail2:hover {
    border-color: var(--t-red);
    box-shadow: 0 3px 14px rgba(232,57,42,0.20);
}

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

.thumbnail2::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    background: rgba(232,57,42,0.32);
    opacity: 0;
    transition: opacity 0.24s ease;
    z-index: 1;
}

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

.video-info { padding: 6px 0 0; }

.video-info h5 { margin:0; font-size:13px; font-weight:500; line-height:1.4; }

.video-info h5 a {
    color: var(--t-muted);
    text-decoration: none;
    transition: var(--tr);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-info h5 a:hover { color: var(--t-red); }

/* ── VIDEO PLAYER ─────────────────────────────────────── */
.video-container {
    width: 100%;
    height: 600px;
    max-height: 640px;
    margin-bottom: 12px;
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--t-shadow-md);
    border: 1px solid var(--t-border);
    position: relative;
}

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

.MacPlayer {
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px var(--t-shadow-md);
    border: 1px solid var(--t-border);
}

/* ── TORRENT CAPTURE ──────────────────────────────────── */
.torrent-capture-grid { width: 100%; margin-top: 10px; }

.torrent-capture-grid picture,
.torrent-capture-grid img,
.torrent-capture-grid .img_item img {
    width: 100%; height: auto;
    border-radius: var(--rs);
    border: 1px solid var(--t-border);
    display: block;
}

.torrent-capture-grid .img_item { width: 100%; }

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

.tp-btn {
    display: inline-block;
    padding: 9px 20px;
    background: var(--t-grad-btn);
    color: #fff;
    text-decoration: none;
    border-radius: var(--rs);
    font-weight: 700;
    font-size: 13px;
    transition: var(--tr);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}

.tp-btn:hover {
    filter: brightness(1.10);
    box-shadow: 0 3px 14px rgba(232,57,42,0.28);
}

/* ── SHARE SECTION ────────────────────────────────────── */
.share-section {
    background: var(--t-surface);
    border-radius: var(--r);
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--t-border);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 4px var(--t-shadow);
}

.share-url-display {
    background: var(--t-surface2);
    border: 1px solid var(--t-border);
    border-radius: var(--rs);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

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

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

.share-copy-btn {
    padding: 8px 16px;
    background: var(--t-grad-btn);
    color: #fff;
    border: none;
    border-radius: var(--rs);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tr);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.share-copy-btn:hover {
    filter: brightness(1.10);
    box-shadow: 0 3px 12px rgba(232,57,42,0.28);
}

.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: 6px 12px;
    border-radius: var(--rs);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--tr);
    min-width: 34px;
    text-align: center;
}

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

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

.page_info_focus {
    background: var(--t-grad-btn);
    color: #fff;
    border: 1px solid var(--t-red);
    cursor: default;
}

/* ── FRIENDLY LINKS ───────────────────────────────────── */
.flink-zone { margin-bottom: 6px; }

.flink-body {
    padding: 10px;
    background: var(--t-surface);
    border-radius: var(--r);
    border: 1px solid var(--t-border);
    box-shadow: 0 1px 4px var(--t-shadow);
}

.flink-body dl  { margin: 0; }
.flink-body dd  { display: inline-block; margin: 3px 3px; }

.flink-body a {
    color: var(--t-link);
    text-decoration: none;
    font-size: 13px;
    transition: var(--tr);
}

.flink-body a:hover { color: var(--t-red); text-decoration: underline; }
.pd5 { padding: 0 5px; }

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

.pg-footer p    { margin: 4px 0; color: var(--t-sub); font-size: 12px; }
.pg-footer a    { color: var(--t-sub); text-decoration: none; transition: var(--tr); }
.pg-footer a:hover { color: var(--t-red); }

/* ── MISC ─────────────────────────────────────────────── */
#ddab { margin-bottom: 0; }
.clearfix::after { content:""; display:table; clear:both; }
.hide_mobile { display: block; }
.hide_pc     { display: block; }

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

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

    .fw { padding: 0 8px; }

    .hd-sitename    { font-size: 18px; }
    .hd-domain-wrap { padding: 3px 9px; gap: 6px; }
    .hd-domain-tag  { font-size: 10px; }
    .hd-domain-txt  { font-size: 15px; }

    .rg { padding: 3px 0; }

    /* nav: 15% label + 85% links, 2 rows × 4 */
    .cat-row .seg-name {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
    }

    .cat-row .seg-urls {
        width: 85%;
        gap: 3px;
        padding: 6px 4px;
    }

    .cat-row .seg-urls a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 9px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

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

    .video-container {
        height: 56.25vw;
        max-height: 370px;
        margin-bottom: 10px;
    }

    .mhlleset-title { font-size: 14px; }
    .mhlleset { margin-bottom: 8px; }

    .srch-box { padding: 8px; }
    .srch-box input[type="text"] { min-width: 90px; font-size: 12px; padding: 7px 9px; }
    .srch-box button { padding: 7px 9px; font-size: 12px; }

    .dl-zone { padding: 8px; gap: 6px; }
    .tp-btn  { padding: 8px 12px; font-size: 12px; }

    .share-section    { padding: 8px; gap: 6px; }
    .share-url-display { padding: 7px 9px; }
    .share-label      { font-size: 11px; }
    .share-url        { font-size: 11px; }
    .share-copy-btn   { padding: 7px 10px; font-size: 12px; }

    .page_info_div    { padding: 10px 0; gap: 3px; }
    .a_page_info, .page_info_focus { padding: 5px 9px; font-size: 12px; }

    .hot-kws     { padding: 8px; gap: 5px; }
    .hot-kw-item { font-size: 12px; padding: 3px 9px; }
}

@media (max-width: 480px) {
    .hd-sitename { font-size: 16px; }
    .hd-domain-txt  { font-size: 14px; }

    .cat-row .seg-name {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .cat-row .seg-urls {
        width: 85%;
        gap: 3px;
        padding: 5px 3px;
    }

    .cat-row .seg-urls a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

    .thumbnail2-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

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

    .video-info h5 { font-size: 12px; }
    .mhlleset-title { font-size: 13px; }
    .tp-btn { padding: 7px 10px; font-size: 12px; }
    .share-section  { padding: 7px; gap: 5px; }
    .share-copy-btn { padding: 7px 9px; font-size: 11px; }
}

/* tablet: 14px min for nav links */
@media (min-width: 481px) and (max-width: 768px) {
    .cat-row .seg-urls a { font-size: 14px; }
}
