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

:root {
    --bg-root: #0d0f14;
    --bg-card: #161922;
    --bg-panel: #1c2030;
    --bg-hover: #242840;
    --primary: #e8350a;
    --primary-lt: #ff5a30;
    --primary-dim: rgba(232,53,10,.13);
    --accent: #f0a500;
    --accent-dim: rgba(240,165,0,.13);
    --teal: #00c9a7;
    --teal-dim: rgba(0,201,167,.1);
    --txt-main: #e8eaf0;
    --txt-sub: #8e93a8;
    --txt-muted: #555b72;
    --border: rgba(255,255,255,.07);
    --border-active: rgba(232,53,10,.45);
    --glow: 0 0 18px rgba(232,53,10,.22);
    --glow-sm: 0 0 8px rgba(232,53,10,.15);
    --sh1: 0 2px 8px rgba(0,0,0,.35);
    --sh2: 0 4px 18px rgba(0,0,0,.45);
    --sh3: 0 8px 32px rgba(0,0,0,.55);
    --rad: 7px;
    --rad-sm: 4px;
    --rad-lg: 12px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.site-head {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

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

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

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

.brand-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary-lt);
    letter-spacing: -.3px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    background: linear-gradient(90deg, var(--primary-lt), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a1f30, #222840);
    border: 1px solid rgba(232,53,10,.3);
    border-radius: 24px;
    padding: 4px 14px 4px 10px;
}

.domain-tag .tag-lbl {
    font-size: 0.68rem;
    color: var(--txt-muted);
    white-space: nowrap;
    letter-spacing: .3px;
}

.domain-tag .tag-url {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    letter-spacing: .2px;
}

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

/* ===== CATEGORY NAVIGATION ===== */
.cat-nav-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

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

.cat-zone-name {
    background: linear-gradient(180deg, #1e2438, #161922);
    color: rgba(255,255,255,.6);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 3px;
    width: 64px;
    min-width: 64px;
    border-right: 1px solid var(--border);
    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(--txt-sub);
    padding: 3px 6px;
    border-radius: var(--rad-sm);
    transition: all .17s;
    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(--primary-dim);
    color: var(--primary-lt);
    border-color: rgba(232,53,10,.3);
}

.cat-links-area a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: var(--glow-sm);
}

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

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

.search-zone input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--rad-sm);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--txt-main);
    background: var(--bg-root);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.search-zone input[type="text"]::placeholder { color: var(--txt-muted); }

.search-zone input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(232,53,10,.15);
}

.search-zone button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--rad-sm);
    background: var(--bg-panel);
    color: var(--txt-main);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .17s, color .17s;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.search-zone button:hover { background: var(--bg-hover); color: #fff; }

.search-zone button[value="1"] {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.search-zone button[value="1"]:hover { background: var(--primary-lt); }

.search-zone button[value="2"] {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}
.search-zone button[value="2"]:hover { background: #ffb830; }

/* ===== HOT SEARCH TAGS ===== */
.hot-tags-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.hot-tags-box h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--txt-sub);
    margin-bottom: 5px;
}

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

.tag-cloud .tg {
    display: inline-block;
    background: var(--bg-panel);
    color: var(--txt-sub);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .17s;
}

.tag-cloud .tg:hover {
    background: var(--primary-dim);
    color: var(--primary-lt);
    border-color: rgba(232,53,10,.3);
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--rad-lg);
    padding: 13px 13px 10px;
    margin: 5px 0;
    box-shadow: var(--sh1);
}

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

.block-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 36px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: var(--glow-sm);
}

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

.block-header h3 a { color: var(--txt-main); }
.block-header h3 a:hover { color: var(--primary-lt); }

.block-header h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--txt-main);
}

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

.film-grid li:hover {
    box-shadow: var(--sh3), var(--glow-sm);
    transform: translateY(-2px);
    border-color: rgba(232,53,10,.25);
}

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

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

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

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

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

.film-info h5 a { color: var(--txt-sub); }
.film-info h5 a:hover { color: var(--primary-lt); }

/* ===== 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(--border);
    border-radius: var(--rad-sm);
    font-size: .84rem;
    color: var(--txt-sub);
    text-decoration: none;
    transition: all .17s;
}

.page-btn-row a.pb:hover {
    background: var(--primary-dim);
    border-color: rgba(232,53,10,.3);
    color: var(--primary-lt);
}

.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(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--rad-sm);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
    box-shadow: var(--glow-sm);
}

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

.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(--txt-muted);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    text-decoration: none;
    transition: all .17s;
}

.friend-links a:hover { color: var(--primary-lt); border-color: rgba(232,53,10,.3); }

.copy-bar {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--txt-muted);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.dtl-headline {
    line-height: 1.8;
    text-align: center;
    padding: 13px 15px;
    font-size: .98rem;
    margin: 5px 0;
    word-break: break-all;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
}

.dtl-headline a {
    color: var(--primary-lt);
    font-weight: 700;
    margin-right: 6px;
}

.dtl-meta {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 5px 0;
    color: var(--txt-sub);
}

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

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

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

.dl-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #1c2030, #242840);
    color: var(--txt-main);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--rad-sm);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
    text-decoration: none;
}

.dl-action-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--glow);
}

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

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

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

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

.share-strip .s-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--bg-hover);
    color: var(--txt-main);
    border: 1px solid var(--border);
    border-radius: var(--rad-sm);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .17s, border-color .17s, color .17s;
    flex-shrink: 0;
}

.share-strip .s-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ===== VISIBILITY HELPERS ===== */
.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; }

    .brand-title { font-size: 1.06rem; }
    .domain-tag .tag-url { 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: 13px;
        padding: 4px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    /* Search stays single row on mobile */
    .search-zone form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

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

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