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

:root {
    --purple: #6b21a8;
    --purple-mid: #7c3aed;
    --purple-light: #ede9fe;
    --teal: #0d9488;
    --teal-dk: #0a7c72;
    --teal-light: #ccfbf1;
    --dark: #0f172a;
    --dark-mid: #1e293b;
    --surface: #ffffff;
    --surface-dim: #f8fafc;
    --surface-muted: #f1f5f9;
    --text-main: #0f172a;
    --text-sub: #334155;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-dk: #cbd5e1;
    --shadow-sm: 0 1px 3px rgba(15,23,42,.07);
    --shadow-md: 0 4px 12px rgba(15,23,42,.10);
    --shadow-lg: 0 8px 24px rgba(15,23,42,.14);
    --radius: 8px;
    --radius-sm: 5px;
    --radius-lg: 12px;
    --radius-xl: 20px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.site-hd {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

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

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

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

.site-title {
    font-size: 1.38rem;
    font-weight: 900;
    color: var(--dark);
    font-style: normal;
    letter-spacing: -.5px;
    text-decoration: none;
    border-bottom: none;
    background: linear-gradient(135deg, var(--purple) 0%, var(--teal) 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(--purple) 0%, var(--teal) 100%);
    border-radius: var(--radius-xl);
    padding: 4px 14px;
}

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

.domain-tag .tag-url {
    font-size: 1.06rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.nav-board {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

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

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

.nav-row-tag {
    background: linear-gradient(180deg, var(--purple) 0%, var(--purple-mid) 100%);
    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: .3px;
    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(--text-sub);
    padding: 4px 5px;
    border-radius: var(--radius-sm);
    transition: all .16s;
    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(--purple-light);
    color: var(--purple);
    border-color: #c4b5fd;
}

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

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

.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: 1.5px solid var(--border-dk);
    border-radius: var(--radius-xl);
    padding: 0 14px;
    font-size: .88rem;
    color: var(--text-main);
    background: var(--surface-dim);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.search-panel input[type="text"]:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(13,148,136,.12);
    background: var(--surface);
}

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

.search-panel button:hover { opacity: .82; }

.search-panel button[value="1"] {
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-mid) 100%);
}

.search-panel button[value="2"] {
    background: linear-gradient(135deg, var(--teal) 0%, #0891b2 100%);
}

/* ===== HOT TAGS ===== */
.hot-zone {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.hot-zone h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 5px;
}

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

.kw-list .kw-pill {
    display: inline-block;
    background: var(--surface-dim);
    color: var(--text-sub);
    border: 1px solid var(--border-dk);
    border-radius: var(--radius-xl);
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .16s;
}

.kw-list .kw-pill:hover {
    background: var(--purple-light);
    color: var(--purple);
    border-color: #c4b5fd;
}

/* ===== CONTENT BLOCK ===== */
.content-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

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

.block-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--teal) 100%);
    border-radius: 2px;
}

.block-head h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--dark);
}

.block-head h3 a { color: var(--dark); }
.block-head h3 a:hover { color: var(--purple); }

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

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

.film-grid li {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-dim);
    transition: box-shadow .2s, transform .2s;
    min-width: 0;
}

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

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

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

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

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

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

.film-desc h5 a { color: var(--text-main); }
.film-desc h5 a:hover { color: var(--teal); }

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

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

.page-row a.p-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--surface);
    border: 1.5px solid var(--border-dk);
    border-radius: var(--radius-sm);
    font-size: .84rem;
    color: var(--text-sub);
    text-decoration: none;
    transition: all .16s;
}

.page-row a.p-btn:hover {
    background: var(--purple-light);
    border-color: var(--purple);
    color: var(--purple);
}

.page-row a.p-btn-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--teal) 100%);
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

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

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

.flink-list dd { display: inline; }

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

.flink-list a:hover { color: var(--teal); border-color: var(--teal); }

.cr-line {
    text-align: center;
    padding: 8px 0 13px;
    color: var(--text-muted);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.detail-hd {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--purple);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

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

.detail-body {
    font-size: .9rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 4px 0;
}

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

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

/* ===== ACTION BUTTONS ===== */
.btn-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 11px 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--teal) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .18s, transform .15s;
    text-decoration: none;
}

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

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

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

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

.share-strip .s-lbl { font-size: .77rem; color: var(--text-muted); white-space: nowrap; }
.share-strip .s-url { font-size: .79rem; color: var(--text-sub); flex: 1; min-width: 0; word-break: break-all; }

.share-strip .s-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--teal) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .16s;
    flex-shrink: 0;
}

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

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

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

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

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

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

    .nav-row-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;
    }

    .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: 12px;
        padding: 5px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

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

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

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

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

    .film-cover { aspect-ratio: 600 / 350; }
    .film-desc 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) {
    .nav-row-tag { font-size: 10px; }
    .nav-items-zone a { font-size: 13px; }
}

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