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

:root {
    --bg-base: #0d0d14;
    --bg-card: #16161f;
    --bg-panel: #1c1c28;
    --bg-hover: #242435;
    --bg-input: #1a1a26;
    --blue-main: #1a6cf0;
    --blue-bright: #2d7fff;
    --blue-pale: rgba(26,108,240,.12);
    --blue-glow: rgba(26,108,240,.25);
    --accent: #00b4d8;
    --gold: #f0a500;
    --red: #e03030;
    --ink: #f0f0f8;
    --ink-soft: #b0b0cc;
    --ink-faint: #686880;
    --divider: rgba(255,255,255,.07);
    --divider2: rgba(255,255,255,.12);
    --sh1: 0 2px 8px rgba(0,0,0,.35);
    --sh2: 0 4px 16px rgba(0,0,0,.45);
    --sh3: 0 8px 28px rgba(0,0,0,.55);
    --radius: 8px;
    --radius-sm: 5px;
    --radius-lg: 10px;
}

html { font-size: 15px; }

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

a { color: var(--blue-bright); text-decoration: none; transition: color .17s; }
a:hover { color: var(--accent); }
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 14px;
}

/* ===== SITE HEADER ===== */
.main-header {
    background: linear-gradient(180deg, #0a0a12 0%, #111120 100%);
    border-bottom: 1px solid var(--divider2);
    padding: 8px 0;
    box-shadow: var(--sh2);
}

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

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

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

.site-name-label {
    font-size: 1.30rem;
    font-weight: 800;
    color: var(--blue-bright);
    letter-spacing: -.3px;
    text-decoration: none;
    font-style: normal;
    border-bottom: none;
    text-shadow: 0 0 18px rgba(45,127,255,.5);
}

.newest-domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(26,108,240,.18);
    border: 1px solid rgba(26,108,240,.35);
    border-radius: 20px;
    padding: 4px 13px;
}

.newest-domain-pill .pill-tag {
    font-size: 0.67rem;
    color: var(--ink-faint);
    white-space: nowrap;
}

.newest-domain-pill .pill-domain {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

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

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

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

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

.nav-zone-label {
    background: linear-gradient(135deg, #0f2a5a 0%, #1a3a78 100%);
    color: rgba(255,255,255,.72);
    font-size: .67rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid var(--divider2);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .4px;
    flex-shrink: 0;
}

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

.nav-links-group a {
    font-size: .81rem;
    color: var(--ink-soft);
    padding: 3px 5px;
    border-radius: var(--radius-sm);
    transition: all .17s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.nav-links-group a:hover {
    background: var(--blue-pale);
    color: var(--blue-bright);
    border-color: rgba(26,108,240,.3);
}

.nav-links-group a.active {
    background: var(--blue-main);
    color: #fff;
    border-color: var(--blue-main);
    font-weight: 700;
}

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

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

.search-section input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid rgba(26,108,240,.3);
    border-radius: var(--radius-sm);
    padding: 0 11px;
    font-size: .87rem;
    color: var(--ink);
    background: var(--bg-input);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

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

.search-section input[type="text"]:focus {
    border-color: var(--blue-main);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.search-section button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.1);
    color: var(--ink-soft);
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .17s;
    flex-shrink: 0;
}

.search-section button:hover { background: rgba(255,255,255,.18); color: var(--ink); }
.search-section button[value="1"] { background: var(--blue-main); color: #fff; }
.search-section button[value="1"]:hover { background: var(--blue-bright); }
.search-section button[value="2"] { background: rgba(240,165,0,.2); color: var(--gold); border: 1px solid rgba(240,165,0,.3); }
.search-section button[value="2"]:hover { background: rgba(240,165,0,.3); }

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

.hot-tags-panel h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: 5px;
}

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

.hot-tag-list .htag {
    display: inline-block;
    background: var(--bg-hover);
    color: var(--ink-soft);
    border: 1px solid var(--divider2);
    border-radius: 16px;
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .17s;
}

.hot-tag-list .htag:hover {
    background: var(--blue-pale);
    color: var(--blue-bright);
    border-color: rgba(26,108,240,.3);
}

/* ===== CONTENT BLOCK ===== */
.content-sect {
    background: var(--bg-card);
    border: 1px solid var(--divider2);
    border-radius: var(--radius-lg);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.sect-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 38px;
    height: 2px;
    background: var(--blue-main);
    border-radius: 2px;
}

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

.sect-head h3 a { color: var(--ink); }
.sect-head h3 a:hover { color: var(--blue-bright); }

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

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

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

.media-items li:hover {
    box-shadow: var(--sh3);
    transform: translateY(-2px);
    border-color: rgba(26,108,240,.35);
}

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

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

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

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

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

.media-caption h5 a { color: var(--ink-soft); }
.media-caption h5 a:hover { color: var(--blue-bright); }

/* ===== PAGINATION ===== */
.pager-row {
    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.pb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg-panel);
    border: 1px solid var(--divider2);
    border-radius: var(--radius-sm);
    font-size: .83rem;
    color: var(--ink-soft);
    text-decoration: none;
    transition: all .17s;
}

.pager-btns a.pb:hover {
    background: var(--blue-pale);
    border-color: rgba(26,108,240,.4);
    color: var(--blue-bright);
}

.pager-btns a.pb-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--blue-main);
    border: 1px solid var(--blue-main);
    border-radius: var(--radius-sm);
    font-size: .83rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.friendlinks-sect {
    background: var(--bg-panel);
    border: 1px solid var(--divider2);
    border-radius: var(--radius);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.flink-list dd { display: inline; }

.flink-list a {
    display: inline-block;
    font-size: .76rem;
    color: var(--ink-faint);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--divider);
    background: var(--bg-hover);
    text-decoration: none;
    transition: all .17s;
}

