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

:root {
    --cream: #f2ede4;
    --cream2: #e8e2d8;
    --cream3: #ddd7cc;
    --white: #ffffff;
    --black: #111111;
    --black2: #222222;
    --black3: #444444;
    --yellow: #f0e040;
    --yellow-dk: #d4c520;
    --yellow-bg: #faf8e0;
    --slate: #2c2c2c;
    --slate2: #3a3a3a;
    --muted: #888888;
    --muted2: #aaaaaa;
    --border: #d8d2c8;
    --border2: #c8c2b8;
    --shadow1: 0 1px 3px rgba(0,0,0,.06);
    --shadow2: 0 3px 10px rgba(0,0,0,.09);
    --shadow3: 0 6px 22px rgba(0,0,0,.13);
    --rad: 10px;
    --rad2: 6px;
    --rad3: 16px;
}

html { font-size: 15px; }

body {
    background: var(--cream);
    color: var(--black);
    font-family: 'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Georgia,serif;
    line-height: 1.6;
}

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

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

/* ===== SITE HEADER ===== */
.top-bar {
    background: var(--white);
    border-bottom: 1.5px solid var(--border);
    padding: 10px 0;
    box-shadow: var(--shadow1);
}

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

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

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

.site-title-text {
    font-size: 1.36rem;
    font-weight: 900;
    color: var(--black);
    letter-spacing: -.5px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--yellow);
    border-radius: 24px;
    padding: 5px 16px;
    border: 1.5px solid var(--yellow-dk);
}

.domain-badge .badge-lbl {
    font-size: 0.68rem;
    color: var(--black3);
    white-space: nowrap;
    font-weight: 500;
}

.domain-badge .badge-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--black);
    white-space: nowrap;
    letter-spacing: -.3px;
}

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

/* ===== CATEGORY NAV ===== */
.cat-panel {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--shadow1);
}

.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-name {
    background: var(--black);
    color: rgba(255,255,255,.82);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 64px;
    min-width: 64px;
    border-right: 1px solid rgba(255,255,255,.1);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.cat-links-wrap a {
    font-size: .82rem;
    color: var(--black3);
    padding: 4px 5px;
    border-radius: var(--rad2);
    transition: all .18s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.cat-links-wrap a:hover {
    background: var(--yellow-bg);
    color: var(--black);
    border-color: var(--yellow-dk);
}

.cat-links-wrap a.active {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--yellow-dk);
    font-weight: 800;
}

/* ===== SEARCH ===== */
.search-row {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--shadow1);
}

.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: 38px;
    border: 1.5px solid var(--border2);
    border-radius: var(--rad2);
    padding: 0 13px;
    font-size: .88rem;
    color: var(--black);
    background: var(--cream);
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}

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

.search-row button {
    height: 38px;
    padding: 0 13px;
    border: 1.5px solid var(--black);
    border-radius: var(--rad2);
    background: var(--black);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s;
    flex-shrink: 0;
    font-family: inherit;
}

.search-row button:hover {
    background: var(--slate2);
    border-color: var(--slate2);
}

.search-row button[value="1"] {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--yellow-dk);
}
.search-row button[value="1"]:hover { background: var(--yellow-dk); }

.search-row button[value="2"] {
    background: var(--cream2);
    color: var(--black);
    border-color: var(--border2);
}
.search-row button[value="2"]:hover { background: var(--cream3); }

/* ===== HOT TAGS ===== */
.trending-block {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    padding: 8px 13px;
    margin: 4px 0;
    box-shadow: var(--shadow1);
}

.trending-block h4 {
    font-size: .79rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 6px;
}

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

.tag-list .tag-item {
    display: inline-block;
    background: var(--cream);
    color: var(--black3);
    border: 1px solid var(--border2);
    border-radius: 22px;
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .18s;
}

.tag-list .tag-item:hover {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--yellow-dk);
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--rad3);
    padding: 14px 14px 11px;
    margin: 5px 0;
    box-shadow: var(--shadow1);
}

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

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

