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

:root {
    --or1: #f5a623;
    --or2: #f08c00;
    --or3: #e07800;
    --or-light: #fef3e2;
    --or-mid: #fde8c0;
    --bg-grad: linear-gradient(160deg, #f5a623 0%, #f9c46b 45%, #fde8c0 80%, #fff8f0 100%);
    --bg-body: #fdf6ee;
    --bg-card: #ffffff;
    --bg-card2: rgba(255,255,255,0.82);
    --navy: #1a1a2e;
    --txt: #2a2a2a;
    --txt2: #555566;
    --txt3: #999aaa;
    --line: rgba(245,166,35,0.25);
    --line2: rgba(245,166,35,0.45);
    --s1: 0 2px 8px rgba(240,140,0,0.10);
    --s2: 0 4px 18px rgba(240,140,0,0.15);
    --s3: 0 6px 24px rgba(240,140,0,0.22);
    --r: 10px;
    --r2: 6px;
    --r3: 16px;
}

html { font-size: 15px; }

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

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

/* ===== WRAPPER ===== */
.gw {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.top-bar {
    background: var(--or1);
    padding: 8px 0;
}

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

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

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

.top-sitename {
    font-size: 1.28rem;
    font-weight: 800;
    color: #ffffff;
    font-style: normal;
    letter-spacing: -.3px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.18);
    text-decoration: none;
    border-bottom: none;
}

.top-domain-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    padding: 3px 13px;
    backdrop-filter: blur(4px);
}

.top-domain-wrap .dw-label {
    font-size: 0.69rem;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.top-domain-wrap .dw-url {
    font-size: 1.0rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ===== GRADIENT HERO BAND ===== */
.hero-band {
    background: var(--bg-grad);
    padding: 6px 0 10px;
    border-bottom: 2px solid var(--line2);
}

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

/* ===== CATEGORY NAV ===== */
.cat-board {
    background: var(--bg-card2);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--s1);
    backdrop-filter: blur(6px);
}

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

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

/* PC端：分区标签固定宽度，能容纳4个汉字 */
.cl-zone {
    background: var(--or2);
    color: rgba(255,255,255,0.92);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 6px;
    width: 68px;
    min-width: 68px;
    border-right: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .4px;
    flex-shrink: 0;
}

/* PC端：8个链接一行排满 */
.cl-items {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    padding: 4px 8px;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.cl-items a {
    font-size: .82rem;
    color: var(--txt2);
    padding: 3px 0;
    border-radius: var(--r2);
    transition: all .18s;
    white-space: nowrap;
    border: 1px solid transparent;
    text-decoration: none;
    flex: 1;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cl-items a:hover {
    background: var(--or-light);
    color: var(--or3);
    border-color: var(--or-mid);
}

.cl-items a.active {
    background: var(--or2);
    color: #fff;
    border-color: var(--or2);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.qry-bar {
    background: var(--bg-card2);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--s1);
    backdrop-filter: blur(6px);
}

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

.qry-bar 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: rgba(255,255,255,0.9);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.qry-bar input[type="text"]:focus {
    border-color: var(--or2);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245,166,35,0.18);
}

.qry-bar button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--r2);
    background: var(--or2);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s, transform .1s;
    flex-shrink: 0;
}

.qry-bar button:hover {
    background: var(--or3);
    transform: translateY(-1px);
}

.qry-bar button:first-of-type {
    background: #d44;
}
.qry-bar button:first-of-type:hover { background: #b33; }

/* ===== HOT TAGS ===== */
.hot-zone {
    background: var(--bg-card2);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 4px 0;
    backdrop-filter: blur(6px);
}

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

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

.htags .hk {
    display: inline-block;
    background: rgba(255,255,255,0.7);
    color: var(--txt2);
    border: 1px solid var(--or-mid);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .18s;
}

.htags .hk:hover {
    background: var(--or2);
    color: #fff;
    border-color: var(--or2);
}

/* ===== CONTENT SECTIONS ===== */
.rsect {
    background: var(--bg-card);
    border-radius: var(--r3);
    padding: 13px 13px 10px;
    margin: 5px 0;
    box-shadow: var(--s2);
    border: 1px solid var(--line);
}

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

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

.rsect-hd h3 {
    font-size: .98rem;
    font-weight: 800;
    color: var(--txt);
}

.rsect-hd h3 a { color: var(--txt); }
.rsect-hd h3 a:hover { color: var(--or2); }

.rsect-hd h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--txt);
}

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

.vgrid li {
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fafafa;
    transition: box-shadow .2s, transform .2s;
}

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

.vthumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--or-light);
}

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

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

.vcap {
    padding: 5px 7px 7px;
}

.vcap 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;
}

.vcap h5 a { color: var(--txt); }
.vcap h5 a:hover { color: var(--or2); }

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

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

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

.pgrow a.pgn:hover {
    background: var(--or-light);
    border-color: var(--or2);
    color: var(--or2);
}

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

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

.flks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.flks dd { display: inline; }

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

.flks a:hover { color: var(--or3); border-color: var(--or3); background: var(--or-mid); }

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

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

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

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

.cap-wrap {
    display: block;
    width: 100%;
    margin-top: 10px;
}

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

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

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

.dlbtn:hover {
    background: var(--or3);
    color: #fff;
    transform: translateY(-1px);
}

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

.clnttip a { color: var(--or2); font-weight: 600; }
.clnttip a:hover { color: var(--or3); }

/* ===== SHARE ===== */
.shr-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--or-light);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    padding: 8px 13px;
    margin: 5px 0;
    flex-wrap: wrap;
}

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

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

.shr-strip .ss-btn:hover { background: var(--or3); }

/* ===== VIS UTILS ===== */
.pco { display: block; }
.mbo { display: none; }

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

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

    .top-sitename { font-size: 1.06rem; }
    .top-domain-wrap .dw-url { font-size: .88rem; }

    /* 移动端：分区标签固定宽度，保证4个汉字完整显示 */
    .cl-zone {
        width: 44px;
        min-width: 44px;
        font-size: 13px;
        padding: 4px 2px;
        letter-spacing: 0;
        line-height: 1.4;
        /* 强制4个字单列显示，每字一行 */
        word-break: break-all;
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }

    /* 移动端：链接区域占剩余空间，4列grid，8个链接分2行 */
    .cl-items {
        flex: 1;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 5px;
        align-items: center;
    }

    .cl-items a {
        font-size: 13px;
        padding: 5px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: unset;
        border: 1px solid transparent;
        border-radius: var(--r2);
    }

    /* Search: nowrap single line */
    .qry-bar form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

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

    .vthumb { aspect-ratio: 600 / 350; }
    .vcap h5 { font-size: .72rem; }
    .rsect { padding: 9px 9px 7px; }
    .dlbtn { padding: 9px 14px; font-size: .84rem; }
}

@media (max-width: 380px) {
    .cl-items a { font-size: 12px; }
    .qry-bar button { padding: 0 5px; font-size: .68rem; }
}
