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

:root {
    --bg-root: #1a1f2e;
    --bg-panel: #212739;
    --bg-card: #252c3d;
    --bg-hover: #2d3549;
    --ink: #eef0f6;
    --ink2: #a8aec4;
    --ink3: #606880;
    --accent: #4caf7d;
    --accent-dk: #3a9468;
    --accent-bg: rgba(76,175,125,.12);
    --teal: #2e7dc4;
    --teal-dk: #235e96;
    --border: #2e3650;
    --border2: #38405e;
    --glow: 0 0 0 1px rgba(76,175,125,.18);
    --sh1: 0 1px 4px rgba(0,0,0,.22);
    --sh2: 0 3px 12px rgba(0,0,0,.32);
    --sh3: 0 6px 24px rgba(0,0,0,.42);
    --rad: 7px;
    --rad2: 4px;
    --rad3: 10px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.top-header {
    background: #111623;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    box-shadow: var(--sh2);
}

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

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

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

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

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(76,175,125,.15);
    border: 1px solid rgba(76,175,125,.30);
    border-radius: 24px;
    padding: 4px 14px;
}

.domain-badge .badge-label {
    font-size: 0.67rem;
    color: rgba(255,255,255,.5);
    white-space: nowrap;
}

.domain-badge .badge-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

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

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

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

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

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

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

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

.zone-links a:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: rgba(76,175,125,.35);
}

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

/* ===== SEARCH BAR ===== */
.search-row {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

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

.search-row input[type="text"]:focus {
    border-color: var(--accent);
}

.search-row button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--rad2);
    background: #2a3348;
    color: var(--ink2);
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .17s;
    flex-shrink: 0;
}

.search-row button:hover { background: var(--teal); color: #fff; }

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

.search-row button[value="2"] { background: var(--teal); color: #fff; }
.search-row button[value="2"]:hover { background: var(--teal-dk); }

/* ===== HOT TAGS ===== */
.trending-block {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.trending-block h4 {
    font-size: .77rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

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

.tag-strip .xtag {
    display: inline-block;
    background: rgba(255,255,255,.04);
    color: var(--ink2);
    border: 1px solid var(--border2);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .17s;
}

.tag-strip .xtag:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: rgba(76,175,125,.4);
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--rad3);
    padding: 12px 12px 10px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

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

.block-head h3 a { color: var(--ink); }
.block-head h3 a:hover { color: var(--accent); }

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

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

.media-grid li {
    border-radius: var(--rad);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: box-shadow .2s, transform .2s;
}

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

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

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

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

.media-caption {
    padding: 5px 7px 7px;
}

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

.media-caption h5 a { color: var(--ink2); }
.media-caption h5 a:hover { color: var(--accent); }

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

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

.pager-btns a.pbn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg-card);
    border: 1px solid var(--border2);
    border-radius: var(--rad2);
    font-size: .83rem;
    color: var(--ink2);
    text-decoration: none;
    transition: all .17s;
}

.pager-btns a.pbn:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}

.pager-btns a.pbn-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--rad2);
    font-size: .83rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.flink-box {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 9px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.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: rgba(255,255,255,.03);
    text-decoration: none;
    transition: all .17s;
}

.flink-list a:hover { color: var(--accent); border-color: rgba(76,175,125,.4); }

.copyright-row {
    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: .96rem;
    margin: 3px 0;
    word-break: break-all;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
}

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

.detail-info {
    font-size: .89rem;
    line-height: 1.95;
    padding: 14px 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 3px 0;
}

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

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

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

.dl-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: #2a3348;
    color: var(--ink);
    border: 1px solid var(--border2);
    border-radius: var(--rad2);
    font-size: .89rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, border-color .2s;
    text-decoration: none;
}

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

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

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

/* ===== SHARE BAR ===== */
.share-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 3px 0;
    flex-wrap: wrap;
}

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

.share-strip .scopy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: #2a3348;
    color: var(--ink2);
    border: 1px solid var(--border2);
    border-radius: var(--rad2);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .17s, color .17s;
    flex-shrink: 0;
}

.share-strip .scopy:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

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

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

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

    .brand-name { font-size: 1.04rem; }
    .domain-badge .badge-val { font-size: .87rem; }

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

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

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

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

    .search-row form {
        flex-wrap: nowrap;
        gap: 3px;
    }

    .search-row input[type="text"] {
        height: 33px;
        font-size: .77rem;
        padding: 0 6px;
    }

    .search-row button {
        height: 33px;
        padding: 0 6px;
        font-size: .72rem;
    }

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

    .thumb-wrap { aspect-ratio: 600 / 350; }
    .media-caption h5 { font-size: .71rem; }
    .content-block { padding: 8px 8px 7px; }
    .dl-item { padding: 8px 13px; font-size: .83rem; }
}

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

@media (max-width: 380px) {
    .zone-tag { font-size: 10px; }
    .zone-links a { font-size: 12px; }
    .search-row button { padding: 0 4px; font-size: .66rem; }
}
