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

:root {
    --bg: #ffffff;
    --bg-soft: #f4f6f4;
    --bg-muted: #e8ede8;
    --forest: #1a3a2a;
    --forest-dark: #112618;
    --forest-mid: #245238;
    --lime: #b5e043;
    --lime-dk: #94c020;
    --lime-bg: #f2fadc;
    --emerald: #2d6a4f;
    --txt: #111a14;
    --txt2: #3a4d3e;
    --txt3: #7a9480;
    --bdr: #d8e4da;
    --bdr2: #c4d4c8;
    --sh1: 0 1px 4px rgba(20,50,30,.08);
    --sh2: 0 3px 12px rgba(20,50,30,.12);
    --sh3: 0 6px 24px rgba(20,50,30,.16);
    --rad: 7px;
    --rad2: 4px;
    --rad3: 12px;
}

html { font-size: 15px; }

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

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

/* ===== PAGE WRAPPER ===== */
.main-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

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

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

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

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

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

.domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(181,224,67,.35);
    border-radius: 24px;
    padding: 4px 14px;
}

.domain-tag .tag-hint {
    font-size: 0.68rem;
    color: rgba(255,255,255,.55);
    white-space: nowrap;
}

.domain-tag .tag-url {
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--lime);
    white-space: nowrap;
}

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

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

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

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

.cat-zone-tag {
    background: var(--forest);
    color: rgba(181,224,67,.85);
    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 rgba(255,255,255,.08);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

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

.cat-links-area a:hover {
    background: var(--lime-bg);
    color: var(--forest);
    border-color: #c8e888;
}

.cat-links-area a.active {
    background: var(--lime);
    color: var(--forest-dark);
    border-color: var(--lime);
    font-weight: 700;
}

/* ===== SEARCH BAR ===== */
.search-row {
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

.search-row input[type="text"]:focus {
    border-color: var(--emerald);
    background: var(--bg);
}

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

.search-row button:hover { background: var(--forest-mid); }

.search-row button[value="1"] { background: var(--emerald); }
.search-row button[value="1"]:hover { background: var(--forest-mid); }

.search-row button[value="2"] { background: var(--lime-dk); color: var(--forest-dark); }
.search-row button[value="2"]:hover { background: #7aaa10; color: #fff; }

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

.hot-tags-wrap h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--forest);
    margin-bottom: 5px;
}

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

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

.tag-cloud .tg:hover {
    background: var(--lime-bg);
    color: var(--forest);
    border-color: #b8dd60;
}

/* ===== CONTENT SECTIONS ===== */
.content-block {
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    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: 7px;
    border-bottom: 2px solid var(--bg-muted);
    position: relative;
}

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

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

.block-header h3 a { color: var(--forest); }
.block-header h3 a:hover { color: var(--emerald); }

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

/* ===== 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(--bdr);
    background: var(--bg-soft);
    transition: box-shadow .2s, transform .2s;
}

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

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

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

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

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

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

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

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

.pager-inner a.pg-item:hover {
    background: var(--lime-bg);
    border-color: var(--lime-dk);
    color: var(--forest);
}

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

/* ===== FOOTER ===== */
.foot-links-box {
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rad);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.link-group dd { display: inline; }

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

.link-group a:hover { color: var(--emerald); border-color: var(--emerald); }

.copy-bar {
    text-align: center;
    padding: 7px 0 13px;
    color: var(--txt3);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.detail-title {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .98rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-left: 4px solid var(--lime);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
}

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

.detail-meta {
    font-size: .9rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--bg);
    border: 1.5px solid var(--bdr);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 4px 0;
}

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

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

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

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--forest);
    color: var(--lime);
    border: none;
    border-radius: var(--rad2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    text-decoration: none;
}

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

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

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

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

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

.share-strip .sl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--forest);
    color: var(--lime);
    border: none;
    border-radius: var(--rad2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
    flex-shrink: 0;
}

.share-strip .sl-btn:hover { background: var(--emerald); color: #fff; }

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

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

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

    .site-title-text { font-size: 1.06rem; }
    .domain-tag .tag-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-area {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 5px;
        align-items: center;
    }

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

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

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

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

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

    .cover-link { aspect-ratio: 600 / 350; }
    .movie-info h5 { font-size: .72rem; }
    .content-block { padding: 9px 9px 7px; }
    .act-btn { padding: 9px 14px; font-size: .84rem; }
}

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

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