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

:root {
    --red: #cc0000;
    --red-dk: #a30000;
    --red-bg: #fff0f0;
    --blk: #111111;
    --blk-mid: #222222;
    --blk-soft: #2d2d2d;
    --gray-hd: #1a1a1a;
    --gray-bd: #444444;
    --surface: #ffffff;
    --surface-dim: #f5f5f5;
    --surface-muted: #ebebeb;
    --text-main: #111111;
    --text-sub: #333333;
    --text-muted: #888888;
    --border: #dddddd;
    --border-dk: #cccccc;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 3px 10px rgba(0,0,0,.12);
    --shadow-lg: 0 6px 20px rgba(0,0,0,.16);
    --radius: 4px;
    --radius-sm: 3px;
    --radius-lg: 6px;
}

html { font-size: 15px; }

body {
    background: var(--surface-dim);
    color: var(--text-main);
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

a { color: var(--text-sub); text-decoration: none; transition: color .15s; }
a:hover { color: var(--red); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.grpfix::after { content: ''; display: table; clear: both; }

/* ===== CONTAINER ===== */
.page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.main-hd {
    background: var(--blk);
    border-bottom: 3px solid var(--red);
    padding: 9px 0;
}

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

.hd-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

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

.hd-sitename {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    font-style: normal;
    letter-spacing: -.6px;
    text-decoration: none;
    border-bottom: none;
    text-transform: uppercase;
}

.hd-sitename em {
    color: var(--red);
    font-style: normal;
}

.hd-url-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blk-soft);
    border: 1px solid #444;
    border-radius: var(--radius);
    padding: 4px 12px;
}

.hd-url-badge .ul-tag {
    font-size: 0.67rem;
    color: rgba(255,255,255,.55);
    white-space: nowrap;
}

.hd-url-badge .ul-val {
    font-size: 1.06rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

/* ===== PROMO BANNER ===== */
.banner-row {
    margin: 4px 0 3px;
}
.banner-row img { border-radius: var(--radius); width: 100%; }

/* ===== CATEGORY NAV ===== */
.catmenu-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--blk);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.catmenu-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    min-height: 38px;
}

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

.catmenu-lbl {
    background: var(--blk);
    color: rgba(255,255,255,.85);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid #333;
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

.catmenu-links {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: center;
    padding: 4px 8px;
    gap: 3px;
    flex: 1;
}

.catmenu-links a {
    font-size: .82rem;
    color: var(--text-sub);
    padding: 4px 5px;
    border-radius: var(--radius-sm);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.catmenu-links a:hover {
    background: var(--red-bg);
    color: var(--red);
    border-color: #ffaaaa;
}

.catmenu-links a.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.qsearch-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.qsearch-bar form {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.qsearch-bar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--border-dk);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--text-main);
    background: var(--surface-dim);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.qsearch-bar input[type="text"]:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(204,0,0,.10);
    background: var(--surface);
}

.qsearch-bar button {
    height: 36px;
    padding: 0 13px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--blk);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.qsearch-bar button:hover { background: var(--gray-bd); }

.qsearch-bar button[value="1"] { background: var(--red); }
.qsearch-bar button[value="1"]:hover { background: var(--red-dk); }

.qsearch-bar button[value="2"] { background: #555555; }
.qsearch-bar button[value="2"]:hover { background: #333333; }

/* ===== HOT TAGS ===== */
.trending-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.trending-bar h4 {
    font-size: .78rem;
    font-weight: 800;
    color: var(--blk);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-cloud .t-tag {
    display: inline-block;
    background: var(--surface-dim);
    color: var(--text-sub);
    border: 1px solid var(--border-dk);
    border-radius: var(--radius-sm);
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .15s;
    font-weight: 500;
}

.tag-cloud .t-tag:hover {
    background: var(--red-bg);
    color: var(--red);
    border-color: #ffaaaa;
}

/* ===== CONTENT SECTION ===== */
.sect-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.sect-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--surface-muted);
    position: relative;
}

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

.sect-hd h3 {
    font-size: .97rem;
    font-weight: 900;
    color: var(--blk);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.sect-hd h3 a { color: var(--blk); }
.sect-hd h3 a:hover { color: var(--red); }

.sect-hd h4 {
    font-size: .95rem;
    font-weight: 900;
    color: var(--blk);
    text-transform: uppercase;
    letter-spacing: .3px;
}

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

.vod-grid li {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-dim);
    transition: box-shadow .18s, transform .18s;
    min-width: 0;
}

.vod-grid li:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.vod-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--surface-muted);
}

