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

:root {
    --bg: #ffffff;
    --bg-soft: #f8f8f8;
    --bg-hover: #f2f2f2;
    --bg-muted: #ebebeb;
    --red: #c0392b;
    --red-dk: #a93226;
    --red-lt: #fdf3f2;
    --red-border: #e8c5c2;
    --navy: #1a2233;
    --navy2: #2c3a52;
    --txt: #111111;
    --txt2: #3a3a3a;
    --txt3: #6e6e6e;
    --txt4: #999999;
    --border: #e0e0e0;
    --border2: #cccccc;
    --shadow1: 0 1px 3px rgba(0,0,0,.07);
    --shadow2: 0 2px 8px rgba(0,0,0,.10);
    --radius: 4px;
    --radius2: 3px;
    --radius3: 5px;
}

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(--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 ===== */
.w-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== SITE HEADER ===== */
.site-hd {
    background: var(--bg);
    border-bottom: 2px solid var(--navy);
    padding: 8px 0;
}

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

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

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

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

.url-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border2);
    border-radius: var(--radius2);
    padding: 3px 10px;
    background: var(--bg-soft);
}

.url-pill .pill-lbl {
    font-size: 0.67rem;
    color: var(--txt4);
    white-space: nowrap;
}

.url-pill .pill-domain {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--red);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.cat-board {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--shadow1);
}

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

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

.cat-label {
    background: var(--navy);
    color: rgba(255,255,255,.72);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid rgba(255,255,255,.07);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .2px;
    flex-shrink: 0;
}

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

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

.cat-items a:hover {
    background: var(--red-lt);
    color: var(--red);
    border-color: var(--red-border);
}

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

/* ===== SEARCH ===== */
.srch-row {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--shadow1);
}

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

.srch-row input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 1px solid var(--border2);
    border-radius: var(--radius2);
    padding: 0 11px;
    font-size: .87rem;
    color: var(--txt);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .18s;
}

.srch-row input[type="text"]::placeholder { color: var(--txt4); }

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

.srch-row button {
    height: 34px;
    padding: 0 11px;
    border: 1px solid var(--border2);
    border-radius: var(--radius2);
    background: var(--bg-soft);
    color: var(--txt2);
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
}

.srch-row button:hover { background: var(--bg-muted); color: var(--txt); }

.srch-row button[value="1"] {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.srch-row button[value="1"]:hover { background: var(--red-dk); border-color: var(--red-dk); }

.srch-row button[value="2"] {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.srch-row button[value="2"]:hover { background: var(--navy2); border-color: var(--navy2); }

/* ===== HOT TAGS ===== */
.hot-row {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 12px;
    margin: 3px 0;
    box-shadow: var(--shadow1);
}

.hot-row h4 {
    font-size: .77rem;
    font-weight: 700;
    color: var(--txt2);
    margin-bottom: 5px;
}

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

.kwds-list .kwd {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt3);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 2px 9px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .15s;
}

.kwds-list .kwd:hover {
    background: var(--red-lt);
    color: var(--red);
    border-color: var(--red-border);
}

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

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

.sect-head h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: .1px;
}

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

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

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

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

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

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

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

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

.thumb-cap {
    padding: 5px 7px 7px;
    border-top: 1px solid var(--border);
}

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

.thumb-cap h5 a { color: var(--txt2); }
.thumb-cap h5 a:hover { color: var(--red); }

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

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

.page-btns a.pb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: var(--radius2);
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .15s;
}

.page-btns a.pb:hover {
    background: var(--red-lt);
    border-color: var(--red-border);
    color: var(--red);
}

.page-btns a.pb-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--radius2);
    font-size: .83rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.foot-links {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--shadow1);
}

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

.frd-links dd { display: inline; }

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

.frd-links a:hover { color: var(--red); border-color: var(--red-border); }

.copy-note {
    text-align: center;
    padding: 7px 0 12px;
    color: var(--txt4);
    font-size: .74rem;
}

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

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

.dtl-body {
    font-size: .9rem;
    line-height: 2;
    padding: 14px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow1);
    margin: 4px 0;
    color: var(--txt2);
}

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

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

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

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 20px;
    background: var(--navy);
    color: #fff;
    border: 1px solid var(--navy);
    border-radius: var(--radius2);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
}

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

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

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

/* ===== SHARE ===== */
.shr-line {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 12px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.shr-line .shr-tag { font-size: .76rem; color: var(--txt4); white-space: nowrap; }
.shr-line .shr-val { font-size: .78rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.shr-line .shr-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: var(--navy);
    color: #fff;
    border: 1px solid var(--navy);
    border-radius: var(--radius2);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}

.shr-line .shr-copy:hover { background: var(--red); border-color: var(--red); }

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .thumb-grid { 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 { font-size: 1.04rem; }
    .url-pill .pill-domain { font-size: .92rem; }

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

    .cat-label {
        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;
    }

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

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

    .srch-row form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .srch-row input[type="text"] {
        height: 32px;
        font-size: .77rem;
        padding: 0 7px;
    }

    .srch-row button {
        height: 32px;
        padding: 0 7px;
        font-size: .72rem;
    }

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

    .thumb-img { aspect-ratio: 600 / 350; }
    .thumb-cap h5 { font-size: .71rem; }
    .sect-box { padding: 9px 9px 7px; }
    .dl-btn { padding: 8px 13px; font-size: .83rem; }
}

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

@media (max-width: 380px) {
    .cat-label { font-size: 10px; }
    .cat-items a { font-size: 12px; }
    .srch-row button { padding: 0 5px; font-size: .66rem; }
}
