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

:root {
    --base: #ffffff;
    --base-soft: #f8f4f5;
    --base-muted: #f0e8ea;
    --wine: #6b1f3a;
    --wine-deep: #4e1229;
    --wine-mid: #8a2a4e;
    --wine-light: #b03060;
    --crimson: #c0253a;
    --crimson-dk: #9e1a2c;
    --crimson-bg: #fdf0f2;
    --gold: #c8921a;
    --ink: #1c0a10;
    --ink2: #4a2535;
    --ink3: #9a7a85;
    --border: #e8d8dc;
    --border2: #d8c0c8;
    --sh1: 0 1px 4px rgba(107,31,58,.08);
    --sh2: 0 3px 12px rgba(107,31,58,.13);
    --sh3: 0 6px 24px rgba(107,31,58,.18);
    --rad: 6px;
    --rad2: 4px;
    --rad3: 10px;
}

html { font-size: 15px; }

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

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

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

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

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

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

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

.site-title-text {
    font-size: 1.38rem;
    font-weight: 900;
    color: #fff;
    font-style: normal;
    letter-spacing: -.3px;
    border-bottom: none;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0,0,0,.25);
}

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

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

.domain-badge .badge-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffd6a0;
    white-space: nowrap;
    letter-spacing: -.2px;
}

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

/* ===== CATEGORY NAV ===== */
.cat-panel {
    background: var(--base);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    overflow: hidden;
    margin: 4px 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: var(--wine);
    color: rgba(255,255,255,.85);
    font-size: .68rem;
    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,.12);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.cat-links-area a {
    font-size: .82rem;
    color: var(--ink2);
    padding: 3px 6px;
    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-area a:hover {
    background: var(--crimson-bg);
    color: var(--crimson);
    border-color: #e8b0ba;
}

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

/* ===== SEARCH ===== */
.search-module {
    background: var(--base);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.search-module input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--border2);
    border-radius: var(--rad2);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--ink);
    background: var(--base-soft);
    outline: none;
    transition: border-color .2s;
}

.search-module input[type="text"]:focus {
    border-color: var(--wine);
    background: var(--base);
}

.search-module button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--rad2);
    background: var(--wine);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s;
    flex-shrink: 0;
}

.search-module button:hover { background: var(--wine-mid); }

.search-module button[value="1"] { background: var(--crimson); }
.search-module button[value="1"]:hover { background: var(--crimson-dk); }

.search-module button[value="2"] { background: var(--gold); }
.search-module button[value="2"]:hover { background: #a07010; }

/* ===== HOT TAGS ===== */
.trending-module {
    background: var(--base);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.trending-module h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--wine);
    margin-bottom: 5px;
}

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

.tag-cloud .tc-item {
    display: inline-block;
    background: var(--base-soft);
    color: var(--ink2);
    border: 1px solid var(--border2);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .18s;
}

.tag-cloud .tc-item:hover {
    background: var(--crimson-bg);
    color: var(--crimson);
    border-color: #e8b0ba;
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--base);
    border: 1.5px solid var(--border);
    border-radius: var(--rad3);
    padding: 13px 13px 10px;
    margin: 5px 0;
    box-shadow: var(--sh1);
}

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

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

.block-header h3 {
    font-size: .98rem;
    font-weight: 800;
    color: var(--wine-deep);
}

.block-header h3 a { color: var(--wine-deep); }
.block-header h3 a:hover { color: var(--crimson); }

.block-header h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--wine-deep);
}

/* ===== 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(--base-soft);
    transition: box-shadow .2s, transform .2s;
}

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

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

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

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

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

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

.media-info h5 a { color: var(--ink); }
.media-info h5 a:hover { color: var(--crimson); }

/* ===== PAGINATION ===== */
.pager-bar {
    margin: 14px 0 6px;
    display: flex;
    justify-content: center;
}

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

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

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

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

/* ===== FOOTER LINKS ===== */
.flink-section {
    background: var(--base);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    padding: 9px 13px;
    margin: 5px 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: .77rem;
    color: var(--ink3);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--base-soft);
    text-decoration: none;
    transition: all .18s;
}

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

.copyright-row {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--ink3);
    font-size: .76rem;
}

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

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

.detail-meta {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--base);
    border: 1.5px solid var(--border);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 5px 0;
}

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

.preview-box picture,
.preview-box 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: 10px 22px;
    background: var(--wine);
    color: #fff;
    border: none;
    border-radius: var(--rad2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    text-decoration: none;
}

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

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

.client-tip a { color: var(--wine); font-weight: 600; }
.client-tip a:hover { color: var(--crimson); }

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

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

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

.share-strip .strip-btn:hover { background: var(--crimson); }

/* ===== VIS HELPERS ===== */
.only-desktop { display: block; }
.only-mobile { display: none; }

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

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

    .site-title-text { font-size: 1.06rem; }
    .domain-badge .badge-value { font-size: .92rem; }

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

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

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

    /* Search: NO wrap, all in one row */
    .search-module form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

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

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

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

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