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

:root {
    --white: #ffffff;
    --bg-page: #f2f4f8;
    --bg-card: #ffffff;
    --bg-subtle: #f7f9fc;
    --bg-hover: #eef2fb;
    --blue: #1a6eb5;
    --blue-dk: #135494;
    --blue-lt: #2a85d0;
    --blue-pale: #deeaf8;
    --teal: #0e8a8a;
    --red: #d93025;
    --red-dk: #b8261e;
    --amber: #c97a10;
    --ink: #1c2233;
    --ink2: #3d4560;
    --ink3: #7a82a0;
    --border: #dde3ef;
    --border2: #c8d1e5;
    --shadow-xs: 0 1px 3px rgba(26,54,109,.08);
    --shadow-sm: 0 2px 8px rgba(26,54,109,.10);
    --shadow-md: 0 4px 18px rgba(26,54,109,.13);
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 10px;
}

html { font-size: 15px; scroll-behavior: smooth; }

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

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

/* ===== LAYOUT CONTAINER ===== */
.site-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.site-header {
    background: var(--blue);
    padding: 10px 0;
}

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

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

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

.brand-title {
    font-size: 1.38rem;
    font-weight: 900;
    color: #ffffff;
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 20px;
    padding: 4px 13px;
}

.domain-badge .badge-label {
    font-size: 0.70rem;
    color: rgba(255,255,255,.72);
    white-space: nowrap;
}

.domain-badge .badge-url {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
}

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

/* ===== CATEGORY NAVIGATION ===== */
.category-nav-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--shadow-xs);
}

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

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

.zone-label {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dk) 100%);
    color: rgba(255,255,255,.85);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 64px;
    min-width: 64px;
    border-right: 1px solid rgba(255,255,255,.12);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.zone-links a {
    font-size: .82rem;
    color: var(--ink2);
    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;
}

.zone-links a:hover {
    background: var(--blue-pale);
    color: var(--blue);
    border-color: #b5d0f0;
}

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

/* ===== SEARCH BAR ===== */
.search-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 9px 13px;
    margin: 3px 0;
    box-shadow: var(--shadow-xs);
}

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

.search-wrap input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: 0 11px;
    font-size: .87rem;
    color: var(--ink);
    background: var(--bg-subtle);
    outline: none;
    transition: border-color .2s, background .2s;
}

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

.search-wrap button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--ink2);
    color: #fff;
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s;
    flex-shrink: 0;
}

.search-wrap button:hover { background: var(--ink); }

.search-wrap button[value="1"] { background: var(--blue); }
.search-wrap button[value="1"]:hover { background: var(--blue-dk); }

.search-wrap button[value="2"] { background: var(--teal); }
.search-wrap button[value="2"]:hover { background: #0a6e6e; }

/* ===== HOT TAGS ===== */
.hotword-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 13px;
    margin: 3px 0;
    box-shadow: var(--shadow-xs);
}

.hotword-block h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--blue-dk);
    margin-bottom: 6px;
}

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

.tag-cloud .tag-item {
    display: inline-block;
    background: var(--bg-subtle);
    color: var(--ink2);
    border: 1px solid var(--border2);
    border-radius: 20px;
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .16s;
}

.tag-cloud .tag-item:hover {
    background: var(--blue-pale);
    color: var(--blue);
    border-color: #9fc4e8;
}

/* ===== CONTENT SECTION ===== */
.media-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 14px 11px;
    margin: 4px 0;
    box-shadow: var(--shadow-xs);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--bg-page);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: var(--blue);
    border-radius: 2px;
}

.section-header h3 {
    font-size: 1.0rem;
    font-weight: 800;
    color: var(--ink);
}

.section-header h3 a { color: var(--ink); }
.section-header h3 a:hover { color: var(--blue); }

.section-header h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--ink);
}

/* ===== 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-subtle);
    transition: box-shadow .2s, transform .18s;
}

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

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

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

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

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

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

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

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

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

.pager-inner a.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg-card);
    border: 1.5px solid var(--border2);
    border-radius: var(--radius-sm);
    font-size: .83rem;
    color: var(--ink2);
    text-decoration: none;
    transition: all .16s;
}

.pager-inner a.page-btn:hover {
    background: var(--blue-pale);
    border-color: var(--blue);
    color: var(--blue);
}

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

/* ===== FOOTER LINKS ===== */
.footer-links-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin: 4px 0;
    box-shadow: var(--shadow-xs);
}

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

.friendly-links dd { display: inline; }

.friendly-links a {
    display: inline-block;
    font-size: .76rem;
    color: var(--ink3);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    text-decoration: none;
    transition: all .16s;
}

.friendly-links a:hover { color: var(--blue); border-color: var(--blue-lt); }

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

/* ===== DETAIL PAGE ===== */
.detail-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 13px 16px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

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

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

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

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

/* ===== DOWNLOAD 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 24px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .14s;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--red);
    color: #fff;
    transform: translateY(-1px);
}

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

.client-hint a { color: var(--blue-dk); font-weight: 600; }
.client-hint a:hover { color: var(--red); }

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

.share-row .share-label { font-size: .76rem; color: var(--ink3); white-space: nowrap; }
.share-row .share-url { font-size: .79rem; color: var(--ink2); flex: 1; min-width: 0; word-break: break-all; }

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

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

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

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

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

    .brand-title { font-size: 1.08rem; }
    .domain-badge .badge-url { font-size: .9rem; }

    .zone-label {
        font-size: 10px;
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        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;
    }

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

    .zone-links 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: .72rem;
    }

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

    .media-cover { aspect-ratio: 600 / 350; }
    .media-info h5 { font-size: .72rem; }
    .media-section { padding: 9px 9px 7px; }
    .action-btn { padding: 9px 14px; font-size: .84rem; }
}

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

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