.flink-list a:hover { color: var(--blue-bright); border-color: rgba(26,108,240,.35); }

.cr-footer {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--ink-faint);
    font-size: .75rem;
}

/* ===== DETAIL PAGES ===== */
.detail-title-bar {
    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(--divider2);
    border-left: 3px solid var(--blue-main);
    border-radius: var(--radius);
    box-shadow: var(--sh1);
}

.detail-title-bar a {
    color: var(--blue-bright);
    font-weight: 700;
    margin-right: 6px;
}

.detail-info-panel {
    font-size: .89rem;
    line-height: 2.0;
    padding: 14px 17px;
    background: var(--bg-card);
    border: 1px solid var(--divider2);
    border-radius: var(--radius);
    box-shadow: var(--sh1);
    margin: 4px 0;
    color: var(--ink-soft);
}

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

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

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

.op-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--blue-main);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .89rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .14s, box-shadow .2s;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(26,108,240,.3);
}

.op-btn:hover {
    background: var(--blue-bright);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26,108,240,.45);
}

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

.client-hint a { color: var(--ink-soft); font-weight: 600; }
.client-hint a:hover { color: var(--blue-bright); }

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

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

.share-row .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: var(--blue-main);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .17s;
    flex-shrink: 0;
}

.share-row .share-btn:hover { background: var(--blue-bright); }

/* ===== VIS HELPERS ===== */
.only-desktop { display: block; }
.only-mobile { display: none; }

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

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

    .site-name-label { font-size: 1.04rem; }
    .newest-domain-pill .pill-domain { font-size: .87rem; }

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

    .nav-zone-label {
        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-links-group {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 5px;
        align-items: center;
    }

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

    /* 搜索栏强制不换行 */
    .search-section form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

    /* 影片列表：移动端2列 */
    .media-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .cover-thumb { aspect-ratio: 600 / 350; }
    .media-caption h5 { font-size: .71rem; }
    .content-sect { padding: 9px 9px 7px; }
    .op-btn { padding: 9px 14px; font-size: .83rem; }
}

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

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