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

:root {
    --white: #ffffff;
    --off-white: #f5f5f5;
    --panel: #efefef;
    --card: #ffffff;
    --jet: #111111;
    --charcoal: #2b2b2b;
    --mid: #555555;
    --muted: #888888;
    --faint: #bbbbbb;
    --divider: #dedede;
    --divider2: #cacaca;
    --neon: #00d100;
    --neon-dk: #009900;
    --neon-wash: rgba(0,209,0,.09);
    --e1: 0 1px 3px rgba(0,0,0,.07);
    --e2: 0 2px 10px rgba(0,0,0,.09);
    --e3: 0 5px 22px rgba(0,0,0,.12);
    --rr: 3px;
    --rr2: 2px;
    --rr3: 5px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.mw-topbar {
    background: var(--jet);
    border-bottom: 3px solid var(--neon);
    padding: 9px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.22);
}

.mw-topbar .mw-container {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

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

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

.mw-title {
    font-size: 1.32rem;
    font-weight: 900;
    color: var(--neon);
    font-style: normal;
    letter-spacing: -.2px;
    text-decoration: none;
    border-bottom: none;
}

.mw-addr-box {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: var(--rr2);
    padding: 4px 12px;
}

.mw-addr-box .ab-hint {
    font-size: .67rem;
    color: rgba(255,255,255,.38);
    white-space: nowrap;
}

.mw-addr-box .ab-domain {
    font-size: 1.07rem;
    font-weight: 800;
    color: var(--neon);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.mw-channav {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--rr3);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--e1);
}

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

.mw-chanrow:last-child { border-bottom: none; }

.mw-zone-badge {
    background: var(--jet);
    color: rgba(255,255,255,.6);
    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,.07);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.mw-catlinks a {
    font-size: .81rem;
    color: var(--charcoal);
    padding: 4px 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;
}

.mw-catlinks a:hover {
    background: var(--neon-wash);
    color: var(--neon-dk);
    border-color: rgba(0,209,0,.22);
}

.mw-catlinks a.active {
    background: var(--neon);
    color: var(--jet);
    border-color: var(--neon);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.mw-querybar {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--rr3);
    padding: 7px 11px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.mw-querybar form {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.mw-querybar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr2);
    padding: 0 11px;
    font-size: .86rem;
    color: var(--jet);
    background: var(--off-white);
    outline: none;
    transition: border-color .18s;
}

.mw-querybar input[type="text"]::placeholder { color: var(--faint); }
.mw-querybar input[type="text"]:focus {
    border-color: var(--neon);
    background: var(--white);
}

.mw-querybar button {
    height: 34px;
    padding: 0 11px;
    border: none;
    border-radius: var(--rr2);
    background: var(--charcoal);
    color: var(--white);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.mw-querybar button:hover { background: var(--jet); }

.mw-querybar button[value="1"] {
    background: var(--neon);
    color: var(--jet);
    font-weight: 700;
}
.mw-querybar button[value="1"]:hover { background: var(--neon-dk); color: var(--white); }

.mw-querybar button[value="2"] {
    background: var(--white);
    color: var(--jet);
    font-weight: 700;
    border: 1.5px solid var(--neon);
}
.mw-querybar button[value="2"]:hover { background: var(--neon-wash); }

/* ===== HOT TAGS ===== */
.mw-hotwords {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--rr3);
    padding: 6px 11px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.mw-hotwords h4 {
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.mw-tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mw-tagcloud .tc-item {
    display: inline-block;
    background: var(--off-white);
    color: var(--mid);
    border: 1px solid var(--divider2);
    border-radius: var(--rr2);
    padding: 2px 9px;
    font-size: .73rem;
    text-decoration: none;
    transition: all .15s;
}

.mw-tagcloud .tc-item:hover {
    background: var(--neon-wash);
    color: var(--neon-dk);
    border-color: rgba(0,209,0,.3);
}

/* ===== CONTENT SECTION ===== */
.mw-block {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--rr3);
    padding: 11px 11px 9px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.mw-block-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
    padding-bottom: 7px;
    border-bottom: 2.5px solid var(--neon);
}

.mw-block-hd h3 {
    font-size: .96rem;
    font-weight: 800;
    color: var(--jet);
    letter-spacing: -.1px;
}

.mw-block-hd h3 a { color: var(--jet); }
.mw-block-hd h3 a:hover { color: var(--neon-dk); }

.mw-block-hd h4 {
    font-size: .94rem;
    font-weight: 800;
    color: var(--jet);
}

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

.mw-filmgrid li {
    border-radius: var(--rr);
    overflow: hidden;
    border: 1px solid var(--divider);
    background: var(--panel);
    transition: box-shadow .2s, border-color .2s;
}

.mw-filmgrid li:hover {
    box-shadow: var(--e3);
    border-color: var(--neon);
}

.mw-filmcover {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--panel);
}

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

.mw-filmcover:hover img { transform: scale(1.04); }

.mw-filmfoot {
    padding: 4px 6px 6px;
    border-top: 2px solid transparent;
    transition: border-color .2s;
}

