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

:root {
    --white: #ffffff;
    --gray-f: #f8f8f8;
    --gray-e: #eeeeee;
    --gray-d: #dddddd;
    --coral: #e84830;
    --coral-dk: #c93b24;
    --coral-lt: #fdf0ee;
    --navy: #1e2d5a;
    --navy-mid: #2e4080;
    --navy-lt: #eceff7;
    --gold: #f5a623;
    --gold-dk: #d48c10;
    --gold-lt: #fef7e8;
    --ink: #1a1a1a;
    --ink2: #444455;
    --ink3: #999aaa;
    --rule: #e8e8ec;
    --rule2: #d0d0da;
    --sh1: 0 1px 3px rgba(30,45,90,.07);
    --sh2: 0 3px 10px rgba(30,45,90,.10);
    --sh3: 0 8px 24px rgba(30,45,90,.14);
    --rr: 8px;
    --rr2: 5px;
    --rr3: 20px;
}

html { font-size: 15px; }

body {
    background: var(--gray-f);
    color: var(--ink);
    font-family: 'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
    line-height: 1.65;
}

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

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

/* ===== SITE HEADER ===== */
.site-hd {
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    padding: 10px 0;
    box-shadow: var(--sh1);
}

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

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

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

.hd-name-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--coral);
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
}

.hd-url-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--navy);
    border-radius: var(--rr3);
    padding: 4px 15px;
}

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

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

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

/* ===== NAV PANEL ===== */
.nav-board {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--rr);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

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

.nav-sect-name {
    background: var(--navy);
    color: rgba(255,255,255,.80);
    font-size: .67rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid rgba(255,255,255,.10);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.nav-links-row a {
    font-size: .81rem;
    color: var(--ink2);
    padding: 3px 5px;
    border-radius: var(--rr2);
    transition: all .16s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.nav-links-row a:hover {
    background: var(--coral-lt);
    color: var(--coral);
    border-color: #f5b8ae;
}

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

/* ===== SEARCH ===== */
.query-box {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--rr);
    padding: 8px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.query-box input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid var(--rule2);
    border-radius: var(--rr2);
    padding: 0 12px;
    font-size: .87rem;
    color: var(--ink);
    background: var(--gray-f);
    outline: none;
    transition: border-color .18s;
}

.query-box input[type="text"]:focus {
    border-color: var(--coral);
    background: var(--white);
}

.query-box button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--rr3);
    background: var(--navy);
    color: #fff;
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s;
    flex-shrink: 0;
}

.query-box button:hover { background: var(--navy-mid); }

.query-box button[value="1"] { background: var(--coral); }
.query-box button[value="1"]:hover { background: var(--coral-dk); }

.query-box button[value="2"] { background: var(--gold); }
.query-box button[value="2"]:hover { background: var(--gold-dk); }

/* ===== HOT TAGS ===== */
.trending-box {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--rr);
    padding: 7px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.trending-box h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 5px;
}

.trend-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.trend-tags .tt {
    display: inline-block;
    background: var(--gray-f);
    color: var(--ink2);
    border: 1px solid var(--rule2);
    border-radius: var(--rr3);
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .16s;
}

.trend-tags .tt:hover {
    background: var(--coral-lt);
    color: var(--coral);
    border-color: #f5b8ae;
}

/* ===== CONTENT SECTION ===== */
.panel-sect {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--rr);
    padding: 13px 13px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-e);
    position: relative;
}

.panel-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: var(--coral);
    border-radius: 2px;
}

.panel-head h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--navy);
}

.panel-head h3 a { color: var(--navy); }
.panel-head h3 a:hover { color: var(--coral); }

.panel-head h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--navy);
}

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

.vod-list li {
    border-radius: var(--rr);
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--gray-f);
    transition: box-shadow .2s, transform .2s;
}

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

.vod-img-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--gray-e);
}

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

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

.vod-desc {
    padding: 5px 7px 7px;
}

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

.vod-desc h5 a { color: var(--ink); }
.vod-desc h5 a:hover { color: var(--coral); }

/* ===== PAGINATION ===== */
.pager-row {
    margin: 13px 0 5px;
    display: flex;
    justify-content: center;
}

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

.pager-btns a.pgb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--white);
    border: 1px solid var(--rule2);
    border-radius: var(--rr2);
    font-size: .83rem;
    color: var(--ink2);
    text-decoration: none;
    transition: all .16s;
}

.pager-btns a.pgb:hover {
    background: var(--coral-lt);
    border-color: var(--coral);
    color: var(--coral);
}

.pager-btns a.pgb-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--coral);
    border: 1px solid var(--coral);
    border-radius: var(--rr2);
    font-size: .83rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.flinks-panel {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--rr);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.ext-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ext-links dd { display: inline; }

.ext-links a {
    display: inline-block;
    font-size: .76rem;
    color: var(--ink3);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--rule);
    background: var(--gray-f);
    text-decoration: none;
    transition: all .16s;
}

.ext-links a:hover { color: var(--coral); border-color: var(--coral); }

.copy-bar {
    text-align: center;
    padding: 8px 0 13px;
    color: var(--ink3);
    font-size: .75rem;
}

/* ===== DETAIL PAGES ===== */
.item-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 13px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--white);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--coral);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
}

.item-title-bar a {
    color: var(--coral);
    font-weight: 700;
    margin-right: 6px;
}

.item-meta-box {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
    margin: 4px 0;
}

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

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

/* ===== DOWNLOAD BUTTONS ===== */
.get-file-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.get-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--rr3);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .14s;
    text-decoration: none;
}

.get-file-btn:hover {
    background: var(--coral);
    color: #fff;
    transform: translateY(-1px);
}

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

.app-hint a { color: var(--navy); font-weight: 600; }
.app-hint a:hover { color: var(--coral); }

/* ===== SHARE ===== */
.link-share-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--gray-f);
    border: 1px solid var(--rule);
    border-radius: var(--rr);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.link-share-bar .ls-label { font-size: .76rem; color: var(--ink3); white-space: nowrap; }
.link-share-bar .ls-url { font-size: .78rem; color: var(--ink2); flex: 1; min-width: 0; word-break: break-all; }

.link-share-bar .ls-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--rr3);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s;
    flex-shrink: 0;
}

.link-share-bar .ls-btn:hover { background: var(--coral); }

/* ===== VIS HELPERS ===== */
.pc-only { display: block; }
.mb-only { display: none; }

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

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

    .hd-name-text { font-size: 1.05rem; }
    .hd-url-badge .url-val { font-size: .87rem; }

    .nav-line { align-items: stretch; }

    .nav-sect-name {
        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;
    }

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

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

    .query-box form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .query-box input[type="text"] {
        height: 34px;
        font-size: .77rem;
        padding: 0 6px;
    }

    .query-box button {
        height: 34px;
        padding: 0 7px;
        font-size: .72rem;
    }

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

    .vod-img-wrap { aspect-ratio: 600 / 350; }
    .vod-desc h5 { font-size: .71rem; }
    .panel-sect { padding: 9px 9px 7px; }
    .get-file-btn { padding: 9px 14px; font-size: .83rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .nav-sect-name { font-size: 10px; }
    .nav-links-row a { font-size: 13px; }
}

@media (max-width: 380px) {
    .nav-sect-name { font-size: 10px; }
    .nav-links-row a { font-size: 12px; }
    .query-box button { padding: 0 5px; font-size: .67rem; }
}