.block-header h3 {
    font-size: .98rem;
    font-weight: 900;
    color: var(--black);
}

.block-header h3 a { color: var(--black); }
.block-header h3 a:hover { color: var(--black3); }

.block-header h4 {
    font-size: .95rem;
    font-weight: 900;
    color: var(--black);
}

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

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

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

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

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

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

.media-info {
    padding: 6px 8px 8px;
}

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

.media-info h5 a { color: var(--black); }
.media-info h5 a:hover { color: var(--black3); }

/* ===== PAGINATION ===== */
.page-nav {
    margin: 14px 0 6px;
    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: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--white);
    border: 1.5px solid var(--border2);
    border-radius: var(--rad2);
    font-size: .84rem;
    color: var(--black3);
    text-decoration: none;
    transition: all .18s;
}

.page-btns a.pb:hover {
    background: var(--yellow-bg);
    border-color: var(--yellow-dk);
    color: var(--black);
}

.page-btns a.pb-active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--yellow);
    border: 1.5px solid var(--yellow-dk);
    border-radius: var(--rad2);
    font-size: .84rem;
    font-weight: 800;
    color: var(--black);
    cursor: default;
}

/* ===== FOOTER ===== */
.partner-links-wrap {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    padding: 10px 14px;
    margin: 5px 0;
    box-shadow: var(--shadow1);
}

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

.partner-list dd { display: inline; }

.partner-list a {
    display: inline-block;
    font-size: .77rem;
    color: var(--muted);
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--cream);
    text-decoration: none;
    transition: all .18s;
}

.partner-list a:hover { color: var(--black); border-color: var(--yellow-dk); background: var(--yellow-bg); }

.copyright-bar {
    text-align: center;
    padding: 9px 0 15px;
    color: var(--muted2);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.detail-heading {
    line-height: 1.8;
    text-align: center;
    padding: 14px 16px;
    font-size: .98rem;
    margin: 5px 0;
    word-break: break-all;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-left: 4px solid var(--yellow);
    border-radius: var(--rad);
    box-shadow: var(--shadow1);
}

.detail-heading a {
    color: var(--black);
    font-weight: 800;
    margin-right: 7px;
    background: var(--yellow);
    padding: 1px 8px;
    border-radius: 4px;
}

.detail-meta {
    font-size: .9rem;
    line-height: 2;
    padding: 16px 19px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    box-shadow: var(--shadow1);
    margin: 5px 0;
}

.capture-wrap {
    display: block;
    width: 100%;
    margin-top: 10px;
}

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

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

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 11px 24px;
    background: var(--black);
    color: #fff;
    border: none;
    border-radius: var(--rad2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    text-decoration: none;
    font-family: inherit;
}

.action-btn:hover {
    background: var(--yellow);
    color: var(--black);
    transform: translateY(-1px);
}

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

.client-hint a { color: var(--black); font-weight: 700; }
.client-hint a:hover { color: var(--black3); text-decoration: underline; }

/* ===== SHARE ===== */
.share-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    padding: 9px 14px;
    margin: 5px 0;
    flex-wrap: wrap;
}

.share-strip .strip-lbl { font-size: .77rem; color: var(--muted); white-space: nowrap; }
.share-strip .strip-url { font-size: .79rem; color: var(--black3); flex: 1; min-width: 0; word-break: break-all; }

.share-strip .strip-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 15px;
    background: var(--black);
    color: #fff;
    border: none;
    border-radius: var(--rad2);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    flex-shrink: 0;
    font-family: inherit;
}

.share-strip .strip-btn:hover { background: var(--yellow); color: var(--black); }

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

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

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

    .site-title-text { font-size: 1.06rem; }
    .domain-badge .badge-val { font-size: .9rem; }

    /* Nav rows */
    .cat-row { align-items: stretch; }

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

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

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

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

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

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

    .media-thumb { aspect-ratio: 600 / 350; }
    .media-info h5 { font-size: .72rem; }
    .content-block { padding: 9px 9px 7px; }
    .action-btn { padding: 9px 15px; font-size: .84rem; }
}

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

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