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

:root {
    --surface:      #f1f1f5;
    --surface-mid:  #e8e8f0;
    --surface-deep: #dcdce8;
    --card:         #ffffff;
    --card-hover:   #fafafd;
    --purple:       #5741d9;
    --purple-lt:    #6b58e8;
    --purple-dk:    #4530c0;
    --purple-pale:  rgba(87,65,217,.10);
    --purple-ring:  rgba(87,65,217,.28);
    --purple-soft:  rgba(87,65,217,.06);
    --ink:          #111126;
    --ink-mid:      #3c3c58;
    --ink-soft:     #6e6e8a;
    --ink-faint:    #a8a8c0;
    --border:       #e0e0ec;
    --border2:      #d0d0e0;
    --sh1: 0 1px 6px rgba(55,40,140,.06);
    --sh2: 0 4px 16px rgba(55,40,140,.10);
    --sh3: 0 8px 32px rgba(55,40,140,.15);
    --rr:  10px;
    --rr2: 6px;
    --rr3: 14px;
    --pill: 999px;
}

html { font-size: 15px; }

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

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

/* ===== OUTER CONTAINER ===== */
.viewport {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    box-shadow: var(--sh1);
}

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

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

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

.logo-name {
    font-size: 1.40rem;
    font-weight: 900;
    color: var(--purple);
    font-style: normal;
    letter-spacing: -.4px;
    text-decoration: none;
    border-bottom: none;
}

.domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--purple-soft);
    border: 1.5px solid var(--purple-ring);
    border-radius: var(--pill);
    padding: 4px 14px;
}

.domain-pill .dp-note {
    font-size: 0.67rem;
    color: var(--ink-soft);
    white-space: nowrap;
}

.domain-pill .dp-addr {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--purple);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.nav-pane {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--rr);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

.tier-tag {
    background: var(--purple);
    color: rgba(255,255,255,.88);
    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,.12);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .4px;
    flex-shrink: 0;
}

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

.tier-items a {
    font-size: .82rem;
    color: var(--ink-mid);
    padding: 4px 6px;
    border-radius: var(--rr2);
    transition: all .16s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.tier-items a:hover {
    background: var(--purple-pale);
    color: var(--purple);
    border-color: var(--purple-ring);
}

.tier-items a.active {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.find-bar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

.find-bar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--border2);
    border-radius: var(--pill);
    padding: 0 14px;
    font-size: .88rem;
    color: var(--ink);
    background: var(--surface);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.find-bar input[type="text"]:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-ring);
    background: var(--card);
}

.find-bar input[type="text"]::placeholder { color: var(--ink-faint); }

.find-bar button {
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid var(--border2);
    border-radius: var(--pill);
    background: var(--surface);
    color: var(--ink-mid);
    font-size: .80rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s;
    flex-shrink: 0;
}

.find-bar button:hover {
    background: var(--surface-mid);
    color: var(--ink);
}

.find-bar button[value="1"] {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
}
.find-bar button[value="1"]:hover { background: var(--purple-lt); border-color: var(--purple-lt); }

.find-bar button[value="2"] {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.find-bar button[value="2"]:hover { background: var(--ink-mid); border-color: var(--ink-mid); }

/* ===== TRENDING TAGS ===== */
.trending-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--rr);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.trending-box h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: 5px;
}

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

.trend-list .tr {
    display: inline-block;
    background: var(--surface);
    color: var(--ink-mid);
    border: 1px solid var(--border2);
    border-radius: var(--pill);
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .16s;
}

.trend-list .tr:hover {
    background: var(--purple-pale);
    color: var(--purple);
    border-color: var(--purple-ring);
}

/* ===== CONTENT CARD ===== */
.content-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--rr3);
    padding: 13px 13px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.card-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1.5px;
    width: 38px;
    height: 2px;
    background: var(--purple);
    border-radius: 2px;
}

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

.card-head h3 a { color: var(--ink); }
.card-head h3 a:hover { color: var(--purple); }

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

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

.film-row li {
    border-radius: var(--rr);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: box-shadow .2s, transform .2s;
}

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

.film-shot {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--surface-mid);
}

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

.film-shot:hover img { transform: scale(1.05); }

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

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

.film-name h5 a { color: var(--ink-mid); }
.film-name h5 a:hover { color: var(--purple); }

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

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

.pages-inner a.pgi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--card);
    border: 1.5px solid var(--border2);
    border-radius: var(--rr2);
    font-size: .84rem;
    color: var(--ink-mid);
    text-decoration: none;
    transition: all .16s;
}

.pages-inner a.pgi:hover {
    background: var(--purple-pale);
    border-color: var(--purple-ring);
    color: var(--purple);
}

.pages-inner a.pgi-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--purple);
    border: 1.5px solid var(--purple);
    border-radius: var(--rr2);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.links-footer {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--rr);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.links-dl dd { display: inline; }

.links-dl a {
    display: inline-block;
    font-size: .77rem;
    color: var(--ink-faint);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    transition: all .16s;
}

.links-dl a:hover { color: var(--purple); border-color: var(--purple-ring); }

.foot-copy {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--ink-faint);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.title-band {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .98rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--purple);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
}

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

.meta-block {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
    margin: 4px 0;
}

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

.preview-shot picture,
.preview-shot img {
    width: 100%;
    height: auto;
    border-radius: var(--rr2);
    display: block;
}

/* ===== DOWNLOAD BUTTONS ===== */
.act-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--purple);
    color: #fff;
    border: none;
    border-radius: var(--pill);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .14s;
    text-decoration: none;
}

.act-btn:hover {
    background: var(--purple-lt);
    color: #fff;
    transform: translateY(-1px);
}

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

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

/* ===== SHARE STRIP ===== */
.share-band {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--rr);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.share-band .sb-lbl  { font-size: .77rem; color: var(--ink-faint); white-space: nowrap; }
.share-band .sb-link { font-size: .79rem; color: var(--ink-soft); flex: 1; min-width: 0; word-break: break-all; }

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

.share-band .sb-copy:hover { background: var(--purple-lt); }

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

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

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

    .logo-name { font-size: 1.08rem; }
    .domain-pill .dp-addr { font-size: .92rem; }

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

    .tier-tag {
        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;
    }

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

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

    .find-bar form { flex-wrap: nowrap; gap: 4px; }

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

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

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

    .film-shot { aspect-ratio: 600 / 350; }
    .film-name h5 { font-size: .72rem; }
    .content-card { padding: 9px 9px 7px; }
    .act-btn { padding: 9px 16px; font-size: .84rem; }
}

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

@media (max-width: 380px) {
    .tier-tag { font-size: 10px; }
    .tier-items a { font-size: 12px; }
    .find-bar button { padding: 0 5px; font-size: .68rem; }
}