.mw-filmgrid li:hover .mw-filmfoot { border-top-color: var(--neon); }

.mw-filmfoot h5 {
    font-size: .75rem;
    font-weight: 500;
    color: var(--mid);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mw-filmfoot h5 a { color: var(--mid); }
.mw-filmfoot h5 a:hover { color: var(--neon-dk); }

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

.mw-pagebtns {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.mw-pagebtns a.mpb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--card);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr2);
    font-size: .81rem;
    color: var(--mid);
    text-decoration: none;
    transition: all .15s;
}

.mw-pagebtns a.mpb:hover {
    background: var(--neon-wash);
    border-color: var(--neon);
    color: var(--neon-dk);
}

.mw-pagebtns a.mpb-active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--neon);
    border: 1.5px solid var(--neon);
    border-radius: var(--rr2);
    font-size: .81rem;
    font-weight: 700;
    color: var(--jet);
    cursor: default;
}

/* ===== FOOTER ===== */
.mw-footlinks {
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--e1);
}

.mw-flrow {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mw-flrow dd { display: inline; }

.mw-flrow a {
    display: inline-block;
    font-size: .74rem;
    color: var(--faint);
    padding: 2px 8px;
    border-radius: var(--rr2);
    border: 1px solid var(--divider);
    background: var(--off-white);
    text-decoration: none;
    transition: all .15s;
}

.mw-flrow a:hover { color: var(--neon-dk); border-color: var(--neon); }

.mw-footcopy {
    text-align: center;
    padding: 7px 0 13px;
    color: var(--faint);
    font-size: .73rem;
}

/* ===== DETAIL PAGES ===== */
.mw-itemtitle {
    line-height: 1.8;
    text-align: center;
    padding: 11px 14px;
    font-size: .96rem;
    margin: 3px 0;
    word-break: break-all;
    background: var(--card);
    border: 1px solid var(--divider);
    border-left: 4px solid var(--neon);
    border-radius: var(--rr);
    box-shadow: var(--e1);
    color: var(--jet);
}

.mw-itemtitle a {
    color: var(--neon-dk);
    font-weight: 700;
    margin-right: 6px;
}

.mw-itemmeta {
    font-size: .88rem;
    line-height: 2;
    padding: 13px 16px;
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--rr);
    box-shadow: var(--e1);
    margin: 3px 0;
    color: var(--mid);
}

.mw-capture {
    display: block;
    width: 100%;
    margin-top: 9px;
}

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

/* ===== DL BUTTONS ===== */
.mw-dlzone {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 11px 0;
}

.mw-dlbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 22px;
    background: var(--jet);
    color: var(--neon);
    border: 2px solid var(--neon);
    border-radius: var(--rr2);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, color .18s, transform .15s;
    text-decoration: none;
}

.mw-dlbtn:hover {
    background: var(--neon);
    color: var(--jet);
    transform: translateY(-1px);
}

.mw-clinote {
    text-align: center;
    padding: 6px;
    font-size: .8rem;
}

.mw-clinote a { color: var(--muted); font-weight: 600; }
.mw-clinote a:hover { color: var(--neon-dk); }

/* ===== SHARE ===== */
.mw-sharerow {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--off-white);
    border: 1px solid var(--divider);
    border-radius: var(--rr);
    padding: 7px 12px;
    margin: 3px 0;
    flex-wrap: wrap;
}

.mw-sharerow .sr2-lbl { font-size: .73rem; color: var(--faint); white-space: nowrap; }
.mw-sharerow .sr2-url { font-size: .76rem; color: var(--mid); flex: 1; min-width: 0; word-break: break-all; }

.mw-sharerow .sr2-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: var(--jet);
    color: var(--neon);
    border: 1.5px solid var(--neon);
    border-radius: var(--rr2);
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.mw-sharerow .sr2-copy:hover { background: var(--neon); color: var(--jet); }

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

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

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

    .mw-title { font-size: 1.06rem; }
    .mw-addr-box .ab-domain { font-size: .9rem; }

    .mw-chanrow { align-items: stretch; }

    .mw-zone-badge {
        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;
    }

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

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

    /* Search: NO wrap, all in one row */
    .mw-querybar form {
        flex-wrap: nowrap;
        gap: 3px;
    }

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

    .mw-querybar button {
        height: 32px;
        padding: 0 6px;
        font-size: .72rem;
    }

    .mw-filmgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .mw-filmcover { aspect-ratio: 600 / 350; }
    .mw-filmfoot h5 { font-size: .7rem; }
    .mw-block { padding: 8px 8px 6px; }
    .mw-dlbtn { padding: 8px 14px; font-size: .82rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .mw-zone-badge { font-size: 10px; }
    .mw-catlinks a { font-size: 13px; }
}

@media (max-width: 380px) {
    .mw-zone-badge { font-size: 10px; }
    .mw-catlinks a { font-size: 12px; }
    .mw-querybar button { padding: 0 4px; font-size: .66rem; }
}
