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

:root {
    --bg: #ffffff;
    --bg-soft: #f8f6ff;
    --bg-card: #ffffff;
    --bg-muted: #f0ecff;
    --grad-a: #e8397d;
    --grad-b: #a855f7;
    --grad-c: #6366f1;
    --grad-d: #3b82f6;
    --primary: #a855f7;
    --primary-dk: #9333ea;
    --primary-bg: rgba(168,85,247,.10);
    --rose: #e8397d;
    --txt: #1a1033;
    --txt2: #4a4068;
    --txt3: #9c8fc0;
    --line: #ede9f9;
    --line2: #ddd5f5;
    --sh1: 0 1px 6px rgba(99,66,180,.08);
    --sh2: 0 3px 16px rgba(99,66,180,.13);
    --sh3: 0 8px 28px rgba(99,66,180,.18);
    --rad: 10px;
    --rad2: 6px;
    --rad3: 14px;
}

html { font-size: 15px; }

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

a { color: var(--primary); text-decoration: none; transition: color .18s; }
a:hover { color: var(--primary-dk); }
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-hd {
    background: #fff;
    border-bottom: 1px solid var(--line2);
    padding: 8px 0;
    box-shadow: var(--sh1);
}

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

.hd-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

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

.hd-sitename {
    font-size: 1.36rem;
    font-weight: 900;
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
    background: linear-gradient(90deg, var(--grad-a) 0%, var(--grad-b) 55%, var(--grad-c) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--grad-b) 0%, var(--grad-c) 100%);
    border-radius: 24px;
    padding: 4px 16px;
}

.domain-tag .dt-lbl {
    font-size: 0.68rem;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
}

.domain-tag .dt-val {
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.nav-board {
    background: var(--bg-card);
    border: 1.5px solid var(--line2);
    border-radius: var(--rad);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

.nav-zone-name {
    background: linear-gradient(180deg, var(--grad-b) 0%, var(--grad-c) 100%);
    color: rgba(255,255,255,.92);
    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,.15);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .4px;
    flex-shrink: 0;
}

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

.nav-items-zone a {
    font-size: .82rem;
    color: var(--txt2);
    padding: 4px 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;
}

.nav-items-zone a:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: rgba(168,85,247,.25);
}

.nav-items-zone a.active {
    background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

/* ===== SEARCH BAR ===== */
.search-box {
    background: var(--bg-card);
    border: 1.5px solid var(--line2);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

.search-box input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168,85,247,.12);
    background: var(--bg-card);
}

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

.search-box button {
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid var(--line2);
    border-radius: 20px;
    background: var(--bg-soft);
    color: var(--txt2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s;
    flex-shrink: 0;
}

.search-box button:hover { background: var(--bg-muted); color: var(--primary); }

.search-box button[value="1"] {
    background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%);
    color: #fff;
    border-color: transparent;
}
.search-box button[value="1"]:hover { opacity: .88; }

.search-box button[value="2"] {
    background: linear-gradient(135deg, var(--grad-b) 0%, var(--grad-c) 100%);
    color: #fff;
    border-color: transparent;
}
.search-box button[value="2"]:hover { opacity: .88; }

/* ===== HOT TAGS ===== */
.hot-tags {
    background: var(--bg-card);
    border: 1.5px solid var(--line2);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

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

.hot-tag-list .htl:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: rgba(168,85,247,.35);
}

/* ===== CONTENT SECTION ===== */
.mod-sect {
    background: var(--bg-card);
    border: 1.5px solid var(--line2);
    border-radius: var(--rad3);
    padding: 13px 13px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.mod-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1.5px;
    width: 42px;
    height: 2.5px;
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
    border-radius: 3px;
}

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

.mod-head h3 a { color: var(--txt); }
.mod-head h3 a:hover { color: var(--primary); }

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

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

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

.movies-grid li:hover {
    box-shadow: var(--sh3);
    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.05); }

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

.movie-caption 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-caption h5 a { color: var(--txt2); }
.movie-caption h5 a:hover { color: var(--primary); }

/* ===== PAGINATION ===== */
.pager-wrap {
    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.pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg-card);
    border: 1.5px solid var(--line2);
    border-radius: var(--rad2);
    font-size: .84rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .18s;
}

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

.pager-btns a.pg-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%);
    border: 1.5px solid transparent;
    border-radius: var(--rad2);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.link-panel {
    background: var(--bg-card);
    border: 1.5px solid var(--line2);
    border-radius: var(--rad);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.link-grid dd { display: inline; }

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

.link-grid a:hover { color: var(--primary); border-color: rgba(168,85,247,.4); }

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

/* ===== DETAIL PAGES ===== */
.dtl-bar {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .98rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--bg-card);
    border: 1.5px solid var(--line2);
    border-left: 4px solid var(--grad-b);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
}

.dtl-bar a {
    font-weight: 700;
    margin-right: 6px;
    background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dtl-body {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--bg-card);
    border: 1.5px solid var(--line2);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 4px 0;
}

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

.img-preview picture,
.img-preview 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: linear-gradient(135deg, var(--grad-b) 0%, var(--grad-c) 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    text-decoration: none;
}

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

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

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

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

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

.url-strip .us-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--grad-b) 0%, var(--grad-c) 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .18s;
    flex-shrink: 0;
}

.url-strip .us-btn:hover { opacity: .86; }

/* ===== VIS HELPERS ===== */
.only-desk { display: block; }
.only-mob { display: none; }

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

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

    .hd-sitename { font-size: 1.06rem; }
    .domain-tag .dt-val { font-size: .9rem; }

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

    .nav-zone-name {
        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;
    }

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

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

    .search-box form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

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

    .cover-link { aspect-ratio: 600 / 350; }
    .movie-caption h5 { font-size: .72rem; }
    .mod-sect { padding: 9px 9px 7px; }
    .action-btn { padding: 9px 16px; font-size: .84rem; }
}

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

@media (max-width: 380px) {
    .nav-zone-name { font-size: 10px; }
    .nav-items-zone a { font-size: 12px; }
    .search-box button { padding: 0 5px; font-size: .68rem; }
}
