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

:root {
    --bg: #ffffff;
    --bg-soft: #f5f5f5;
    --bg-muted: #ebebeb;
    --red: #cc0000;
    --red-dk: #a30000;
    --red-lt: #fff0f0;
    --grn: #1a6b2a;
    --grn-dk: #134f1f;
    --grn-lt: #edf6ef;
    --txt: #1c1c1c;
    --txt2: #444444;
    --txt3: #888888;
    --bdr: #dddddd;
    --bdr2: #cccccc;
    --sh1: 0 1px 3px rgba(0,0,0,.07);
    --sh2: 0 2px 8px rgba(0,0,0,.10);
    --sh3: 0 4px 18px rgba(0,0,0,.13);
    --rr: 4px;
    --rr2: 3px;
    --rr3: 6px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.main-header {
    background: var(--bg);
    border-bottom: 3px solid var(--red);
    padding: 8px 0;
    box-shadow: var(--sh1);
}

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

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

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

.hdr-site-name {
    font-size: 1.36rem;
    font-weight: 900;
    color: var(--red);
    font-style: normal;
    letter-spacing: -0.4px;
    border-bottom: none;
    text-decoration: none;
}

.hdr-domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--red);
    border-radius: var(--rr2);
    padding: 4px 12px;
}

.hdr-domain-tag .dtag-lbl {
    font-size: 0.67rem;
    color: rgba(255,255,255,.65);
    white-space: nowrap;
}

.hdr-domain-tag .dtag-url {
    font-size: 1.06rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.nav-board {
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-top: 3px solid var(--red);
    border-radius: var(--rr3);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

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

.nav-zone-name {
    background: var(--red);
    color: rgba(255,255,255,.9);
    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,.15);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

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

.nav-items-zone a:hover {
    background: var(--red-lt);
    color: var(--red);
    border-color: #f5bbbb;
}

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

/* ===== SEARCH ===== */
.search-panel {
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.search-panel input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--bdr2);
    border-radius: var(--rr2);
    padding: 0 12px;
    font-size: .87rem;
    color: var(--txt);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .18s;
}

.search-panel input[type="text"]:focus {
    border-color: var(--red);
    background: var(--bg);
}

.search-panel button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--rr2);
    background: var(--txt2);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.search-panel button:hover { background: var(--txt); }

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

.search-panel button[value="2"] { background: var(--grn); }
.search-panel button[value="2"]:hover { background: var(--grn-dk); }

/* ===== HOT TAGS ===== */
.hotsearch-panel {
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rr);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.hotsearch-panel h4 {
    font-size: .78rem;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 5px;
}

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

.hotword-list .hw {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt2);
    border: 1px solid var(--bdr2);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .15s;
}

.hotword-list .hw:hover {
    background: var(--red-lt);
    color: var(--red);
    border-color: #f5bbbb;
}

/* ===== CONTENT SECTION ===== */
.content-sect {
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rr3);
    padding: 12px 12px 9px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

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

.sect-head h3 {
    font-size: .97rem;
    font-weight: 900;
    color: var(--txt);
}

.sect-head h3 a { color: var(--txt); }
.sect-head h3 a:hover { color: var(--red); }

.sect-head h4 {
    font-size: .94rem;
    font-weight: 800;
    color: var(--txt);
}

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

.item-grid li {
    border-radius: var(--rr);
    overflow: hidden;
    border: 1px solid var(--bdr);
    background: var(--bg-soft);
    transition: box-shadow .2s, transform .18s;
}

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

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

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

.item-cover:hover img { transform: scale(1.05); }

.item-info {
    padding: 5px 7px 6px;
}

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

.item-info h5 a { color: var(--txt); }
.item-info h5 a:hover { color: var(--red); }

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

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

.pager-list a.pg-btn {
    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(--bdr2);
    border-radius: var(--rr2);
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .15s;
}

.pager-list a.pg-btn:hover {
    background: var(--red-lt);
    border-color: var(--red);
    color: var(--red);
}

.pager-list a.pg-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(--rr2);
    font-size: .83rem;
    font-weight: 800;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.flink-sect {
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rr);
    padding: 9px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.flink-items dd { display: inline; }

.flink-items a {
    display: inline-block;
    font-size: .76rem;
    color: var(--txt3);
    padding: 2px 9px;
    border-radius: 3px;
    border: 1px solid var(--bdr);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .15s;
}

.flink-items a:hover { color: var(--red); border-color: var(--red); }

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

/* ===== DETAIL PAGES ===== */
.detail-title {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-left: 4px solid var(--red);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
}

.detail-title a {
    color: var(--red);
    font-weight: 800;
    margin-right: 6px;
}

.detail-specs {
    font-size: .89rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
    margin: 4px 0;
}

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

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

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

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

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

.client-notice {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.client-notice a { color: var(--grn); font-weight: 700; }
.client-notice a:hover { color: var(--grn-dk); }

/* ===== SHARE ===== */
.share-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-soft);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 4px 0;
    flex-wrap: wrap;
}

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

.share-bar .s-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: var(--rr2);
    font-size: .79rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.share-bar .s-copy-btn:hover { background: var(--red-dk); }

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

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

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

    .hdr-site-name { font-size: 1.05rem; }
    .hdr-domain-tag .dtag-url { font-size: .92rem; }

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

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

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

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

    /* Search: single row, no wrap */
    .search-panel form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .search-panel input[type="text"] {
        height: 34px;
        font-size: .77rem;
        padding: 0 7px;
    }

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

    /* Film grid: 2 columns */
    .item-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .item-cover { aspect-ratio: 600 / 350; }
    .item-info h5 { font-size: .71rem; }
    .content-sect { padding: 8px 8px 6px; }
    .dl-action-btn { padding: 9px 13px; font-size: .83rem; }
}

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

@media (max-width: 380px) {
    .nav-zone-name { font-size: 10px; }
    .nav-items-zone a { font-size: 12px; }
    .search-panel button { padding: 0 5px; font-size: .67rem; }
}
