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

:root {
    --bg: #141519;
    --bg-soft: #1a1c22;
    --bg-muted: #22252e;
    --bg-card: #1e2028;
    --primary: #f47521;
    --primary-dk: #d4641a;
    --primary-bg: rgba(244,117,33,.12);
    --primary-glow: rgba(244,117,33,.25);
    --accent: #ff6b35;
    --accent2: #ffa040;
    --txt: #e8e9ef;
    --txt2: #a0a3b1;
    --txt3: #5c5f72;
    --line: rgba(255,255,255,.08);
    --line2: rgba(255,255,255,.13);
    --s1: 0 2px 8px rgba(0,0,0,.4);
    --s2: 0 4px 16px rgba(0,0,0,.5);
    --s3: 0 8px 32px rgba(0,0,0,.6);
    --r: 6px;
    --r2: 4px;
    --r3: 10px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.site-header {
    background: linear-gradient(135deg, #0d0f14 0%, #181b24 100%);
    border-bottom: 2px solid rgba(244,117,33,.35);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,.6);
}

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

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

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

.brand-title {
    font-size: 1.38rem;
    font-weight: 900;
    color: var(--primary);
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
    text-shadow: 0 0 18px rgba(244,117,33,.4);
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(244,117,33,.15);
    border: 1px solid rgba(244,117,33,.3);
    border-radius: 20px;
    padding: 5px 14px;
    backdrop-filter: blur(4px);
}

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

.domain-badge .badge-domain {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(244,117,33,.4);
}

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

/* ===== CATEGORY NAV ===== */
.cat-nav {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--s1);
}

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

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

.zone-tag {
    background: linear-gradient(135deg, rgba(244,117,33,.2) 0%, rgba(244,117,33,.08) 100%);
    border-right: 1px solid rgba(244,117,33,.2);
    color: rgba(255,255,255,.75);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 64px;
    min-width: 64px;
    text-align: center;
    line-height: 1.3;
    letter-spacing: .4px;
    flex-shrink: 0;
}

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

.cat-links a {
    font-size: .82rem;
    color: var(--txt2);
    padding: 3px 6px;
    border-radius: var(--r2);
    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 a:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: rgba(244,117,33,.3);
}

.cat-links a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* ===== SEARCH ===== */
.search-zone {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--s1);
}

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

.search-zone input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid var(--line2);
    border-radius: var(--r2);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--txt);
    background: var(--bg-muted);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

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

.search-zone input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    background: var(--bg-soft);
}

.search-zone button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--r2);
    background: var(--bg-muted);
    color: var(--txt2);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s;
    flex-shrink: 0;
    border: 1px solid var(--line2);
}

.search-zone button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

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

.search-zone button[value="2"] { background: rgba(255,160,64,.15); color: var(--accent2); border-color: rgba(255,160,64,.3); }
.search-zone button[value="2"]:hover { background: var(--accent2); color: #111; }

/* ===== HOT TAGS ===== */
.hot-zone {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--s1);
}

.hot-zone h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--txt2);
    margin-bottom: 5px;
}

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

.tag-row .tg {
    display: inline-block;
    background: var(--bg-muted);
    color: var(--txt2);
    border: 1px solid var(--line2);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .18s;
}

.tag-row .tg:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: rgba(244,117,33,.3);
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r3);
    padding: 13px 13px 10px;
    margin: 5px 0;
    box-shadow: var(--s1);
}

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

.block-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-glow);
}

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

.block-header h3 a { color: var(--txt); }
.block-header h3 a:hover { color: var(--primary); }

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

/* ===== 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(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-muted);
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.media-grid li:hover {
    box-shadow: var(--s3), 0 0 0 1px rgba(244,117,33,.2);
    transform: translateY(-2px);
    border-color: rgba(244,117,33,.3);
}

.media-cover {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--bg-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(--txt2);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-info h5 a { color: var(--txt2); }
.media-info h5 a:hover { color: var(--primary); }

/* ===== 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(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r2);
    font-size: .84rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .18s;
}

.page-btns a.pb:hover {
    background: var(--primary-bg);
    border-color: rgba(244,117,33,.3);
    color: var(--primary);
}

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

/* ===== FOOTER ===== */
.footer-links {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    padding: 9px 13px;
    margin: 5px 0;
    box-shadow: var(--s1);
}

.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(--txt3);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--bg-muted);
    text-decoration: none;
    transition: all .18s;
}

.flink-list a:hover { color: var(--primary); border-color: rgba(244,117,33,.3); }

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

/* ===== DETAIL PAGES ===== */
.detail-title {
    line-height: 1.8;
    text-align: center;
    padding: 13px 15px;
    font-size: .98rem;
    margin: 5px 0;
    word-break: break-all;
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-left: 3px solid var(--primary);
    border-radius: var(--r);
    box-shadow: var(--s1);
}

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

.detail-meta {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    box-shadow: var(--s1);
    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(--r2);
    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(--primary);
    color: #fff;
    border: none;
    border-radius: var(--r2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    text-decoration: none;
    box-shadow: 0 2px 12px var(--primary-glow);
}

.action-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(244,117,33,.45);
}

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

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

/* ===== SHARE ===== */
.share-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    padding: 8px 13px;
    margin: 5px 0;
    flex-wrap: wrap;
}

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

.share-strip .sh-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--bg-muted);
    color: var(--txt2);
    border: 1px solid var(--line2);
    border-radius: var(--r2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    flex-shrink: 0;
}

.share-strip .sh-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

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

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

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

    .brand-title { font-size: 1.06rem; }
    .domain-badge .badge-domain { font-size: .9rem; }

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

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

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

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

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

    /* Film grid: 2 cols */
    .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 a { font-size: 13px; }
}

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