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

:root {
    --bg: #1c1c1e;
    --bg-soft: #242426;
    --bg-card: #2a2a2d;
    --bg-muted: #313135;
    --fire1: #ff6d00;
    --fire2: #ffab00;
    --fire3: #ff3d00;
    --accent: #ff6d00;
    --accent-dk: #e05a00;
    --accent-lt: rgba(255,109,0,.12);
    --gold: #ffab00;
    --txt: #f0f0f2;
    --txt2: #b0b0b8;
    --txt3: #6a6a78;
    --line: #38383c;
    --line2: #444448;
    --s1: 0 1px 5px rgba(0,0,0,.35);
    --s2: 0 3px 14px rgba(0,0,0,.45);
    --s3: 0 6px 28px rgba(0,0,0,.55);
    --r: 7px;
    --r2: 5px;
    --r3: 10px;
}

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

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

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

/* ===== SITE HEADER ===== */
.top-bar {
    background: #111113;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
    box-shadow: var(--s1);
}

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

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

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

.site-title-txt {
    font-size: 1.28rem;
    font-weight: 800;
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
    background: linear-gradient(90deg, var(--fire1), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-muted);
    border: 1px solid var(--line2);
    border-radius: 6px;
    padding: 4px 13px;
}

.domain-badge .db-tag {
    font-size: 0.68rem;
    color: var(--txt3);
    white-space: nowrap;
}

.domain-badge .db-url {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.cat-panel {
    background: var(--bg-card);
    border: 1px 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: linear-gradient(180deg, #2a2a2d, #222224);
    border-right: 1px solid var(--line2);
    color: var(--txt3);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    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 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-area a:hover {
    background: var(--accent-lt);
    color: var(--accent);
    border-color: rgba(255,109,0,.3);
}

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

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

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

.search-wrap 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;
}

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

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

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

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

.search-wrap button[value="1"] {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.search-wrap button[value="1"]:hover { background: var(--accent-dk); }

.search-wrap button[value="2"] {
    background: var(--gold);
    color: #111;
    border-color: var(--gold);
}
.search-wrap button[value="2"]:hover { background: #e09600; }

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

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

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

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

.tag-strip .tg:hover {
    background: var(--accent-lt);
    color: var(--accent);
    border-color: rgba(255,109,0,.35);
}

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

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

.sect-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--fire1), var(--gold));
    border-radius: 2px;
}

.sect-heading h3 {
    font-size: .96rem;
    font-weight: 800;
    color: var(--txt);
}

.sect-heading h3 a { color: var(--txt); }
.sect-heading h3 a:hover { color: var(--accent); }

.sect-heading h4 {
    font-size: .93rem;
    font-weight: 800;
    color: var(--txt);
}

/* ===== 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(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-muted);
    transition: box-shadow .2s, transform .2s;
}

.film-grid li:hover {
    box-shadow: 0 4px 20px rgba(255,109,0,.18);
    transform: translateY(-2px);
}

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

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

.thumb-link:hover img { transform: scale(1.05); }

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

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

.film-info h5 a { color: var(--txt2); }
.film-info h5 a:hover { color: var(--accent); }

/* ===== 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.pb {
    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;
}

.page-btn-row a.pb:hover {
    background: var(--accent-lt);
    border-color: var(--accent);
    color: var(--accent);
}

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

/* ===== FOOTER ===== */
.footer-links-box {
    background: var(--bg-card);
    border: 1px 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-muted);
    text-decoration: none;
    transition: all .18s;
}

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

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

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

.detail-title a {
    color: var(--accent);
    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(--line);
    border-radius: var(--r);
    box-shadow: var(--s1);
    margin: 5px 0;
    color: var(--txt2);
}

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

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    text-decoration: none;
}

.act-btn:hover {
    background: var(--gold);
    color: #111;
    transform: translateY(-1px);
}

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

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

/* ===== SHARE ===== */
.share-row {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-muted);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 8px 13px;
    margin: 5px 0;
    flex-wrap: wrap;
}

.share-row .sr-label { font-size: .77rem; color: var(--txt3); white-space: nowrap; }
.share-row .sr-link { font-size: .79rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.share-row .sr-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--bg-card);
    color: var(--txt2);
    border: 1px solid var(--line2);
    border-radius: var(--r2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}

.share-row .sr-copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

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

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

    .site-title-txt { font-size: 1.05rem; }
    .domain-badge .db-url { font-size: .88rem; }

    .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: 3px;
        padding: 4px 5px;
        align-items: center;
    }

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

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

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

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

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

    .thumb-link { aspect-ratio: 600 / 350; }
    .film-info h5 { font-size: .72rem; }
    .media-sect { padding: 9px 9px 7px; }
    .act-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-wrap button { padding: 0 5px; font-size: .68rem; }
}
