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

:root {
    --bg: #0d1b2a;
    --bg-card: #162032;
    --bg-raised: #1c2d40;
    --bg-surface: #243447;
    --navy: #0d1b2a;
    --navy-mid: #162032;
    --coral: #e8490f;
    --coral-dk: #c83c0a;
    --coral-lt: #ff6633;
    --coral-glow: rgba(232,73,15,0.18);
    --coral-subtle: rgba(232,73,15,0.08);
    --white: #ffffff;
    --txt: #e8edf2;
    --txt2: #a8b8c8;
    --txt3: #5a7080;
    --line: rgba(255,255,255,0.07);
    --line2: rgba(255,255,255,0.12);
    --accent2: #2a9fd6;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.35);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.45);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.55);
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 10px;
}

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

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;
    min-height: 100vh;
}

a { color: var(--coral); text-decoration: none; transition: color .18s; }
a:hover { color: var(--coral-lt); }
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-header {
    background: var(--navy);
    border-bottom: 1px solid var(--line2);
    padding: 10px 0;
}

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

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

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

.site-title-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--coral);
    font-style: normal;
    letter-spacing: -0.5px;
    text-decoration: none;
    border-bottom: none;
    text-shadow: 0 0 20px var(--coral-glow);
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-raised);
    border: 1px solid var(--line2);
    border-radius: 24px;
    padding: 5px 15px;
}

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

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

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

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

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

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

.zone-label {
    background: linear-gradient(135deg, #1a2f48, #0f2035);
    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(--line);
    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(--txt2);
    padding: 3px 5px;
    border-radius: var(--radius-sm);
    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(--coral-glow);
    color: var(--coral-lt);
    border-color: rgba(232,73,15,0.3);
}

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

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

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

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

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

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

.search-section button:hover { background: var(--bg-surface); color: var(--white); }

.search-section button[value="1"] {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
}
.search-section button[value="1"]:hover { background: var(--coral-dk); }

.search-section button[value="2"] {
    background: var(--accent2);
    color: #fff;
    border-color: var(--accent2);
}
.search-section button[value="2"]:hover { background: #1f88be; }

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

.trending-block h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--txt2);
    margin-bottom: 5px;
}

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

.tag-list .tg {
    display: inline-block;
    background: var(--bg-surface);
    color: var(--txt2);
    border: 1px solid var(--line2);
    border-radius: 3px;
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .18s;
}

.tag-list .tg:hover {
    background: var(--coral-subtle);
    color: var(--coral-lt);
    border-color: rgba(232,73,15,0.4);
}

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

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

.block-header::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 36px;
    height: 2px;
    background: var(--coral);
    border-radius: 2px;
}

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

.block-header h3 a { color: var(--white); }
.block-header h3 a:hover { color: var(--coral); }

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

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

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

.movie-grid li:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--line2);
}

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

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

.poster-link:hover img { transform: scale(1.04); }

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

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

.movie-info h5 a { color: var(--txt2); }
.movie-info h5 a:hover { color: var(--coral); }

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

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

.pager-list a.pg-item {
    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(--line2);
    border-radius: var(--radius-sm);
    font-size: .84rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .18s;
}

.pager-list a.pg-item:hover {
    background: var(--coral-subtle);
    border-color: var(--coral);
    color: var(--coral);
}

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

/* ===== FOOTER ===== */
.footer-links-panel {
    background: var(--bg-card);
    border: 1px solid var(--line2);
    border-radius: var(--radius);
    padding: 9px 13px;
    margin: 3px 0;
    box-shadow: var(--shadow-sm);
}

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

.friendly-links dd { display: inline; }

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

.friendly-links a:hover { color: var(--coral); border-color: rgba(232,73,15,0.4); }

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

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

.detail-headline a {
    color: var(--coral);
    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(--line2);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 3px 0;
    color: var(--txt2);
}

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

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

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

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

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

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

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

.share-row .share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--bg-surface);
    color: var(--txt2);
    border: 1px solid var(--line2);
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}

.share-row .share-copy-btn:hover {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
}

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

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

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

    .site-title-text { font-size: 1.08rem; }
    .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 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-section form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

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

    .poster-link { 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-section button { padding: 0 5px; font-size: .68rem; }
}
