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

:root {
    --bg: #0f0f1a;
    --bg-soft: #13131f;
    --bg-muted: #1a1a2e;
    --bg-card: #16162a;
    --bg-card2: #1c1c32;
    --purple: #7c3aed;
    --purple-dk: #5b21b6;
    --purple-lt: #a78bfa;
    --pink: #ec4899;
    --pink-dk: #be185d;
    --cyan: #06b6d4;
    --cyan-dk: #0891b2;
    --gold: #f59e0b;
    --txt: #e2e8f0;
    --txt2: #94a3b8;
    --txt3: #475569;
    --line: #1e1e35;
    --line2: #2a2a45;
    --glow1: 0 0 15px rgba(124,58,237,.25);
    --glow2: 0 0 30px rgba(124,58,237,.35);
    --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: 10px;
    --r2: 6px;
    --r3: 16px;
}

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;
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(124,58,237,.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236,72,153,.06) 0%, transparent 50%);
}

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

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

/* ===== SITE HEADER ===== */
.top-header {
    background: linear-gradient(135deg, #0d0d1f 0%, #130d2a 50%, #0d1a2a 100%);
    border-bottom: 1px solid var(--line2);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(124,58,237,.15);
}

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

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

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

.brand-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
    background: linear-gradient(90deg, #a78bfa, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(124,58,237,.18);
    border: 1px solid rgba(167,139,250,.25);
    border-radius: 24px;
    padding: 5px 16px;
}

.domain-tag .dt-label {
    font-size: 0.68rem;
    color: rgba(167,139,250,.65);
    white-space: nowrap;
}

.domain-tag .dt-url {
    font-size: 1.05rem;
    font-weight: 800;
    color: #a78bfa;
    white-space: nowrap;
    letter-spacing: .3px;
}

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

/* ===== CATEGORY NAV ===== */
.category-nav {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    overflow: hidden;
    margin: 5px 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-badge {
    background: linear-gradient(135deg, #1a0a3a, #0d1a35);
    color: rgba(167,139,250,.75);
    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 var(--line2);
    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 8px;
    gap: 3px;
    flex: 1;
}

.cat-links-wrap 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-wrap a:hover {
    background: rgba(124,58,237,.18);
    color: var(--purple-lt);
    border-color: rgba(124,58,237,.35);
}

.cat-links-wrap a.active {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

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

.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: 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-module input[type="text"]::placeholder { color: var(--txt3); }

.search-module input[type="text"]:focus {
    border-color: var(--purple);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.search-module button {
    height: 36px;
    padding: 0 11px;
    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-module button:hover { background: var(--bg-card2); color: var(--txt); }

.search-module button[value="1"] {
    background: linear-gradient(135deg, var(--purple), #5b21b6);
    color: #fff;
    border-color: transparent;
}
.search-module button[value="1"]:hover { background: linear-gradient(135deg, #6d28d9, #4c1d95); }

.search-module button[value="2"] {
    background: linear-gradient(135deg, var(--pink), var(--pink-dk));
    color: #fff;
    border-color: transparent;
}
.search-module button[value="2"]:hover { background: linear-gradient(135deg, #db2777, #9d174d); }

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

.trending-block h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--purple-lt);
    margin-bottom: 6px;
}

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

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

.tag-row .tag-item:hover {
    background: rgba(124,58,237,.18);
    color: var(--purple-lt);
    border-color: rgba(124,58,237,.4);
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r3);
    padding: 13px 13px 11px;
    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(--line2);
    position: relative;
}

.block-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 42px;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    border-radius: 2px;
}

.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(--purple-lt); }

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

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

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

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

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

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

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

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

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

.movie-info h5 a { color: var(--txt2); }
.movie-info h5 a:hover { color: var(--purple-lt); }

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

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

.pager-inner a.pager-btn {
    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;
}

.pager-inner a.pager-btn:hover {
    background: rgba(124,58,237,.15);
    border-color: var(--purple);
    color: var(--purple-lt);
}

.pager-inner a.pager-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: 1px solid transparent;
    border-radius: var(--r2);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.friends-section {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    padding: 9px 13px;
    margin: 5px 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-muted);
    text-decoration: none;
    transition: all .18s;
}

.friend-links a:hover { color: var(--purple-lt); border-color: rgba(124,58,237,.4); }

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

.detail-heading a {
    color: var(--purple-lt);
    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-frame {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.preview-frame picture,
.preview-frame 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: linear-gradient(135deg, var(--purple), #5b21b6);
    color: #fff;
    border: none;
    border-radius: var(--r2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(124,58,237,.35);
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--pink), var(--pink-dk));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(236,72,153,.4);
}

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

.client-hint a { color: var(--purple-lt); font-weight: 600; }
.client-hint a:hover { color: var(--pink); }

/* ===== SHARE ===== */
.share-row {
    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-row .share-label { font-size: .77rem; color: var(--txt3); white-space: nowrap; }
.share-row .share-url { font-size: .79rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.share-row .share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--purple), #5b21b6);
    color: #fff;
    border: none;
    border-radius: var(--r2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    flex-shrink: 0;
}

.share-row .share-copy-btn:hover {
    background: linear-gradient(135deg, var(--pink), var(--pink-dk));
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .movie-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; }

    .brand-title { font-size: 1.05rem; }
    .domain-tag .dt-url { font-size: .9rem; }

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

    .zone-badge {
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        font-size: 10px;
        padding: 4px 2px;
        letter-spacing: 0;
        line-height: 1.5;
        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-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;
    }

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

    .cover-link { aspect-ratio: 600 / 350; }
    .movie-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-badge { font-size: 10px; }
    .cat-links-wrap a { font-size: 13px; }
}

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