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

:root {
    --bg: #0d0d14;
    --bg-card: #151520;
    --bg-panel: #1a1a28;
    --bg-hover: #1f1f30;
    --red: #e8001c;
    --red-dk: #c0001a;
    --red-glow: rgba(232,0,28,.18);
    --magenta: #d4006e;
    --accent: #ff2244;
    --gold: #f0a000;
    --txt: #f0f0f8;
    --txt2: #b0b0cc;
    --txt3: #6a6a88;
    --line: rgba(255,255,255,.08);
    --line2: rgba(255,255,255,.14);
    --s1: 0 2px 8px rgba(0,0,0,.45);
    --s2: 0 4px 18px rgba(0,0,0,.55);
    --s3: 0 8px 32px rgba(232,0,28,.22);
    --r: 7px;
    --r2: 4px;
    --r3: 10px;
}

html { font-size: 15px; }

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

a { color: var(--red); text-decoration: none; transition: color .18s; }
a:hover { color: var(--accent); }
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 14px;
}

/* ===== SITE HEADER ===== */
.top-header {
    background: linear-gradient(135deg, #100010 0%, #18001a 50%, #0a0a18 100%);
    border-bottom: 2px solid var(--red);
    padding: 10px 0;
    box-shadow: 0 2px 16px rgba(232,0,28,.3);
}

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

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

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

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

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--red) 0%, var(--magenta) 100%);
    border-radius: 5px;
    padding: 5px 14px;
    box-shadow: 0 2px 10px rgba(232,0,28,.4);
}

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

.domain-badge .db-url {
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    letter-spacing: .3px;
}

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

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

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

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

.zone-tag {
    background: linear-gradient(180deg, #1e0010 0%, #2a0018 100%);
    color: rgba(255,255,255,.75);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid rgba(232,0,28,.3);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
    word-break: break-all;
}

.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: .82rem;
    color: var(--txt2);
    padding: 4px 5px;
    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;
}

.zone-links a:hover {
    background: var(--red-glow);
    color: var(--accent);
    border-color: rgba(232,0,28,.35);
}

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

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

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

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

.search-panel input[type="text"]:focus {
    border-color: var(--red);
    background: var(--bg-hover);
}

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

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

.search-panel button:hover { background: var(--bg-hover); color: var(--txt); }

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

.search-panel button[value="2"] { background: var(--gold); color: #000; border-color: var(--gold); }
.search-panel button[value="2"]:hover { background: #c88000; }

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

.hotword-block h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--txt2);
    margin-bottom: 6px;
}

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

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

.tag-row .tag-item:hover {
    background: var(--red-glow);
    color: var(--accent);
    border-color: rgba(232,0,28,.4);
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r3);
    padding: 12px 12px 10px;
    margin: 4px 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(--red);
    border-radius: 2px;
}

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

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

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

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

.film-grid li {
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-panel);
    transition: box-shadow .2s, transform .2s;
}

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

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

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

.cover-link:hover img { transform: scale(1.06); }

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

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

.film-info h5 a { color: var(--txt2); }
.film-info h5 a:hover { color: var(--red); }

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

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

.page-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(--line2);
    border-radius: var(--r2);
    font-size: .84rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .18s;
}

.page-btns a.pbn:hover {
    background: var(--red-glow);
    border-color: rgba(232,0,28,.4);
    color: var(--accent);
}

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

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

.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.friend-links dd { display: inline; }

.friend-links a {
    display: inline-block;
    font-size: .77rem;
    color: var(--txt3);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--bg-panel);
    text-decoration: none;
    transition: all .18s;
}

.friend-links a:hover { color: var(--red); border-color: rgba(232,0,28,.4); }

.copyright-bar {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--txt3);
    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(--bg-card);
    border: 1px solid var(--line2);
    border-left: 3px solid var(--red);
    border-radius: var(--r);
    box-shadow: var(--s1);
}

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

.detail-meta {
    font-size: .9rem;
    line-height: 1.95;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    box-shadow: var(--s1);
    margin: 4px 0;
    color: var(--txt2);
}

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

.preview-wrap picture,
.preview-wrap 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;
}

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--red) 0%, var(--magenta) 100%);
    color: #fff;
    border: none;
    border-radius: var(--r2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(232,0,28,.35);
}

.act-btn:hover {
    opacity: .85;
    color: #fff;
    transform: translateY(-1px);
}

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

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

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

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

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

.share-bar .share-copy-btn:hover { background: var(--red-dk); }

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .film-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 { font-size: 1.05rem; }
    .domain-badge .db-url { font-size: .9rem; }

    .menu-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 5px;
        align-items: center;
    }

    .zone-links 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-panel form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

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

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

@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-panel button { padding: 0 5px; font-size: .68rem; }
}
