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

:root {
    --bg: #0d0f14;
    --bg-soft: #13161e;
    --bg-card: #181c26;
    --bg-hover: #1e2333;
    --accent: #e8b84b;
    --accent-dk: #c99a2e;
    --accent-glow: rgba(232,184,75,.18);
    --accent-dim: rgba(232,184,75,.08);
    --cyan: #3ab8d4;
    --cyan-dk: #2a9ab5;
    --red: #e8490f;
    --txt: #e8eaf0;
    --txt2: #9ba3b8;
    --txt3: #565e78;
    --border: #232840;
    --border2: #2d3350;
    --shadow1: 0 2px 8px rgba(0,0,0,.45);
    --shadow2: 0 4px 20px rgba(0,0,0,.6);
    --shadow3: 0 8px 32px rgba(0,0,0,.75);
    --glow: 0 0 18px rgba(232,184,75,.22);
    --radius: 6px;
    --radius2: 4px;
    --radius3: 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(--accent-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-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

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

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

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

.site-title {
    font-size: 1.28rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: .5px;
    border-bottom: none;
    text-decoration: none;
    font-style: normal;
    text-shadow: var(--glow);
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(58,184,212,.1);
    border: 1px solid rgba(58,184,212,.3);
    border-radius: 4px;
    padding: 4px 12px;
}

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

.domain-badge .badge-url {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cyan);
    white-space: nowrap;
    letter-spacing: .3px;
}

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

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

.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-tag {
    background: linear-gradient(135deg, #1a2035 0%, #0d1525 100%);
    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;
    border-right: 1px solid var(--border);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.cat-links-wrap a {
    font-size: .82rem;
    color: var(--txt2);
    padding: 3px 5px;
    border-radius: var(--radius2);
    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-wrap a:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(232,184,75,.25);
}

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

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

.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(--border2);
    border-radius: var(--radius2);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--txt);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

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

.search-wrap input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-wrap button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--radius2);
    background: var(--bg-hover);
    color: var(--txt2);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s;
    flex-shrink: 0;
    border: 1px solid var(--border2);
}

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

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

.search-wrap button[value="2"] { background: var(--cyan); color: #0d0f14; border-color: var(--cyan); font-weight: 700; }
.search-wrap button[value="2"]:hover { background: var(--cyan-dk); border-color: var(--cyan-dk); }

/* ===== HOT TAGS ===== */
.hot-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--shadow1);
}

.hot-wrap h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--txt2);
    margin-bottom: 5px;
    letter-spacing: .3px;
}

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

.tag-cloud .tag-item {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt2);
    border: 1px solid var(--border2);
    border-radius: 3px;
    padding: 2px 9px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .18s;
}

.tag-cloud .tag-item:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(232,184,75,.3);
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius3);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--shadow1);
}

.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::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 36px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: var(--glow);
}

.block-header h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--txt);
    letter-spacing: .3px;
}

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

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

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

.media-grid li {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.media-grid li:hover {
    box-shadow: var(--shadow2);
    transform: translateY(-2px);
    border-color: var(--border2);
}

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

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

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

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

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

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

/* ===== PAGINATION ===== */
.pager-nav {
    margin: 12px 0 5px;
    display: flex;
    justify-content: center;
}

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

.pager-btns a.pbn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 32px;
    padding: 0 9px;
    background: var(--bg-card);
    border: 1px solid var(--border2);
    border-radius: var(--radius2);
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .18s;
}

.pager-btns a.pbn:hover {
    background: var(--accent-dim);
    border-color: rgba(232,184,75,.3);
    color: var(--accent);
}

.pager-btns a.pbn-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 32px;
    padding: 0 9px;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius2);
    font-size: .83rem;
    font-weight: 700;
    color: #0d0f14;
    cursor: default;
}

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

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

.friend-links dd { display: inline; }

.friend-links a {
    display: inline-block;
    font-size: .76rem;
    color: var(--txt3);
    padding: 2px 9px;
    border-radius: 3px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .18s;
}

.friend-links a:hover { color: var(--accent); border-color: rgba(232,184,75,.3); }

.copy-bar {
    text-align: center;
    padding: 8px 0 12px;
    color: var(--txt3);
    font-size: .74rem;
}

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

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

.detail-meta {
    font-size: .9rem;
    line-height: 2;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow1);
    margin: 4px 0;
    color: var(--txt2);
}

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

.preview-frame picture,
.preview-frame img {
    width: 100%;
    height: auto;
    border-radius: var(--radius2);
    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 20px;
    background: var(--bg-hover);
    color: var(--txt);
    border: 1px solid var(--border2);
    border-radius: var(--radius2);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--accent);
    color: #0d0f14;
    border-color: var(--accent);
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

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

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

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

.share-strip .strip-label { font-size: .76rem; color: var(--txt3); white-space: nowrap; }
.share-strip .strip-url { font-size: .78rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.share-strip .strip-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: var(--bg-hover);
    color: var(--txt);
    border: 1px solid var(--border2);
    border-radius: var(--radius2);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    flex-shrink: 0;
}

.share-strip .strip-btn:hover { background: var(--accent); color: #0d0f14; border-color: var(--accent); }

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

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

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

    .site-title { font-size: 1.04rem; }
    .domain-badge .badge-url { font-size: .9rem; }

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

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

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

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

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

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

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

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

    .media-cover { aspect-ratio: 600 / 350; }
    .media-info h5 { font-size: .71rem; }
    .content-block { padding: 9px 9px 7px; }
    .action-btn { padding: 9px 13px; font-size: .83rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .cat-zone-tag { font-size: 10px; }
    .cat-links-wrap a { font-size: 13px; }
}

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