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

:root {
    --bg: #ffffff;
    --bg-soft: #f5f4fb;
    --bg-muted: #ede9f8;
    --purple: #7b2ff7;
    --purple-dk: #5e1fd4;
    --purple-mid: #9b59f5;
    --purple-light: #c49ef9;
    --pink: #e040a0;
    --pink-dk: #c0307a;
    --grad: linear-gradient(135deg, #7b2ff7 0%, #c040b0 60%, #e040a0 100%);
    --grad-soft: linear-gradient(135deg, #f3edff 0%, #fce8f5 100%);
    --accent: #7b2ff7;
    --accent-dk: #5e1fd4;
    --accent-bg: #f0e8ff;
    --txt: #1a1428;
    --txt2: #4a3d6e;
    --txt3: #9988bb;
    --line: #e2dbf5;
    --line2: #cfc6ef;
    --s1: 0 1px 5px rgba(123,47,247,.08);
    --s2: 0 3px 14px rgba(123,47,247,.13);
    --s3: 0 6px 28px rgba(123,47,247,.18);
    --r: 10px;
    --r2: 6px;
    --r3: 14px;
}

html { font-size: 15px; }

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

a { color: var(--purple); text-decoration: none; transition: color .18s; }
a:hover { color: var(--purple-dk); }
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: var(--grad);
    padding: 10px 0;
    box-shadow: 0 2px 12px rgba(123,47,247,.22);
}

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

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

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

.brand-site-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.3px;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0,0,0,.18);
}

.brand-domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 24px;
    padding: 4px 16px;
    backdrop-filter: blur(4px);
}

.brand-domain-tag .tag-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
}

.brand-domain-tag .tag-domain {
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,.12);
}

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

/* ===== CATEGORY NAV ===== */
.category-nav-wrap {
    background: var(--bg);
    border: 1.5px solid var(--line);
    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; }

.cat-zone-name {
    background: var(--grad);
    color: rgba(255,255,255,.9);
    font-size: .7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 3px;
    width: 64px;
    min-width: 64px;
    border-right: 1px solid rgba(255,255,255,.15);
    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(--txt2);
    padding: 3px 4px;
    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-area a:hover {
    background: var(--accent-bg);
    color: var(--purple);
    border-color: var(--purple-light);
}

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

/* ===== SEARCH BLOCK ===== */
.search-section {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--s1);
}

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

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

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

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

.search-section button:hover { background: var(--purple-dk); }

.search-section button[value="1"] {
    background: var(--grad);
    background-color: var(--purple);
}
.search-section button[value="1"]:hover { background: var(--purple-dk); }

.search-section button[value="2"] {
    background: var(--pink);
}
.search-section button[value="2"]:hover { background: var(--pink-dk); }

/* ===== HOT TAGS ===== */
.hot-tags-block {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 8px 13px;
    margin: 4px 0;
    box-shadow: var(--s1);
}

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

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

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

.tag-group .tag-item:hover {
    background: var(--accent-bg);
    color: var(--purple);
    border-color: var(--purple-light);
}

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

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

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

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

.content-block-hd h3 a { color: var(--txt); }
.content-block-hd h3 a:hover { color: var(--purple); }

.content-block-hd 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(--line);
    background: var(--bg-soft);
    transition: box-shadow .2s, transform .2s;
}

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

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

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

.movie-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(--txt);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

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

.page-btn-row a.pn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg);
    border: 1.5px solid var(--line2);
    border-radius: var(--r2);
    font-size: .84rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .18s;
}

.page-btn-row a.pn-btn:hover {
    background: var(--accent-bg);
    border-color: var(--purple);
    color: var(--purple);
}

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

/* ===== FOOTER ===== */
.footer-links-wrap {
    background: var(--bg);
    border: 1.5px solid var(--line);
    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-soft);
    text-decoration: none;
    transition: all .18s;
}

.friend-links a:hover { color: var(--purple); border-color: var(--purple-light); }

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

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

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

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

.capture-grid {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.capture-grid picture,
.capture-grid 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 24px;
    background: var(--grad);
    background-color: var(--purple);
    color: #fff;
    border: none;
    border-radius: var(--r2);
    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);
}

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

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

/* ===== SHARE BAR ===== */
.share-row {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--grad-soft);
    border: 1.5px solid var(--line);
    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: var(--grad);
    background-color: var(--purple);
    color: #fff;
    border: none;
    border-radius: var(--r2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .18s;
    flex-shrink: 0;
}

.share-row .share-copy-btn:hover { opacity: .85; }

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

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

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

    .brand-site-name { font-size: 1.08rem; }
    .brand-domain-tag .tag-domain { font-size: .9rem; }

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

    .cat-zone-name {
        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 4px;
        align-items: center;
    }

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

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

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

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

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

    .movie-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) {
    .cat-zone-name { font-size: 10px; }
    .cat-links-area a { font-size: 13px; }
}

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