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

:root {
    --bg: #ffffff;
    --bg-soft: #f7f7f9;
    --bg-muted: #f0f0f4;
    --navy: #1d3557;
    --navy-dark: #152844;
    --navy-mid: #2a4a7a;
    --orange: #e8490f;
    --orange-dk: #c83c0a;
    --orange-bg: #fef0eb;
    --gold: #e0a020;
    --txt: #1a1a2e;
    --txt2: #46465a;
    --txt3: #9090aa;
    --line: #e6e6ee;
    --line2: #d4d4e2;
    --s1: 0 1px 4px rgba(29,53,87,.07);
    --s2: 0 3px 12px rgba(29,53,87,.11);
    --s3: 0 6px 24px rgba(29,53,87,.15);
    --r: 8px;
    --r2: 5px;
    --r3: 14px;
}

html { font-size: 15px; }

body {
    background: var(--bg-soft);
    color: var(--txt);
    font-family: 'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
    line-height: 1.6;
}

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

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

/* ===== SITE HEADER ===== */
.hd-bar {
    background: var(--bg);
    border-bottom: 2px solid var(--line);
    padding: 9px 0;
    box-shadow: var(--s1);
}

.hd-bar .pg-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

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

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

.hd-sitename {
    font-size: 1.32rem;
    font-weight: 800;
    color: var(--orange);
    font-style: normal;
    letter-spacing: -.4px;
    border-bottom: none;
    text-decoration: none;
}

.hd-domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--navy);
    border-radius: 22px;
    padding: 4px 14px;
}

.hd-domain-pill .dp-label {
    font-size: 0.69rem;
    color: rgba(255,255,255,.6);
    white-space: nowrap;
}

.hd-domain-pill .dp-val {
    font-size: 1.0rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.nav-panel {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--s1);
}

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

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

.nav-zone-lbl {
    background: var(--navy);
    color: rgba(255,255,255,.82);
    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 rgba(255,255,255,.1);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .4px;
    flex-shrink: 0;
}

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

.nav-links-zone a {
    font-size: .82rem;
    color: var(--txt2);
    padding: 3px 6px;
    border-radius: var(--r2);
    transition: all .18s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.nav-links-zone a:hover {
    background: var(--orange-bg);
    color: var(--orange);
    border-color: #f8c0aa;
}

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

/* ===== SEARCH ===== */
.srch-block {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--s1);
}

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

.srch-block input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--line2);
    border-radius: var(--r2);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--txt);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .2s;
}

.srch-block input[type="text"]:focus {
    border-color: var(--orange);
    background: var(--bg);
}

.srch-block button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--r2);
    background: var(--navy);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s;
    flex-shrink: 0;
}

.srch-block button:hover { background: var(--navy-mid); }

.srch-block button[value="1"] { background: var(--orange); }
.srch-block button[value="1"]:hover { background: var(--orange-dk); }

.srch-block button[value="2"] { background: var(--gold); }
.srch-block button[value="2"]:hover { background: #b87e10; }

/* ===== HOT TAGS ===== */
.hot-block {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--s1);
}

.hot-block h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 5px;
}

.htag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.htag-list .ht {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt2);
    border: 1px solid var(--line2);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .18s;
}

.htag-list .ht:hover {
    background: var(--orange-bg);
    color: var(--orange);
    border-color: #f8c0aa;
}

/* ===== CONTENT SECTION ===== */
.c-sect {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r3);
    padding: 13px 13px 10px;
    margin: 5px 0;
    box-shadow: var(--s1);
}

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

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

.c-sect-hd h3 {
    font-size: .98rem;
    font-weight: 800;
    color: var(--navy);
}

.c-sect-hd h3 a { color: var(--navy); }
.c-sect-hd h3 a:hover { color: var(--orange); }

.c-sect-hd h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--navy);
}

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

.film-list li {
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    transition: box-shadow .2s, transform .2s;
}

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

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

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

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

.film-caption {
    padding: 5px 7px 7px;
}

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

.film-caption h5 a { color: var(--txt); }
.film-caption h5 a:hover { color: var(--orange); }

/* ===== PAGINATION ===== */
.pg-nav {
    margin: 14px 0 6px;
    display: flex;
    justify-content: center;
}

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

.pg-btns a.pgb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg);
    border: 1.5px solid var(--line2);
    border-radius: var(--r2);
    font-size: .84rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .18s;
}

.pg-btns a.pgb:hover {
    background: var(--orange-bg);
    border-color: var(--orange);
    color: var(--orange);
}

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

/* ===== FOOTER ===== */
.ft-links-sect {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 9px 13px;
    margin: 5px 0;
    box-shadow: var(--s1);
}

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

.flinks dd { display: inline; }

.flinks a {
    display: inline-block;
    font-size: .77rem;
    color: var(--txt3);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .18s;
}

.flinks a:hover { color: var(--orange); border-color: var(--orange); }

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

/* ===== DETAIL PAGES ===== */
.dtl-title {
    line-height: 1.8;
    text-align: center;
    padding: 13px 15px;
    font-size: .98rem;
    margin: 5px 0;
    word-break: break-all;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-left: 4px solid var(--orange);
    border-radius: var(--r);
    box-shadow: var(--s1);
}

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

.dtl-info {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--s1);
    margin: 5px 0;
}

.prev-grid {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.prev-grid picture,
.prev-grid img {
    width: 100%;
    height: auto;
    border-radius: var(--r2);
    display: block;
}

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

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

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

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

.cli-tip a { color: var(--navy); font-weight: 600; }
.cli-tip a:hover { color: var(--orange); }

/* ===== SHARE ===== */
.shr-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-soft);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 8px 13px;
    margin: 5px 0;
    flex-wrap: wrap;
}

.shr-bar .shr-lbl { font-size: .77rem; color: var(--txt3); white-space: nowrap; }
.shr-bar .shr-url { font-size: .79rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

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

.shr-bar .shr-btn:hover { background: var(--orange); }

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

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

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

    .hd-sitename { font-size: 1.06rem; }
    .hd-domain-pill .dp-val { font-size: .88rem; }

    /* Nav: zone label 15%, links 85%, 4 per row (2 rows of 4) */
    .nav-strip {
        align-items: stretch;
    }

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

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

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

    /* Search: NO wrap, all in one row */
    .srch-block form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

    /* Film grid: 2 columns, ratio locked */
    .film-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

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

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

@media (max-width: 380px) {
    .nav-zone-lbl { font-size: 12px; }
    .nav-links-zone a { font-size: 12px; }
    .srch-block button { padding: 0 5px; font-size: .68rem; }
}
