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

:root {
    --white: #ffffff;
    --page-bg: #f4f6f8;
    --panel-bg: #eef1f5;
    --teal: #2e7d9e;
    --teal-dk: #1f5f7a;
    --teal-lt: #3a9bbf;
    --green: #3a7d44;
    --green-lt: #4caf61;
    --green-bg: #eaf4ec;
    --accent: #2e7d9e;
    --accent-dk: #1f5f7a;
    --accent-bg: #e8f4f9;
    --link: #1a6fa8;
    --link-hv: #0d4f7a;
    --heading: #1a3a4a;
    --body-txt: #2c3e50;
    --muted-txt: #5d7a8a;
    --faint-txt: #8fa8b8;
    --border: #d0dde6;
    --border2: #b8ccd8;
    --sh1: 0 1px 3px rgba(30,70,100,.08);
    --sh2: 0 2px 8px rgba(30,70,100,.12);
    --sh3: 0 4px 18px rgba(30,70,100,.16);
    --rad: 6px;
    --rad2: 4px;
    --rad3: 10px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--teal);
    padding: 10px 0;
    box-shadow: var(--sh1);
}

.site-header .main-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;
}

.site-title-text {
    font-size: 1.38rem;
    font-weight: 800;
    color: var(--teal);
    letter-spacing: -.3px;
    text-decoration: none;
    font-style: normal;
    border-bottom: none;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--teal);
    border-radius: 4px;
    padding: 5px 14px;
}

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

.domain-badge .badge-url {
    font-size: 1.08rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

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

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

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

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

.zone-label {
    background: var(--teal);
    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,.15);
    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: 4px 8px;
    gap: 3px;
    flex: 1;
}

.zone-links a {
    font-size: .82rem;
    color: var(--body-txt);
    padding: 3px 5px;
    border-radius: var(--rad2);
    transition: all .18s;
    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(--accent-bg);
    color: var(--teal);
    border-color: #a8d4e8;
}

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

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

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

.search-wrapper input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--border2);
    border-radius: var(--rad2);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--body-txt);
    background: var(--page-bg);
    outline: none;
    transition: border-color .2s;
}

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

.search-wrapper button {
    height: 36px;
    padding: 0 11px;
    border: none;
    border-radius: var(--rad2);
    background: var(--teal);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s;
    flex-shrink: 0;
}

.search-wrapper button:hover { background: var(--teal-dk); }

.search-wrapper button[value="1"] { background: var(--green); }
.search-wrapper button[value="1"]:hover { background: #2d6338; }

.search-wrapper button[value="2"] { background: #5a7fa0; }
.search-wrapper button[value="2"]:hover { background: #3d6280; }

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

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

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

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

.tag-cloud .tag-item:hover {
    background: var(--accent-bg);
    color: var(--teal);
    border-color: #a8d4e8;
}

/* ===== CONTENT BLOCK ===== */
.content-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--rad3);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

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

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

.block-header h3 a { color: var(--heading); }
.block-header h3 a:hover { color: var(--teal); }

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

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

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

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

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

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

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

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

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

.movie-info h5 a { color: var(--body-txt); }
.movie-info h5 a:hover { color: var(--teal); }

/* ===== PAGINATION ===== */
.pager-wrap {
    margin: 12px 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.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--white);
    border: 1.5px solid var(--border2);
    border-radius: var(--rad2);
    font-size: .84rem;
    color: var(--muted-txt);
    text-decoration: none;
    transition: all .18s;
}

.pager-inner a.pager-btn:hover {
    background: var(--accent-bg);
    border-color: var(--teal);
    color: var(--teal);
}

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

/* ===== FOOTER LINKS ===== */
.footer-links-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 9px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.friendlinks dd { display: inline; }

.friendlinks a {
    display: inline-block;
    font-size: .77rem;
    color: var(--faint-txt);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--page-bg);
    text-decoration: none;
    transition: all .18s;
}

.friendlinks a:hover { color: var(--teal); border-color: var(--teal); }

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

/* ===== DETAIL TITLE ===== */
.detail-heading {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .96rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--teal);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
}

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

/* ===== DETAIL INFO ===== */
.detail-meta {
    font-size: .9rem;
    line-height: 2;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 4px 0;
}

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

.capture-grid picture,
.capture-grid img {
    width: 100%;
    height: auto;
    border-radius: var(--rad2);
    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 22px;
    background: var(--teal);
    color: #fff;
    border: none;
    border-radius: var(--rad2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    text-decoration: none;
}

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

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

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

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

.share-row .share-label { font-size: .77rem; color: var(--faint-txt); white-space: nowrap; }
.share-row .share-url-txt { font-size: .79rem; color: var(--muted-txt); 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(--teal);
    color: #fff;
    border: none;
    border-radius: var(--rad2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
    flex-shrink: 0;
}

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

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

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

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

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

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

    .zone-links {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 4px;
        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: single row, no wrap */
    .search-wrapper form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

    .search-wrapper button {
        height: 34px;
        padding: 0 6px;
        font-size: .72rem;
    }

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

    .movie-cover { aspect-ratio: 600 / 350; }
    .movie-info h5 { font-size: .72rem; }
    .content-block { 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-wrapper button { padding: 0 4px; font-size: .66rem; }
}
