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

:root {
    --surface: #ffffff;
    --surface-alt: #f4f6f9;
    --surface-dim: #ebeef4;
    --ink: #1c2333;
    --ink2: #4a5568;
    --ink3: #8a96a8;
    --teal: #00897b;
    --teal-dk: #006d63;
    --teal-lt: #e0f2f0;
    --coral: #e05c2a;
    --coral-dk: #bf4a1e;
    --slate: #2d3a52;
    --slate-mid: #3d4f6e;
    --border: #dde2ec;
    --border2: #c8cfe0;
    --sd1: 0 1px 3px rgba(28,35,51,.06);
    --sd2: 0 2px 10px rgba(28,35,51,.10);
    --sd3: 0 5px 20px rgba(28,35,51,.14);
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 10px;
}

html { font-size: 15px; }

body {
    background: var(--surface-alt);
    color: var(--ink);
    font-family: 'Noto Sans SC','PingFang SC','Microsoft YaHei',sans-serif;
    line-height: 1.6;
}

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

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

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

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

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

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

.site-title-txt {
    font-size: 1.28rem;
    font-weight: 900;
    color: #ffffff;
    font-style: normal;
    letter-spacing: -.3px;
    border-bottom: none;
    text-decoration: none;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    padding: 4px 13px;
}

.domain-badge .badge-lbl {
    font-size: 0.68rem;
    color: rgba(255,255,255,.55);
    white-space: nowrap;
}

.domain-badge .badge-url {
    font-size: 1.05rem;
    font-weight: 800;
    color: #00e5d4;
    white-space: nowrap;
}

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

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

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

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

.cat-zone-tag {
    background: var(--slate);
    color: rgba(255,255,255,.78);
    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,.08);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

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

.cat-links-zone a:hover {
    background: var(--teal-lt);
    color: var(--teal);
    border-color: #9fd8d3;
}

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

/* ===== SEARCH ===== */
.search-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sd1);
}

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

.search-bar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: 0 11px;
    font-size: .87rem;
    color: var(--ink);
    background: var(--surface-alt);
    outline: none;
    transition: border-color .18s;
}

.search-bar input[type="text"]:focus {
    border-color: var(--teal);
    background: var(--surface);
}

.search-bar button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--slate);
    color: #fff;
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s;
    flex-shrink: 0;
}

.search-bar button:hover { background: var(--slate-mid); }
.search-bar button[value="1"] { background: var(--teal); }
.search-bar button[value="1"]:hover { background: var(--teal-dk); }
.search-bar button[value="2"] { background: var(--coral); }
.search-bar button[value="2"]:hover { background: var(--coral-dk); }

/* ===== HOT TAGS ===== */
.tag-strip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--sd1);
}

.tag-strip h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 5px;
}

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

.tag-items .tag-pill {
    display: inline-block;
    background: var(--surface-alt);
    color: var(--ink2);
    border: 1px solid var(--border2);
    border-radius: 18px;
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .16s;
}

.tag-items .tag-pill:hover {
    background: var(--teal-lt);
    color: var(--teal);
    border-color: #9fd8d3;
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--sd1);
}

.block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--surface-dim);
    position: relative;
}

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

.block-head h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--slate);
}

.block-head h3 a { color: var(--slate); }
.block-head h3 a:hover { color: var(--teal); }

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

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

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

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

.thumb-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--surface-dim);
}

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

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

.movie-info {
    padding: 5px 7px 7px;
}

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

.movie-info h5 a { color: var(--ink); }
.movie-info h5 a:hover { color: var(--teal); }

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

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

.page-btn-row a.pb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 32px;
    padding: 0 9px;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    font-size: .83rem;
    color: var(--ink2);
    text-decoration: none;
    transition: all .16s;
}

.page-btn-row a.pb:hover {
    background: var(--teal-lt);
    border-color: var(--teal);
    color: var(--teal);
}

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

/* ===== FOOTER ===== */
.friend-links {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sd1);
}

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

.flink-list dd { display: inline; }

.flink-list a {
    display: inline-block;
    font-size: .76rem;
    color: var(--ink3);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    text-decoration: none;
    transition: all .16s;
}

.flink-list a:hover { color: var(--teal); border-color: var(--teal); }

.copy-bar {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--ink3);
    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(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--teal);
    border-radius: var(--radius);
    box-shadow: var(--sd1);
}

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

.detail-meta {
    font-size: .89rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--sd1);
    margin: 4px 0;
}

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

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

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

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

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

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

.client-hint a { color: var(--slate); font-weight: 600; }
.client-hint a:hover { color: var(--teal); }

/* ===== SHARE ===== */
.share-row {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

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

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

.share-row .share-copy-btn:hover { background: var(--teal); }

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

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

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

    .site-title-txt { font-size: 1.04rem; }
    .domain-badge .badge-url { font-size: .87rem; }

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

    .cat-zone-tag {
        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-links-zone {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 5px;
        align-items: center;
    }

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

    .search-bar form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

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

    .thumb-wrap { aspect-ratio: 600 / 350; }
    .movie-info h5 { font-size: .71rem; }
    .content-block { padding: 8px 8px 6px; }
    .act-btn { padding: 9px 14px; font-size: .83rem; }
}

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

@media (max-width: 380px) {
    .cat-zone-tag { font-size: 10px; }
    .cat-links-zone a { font-size: 12px; }
    .search-bar button { padding: 0 5px; font-size: .67rem; }
}