.vod-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.vod-thumb:hover img { transform: scale(1.05); }

.vod-caption {
    padding: 5px 7px 7px;
    border-top: 2px solid transparent;
    transition: border-color .15s;
}

.vod-grid li:hover .vod-caption { border-top-color: var(--red); }

.vod-caption h5 {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.vod-caption h5 a { color: var(--text-main); }
.vod-caption h5 a:hover { color: var(--red); }

/* ===== PAGINATION ===== */
.pgn-zone {
    margin: 12px 0 5px;
    display: flex;
    justify-content: center;
}

.pgn-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.pgn-inner a.pgn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--surface);
    border: 1.5px solid var(--border-dk);
    border-radius: var(--radius-sm);
    font-size: .84rem;
    font-weight: 600;
    color: var(--text-sub);
    text-decoration: none;
    transition: all .15s;
}

.pgn-inner a.pgn-btn:hover {
    background: var(--red-bg);
    border-color: var(--red);
    color: var(--red);
}

.pgn-inner a.pgn-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--red);
    border: 1.5px solid var(--red);
    border-radius: var(--radius-sm);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.ft-links-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.ft-lnk-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ft-lnk-row dd { display: inline; }

.ft-lnk-row a {
    display: inline-block;
    font-size: .77rem;
    color: var(--text-muted);
    padding: 2px 9px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-dim);
    text-decoration: none;
    transition: all .15s;
}

.ft-lnk-row a:hover { color: var(--red); border-color: var(--red); }

.ft-cr-bar {
    text-align: center;
    padding: 8px 0 13px;
    color: var(--text-muted);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.dtl-heading {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.dtl-heading a {
    color: var(--red);
    font-weight: 700;
    margin-right: 6px;
}

.dtl-specs {
    font-size: .9rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 4px 0;
}

.preview-box {
    display: block;
    width: 100%;
    margin-top: 10px;
}

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

/* ===== ACTION BUTTONS ===== */
.op-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 11px 0;
}

.op-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--blk);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .13s;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.op-btn:hover {
    background: var(--red);
    color: #fff;
    transform: translateY(-1px);
}

.client-note {
    text-align: center;
    padding: 7px;
    font-size: .82rem;
}

.client-note a { color: var(--blk); font-weight: 600; }
.client-note a:hover { color: var(--red); }

/* ===== SHARE BAR ===== */
.share-row {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.share-row .sr-lbl { font-size: .77rem; color: var(--text-muted); white-space: nowrap; }
.share-row .sr-url { font-size: .79rem; color: var(--text-sub); flex: 1; min-width: 0; word-break: break-all; }

.share-row .sr-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: var(--blk);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.share-row .sr-btn:hover { background: var(--red); }

/* ===== VISIBILITY ===== */
.only-desktop { display: block; }
.only-mobile { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .vod-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .only-desktop { display: none; }
    .only-mobile { display: block; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }

    .hd-sitename { font-size: 1.1rem; }
    .hd-url-badge .ul-val { font-size: .9rem; }

    .catmenu-row { align-items: stretch; }

    .catmenu-lbl {
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        font-size: 10px;
        padding: 4px 2px;
        letter-spacing: 0;
        line-height: 1.4;
        word-break: break-all;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .catmenu-links {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 5px;
        align-items: center;
    }

    .catmenu-links a {
        font-size: 12px;
        padding: 5px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .qsearch-bar form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .qsearch-bar input[type="text"] {
        height: 34px;
        font-size: .79rem;
        padding: 0 7px;
    }

    .qsearch-bar button {
        height: 34px;
        padding: 0 7px;
        font-size: .74rem;
    }

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

    .vod-thumb { aspect-ratio: 600 / 350; }
    .vod-caption h5 { font-size: .72rem; }
    .sect-card { padding: 9px 9px 7px; }
    .op-btn { padding: 9px 14px; font-size: .84rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .catmenu-lbl { font-size: 10px; }
    .catmenu-links a { font-size: 13px; }
}

@media (max-width: 380px) {
    .catmenu-lbl { font-size: 10px; }
    .catmenu-links a { font-size: 12px; }
    .qsearch-bar button { padding: 0 5px; font-size: .68rem; }
}
