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

:root {
    --bg: #ffffff;
    --bg-soft: #f8f8f8;
    --bg-panel: #f2f2f2;
    --bg-card: #ffffff;
    --ink: #1a1a1a;
    --ink2: #333333;
    --ink3: #666666;
    --ink4: #999999;
    --lime: #00cc00;
    --lime-dk: #009900;
    --lime-lt: #e6ffe6;
    --rule: #e0e0e0;
    --rule2: #cccccc;
    --sh1: 0 1px 3px rgba(0,0,0,.08);
    --sh2: 0 2px 10px rgba(0,0,0,.10);
    --sh3: 0 4px 20px rgba(0,0,0,.13);
    --rad: 3px;
    --rad2: 2px;
    --rad3: 4px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.mast-head {
    background: #000;
    border-bottom: 3px solid var(--lime);
    padding: 9px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

.mast-head .page-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

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

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

.mast-sitename {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--lime);
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
    text-transform: none;
}

.mast-domain-strip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--rad2);
    padding: 4px 11px;
}

.mast-domain-strip .mds-tag {
    font-size: .68rem;
    color: rgba(255,255,255,.45);
    white-space: nowrap;
}

.mast-domain-strip .mds-url {
    font-size: 1.06rem;
    font-weight: 800;
    color: var(--lime);
    white-space: nowrap;
}

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

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

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

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

.nav-section-tag {
    background: #000;
    color: rgba(255,255,255,.7);
    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 rgba(255,255,255,.08);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.nav-link-group a {
    font-size: .82rem;
    color: var(--ink2);
    padding: 4px 5px;
    border-radius: var(--rad2);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.nav-link-group a:hover {
    background: var(--lime-lt);
    color: var(--lime-dk);
    border-color: #b3ffb3;
}

.nav-link-group a.active {
    background: var(--lime);
    color: #000;
    border-color: var(--lime);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.search-unit {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--rad3);
    padding: 7px 11px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

.search-unit input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 1.5px solid var(--rule2);
    border-radius: var(--rad2);
    padding: 0 10px;
    font-size: .86rem;
    color: var(--ink);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .18s;
}

.search-unit input[type="text"]::placeholder { color: var(--ink4); }
.search-unit input[type="text"]:focus {
    border-color: var(--lime);
    background: #fff;
}

.search-unit button {
    height: 34px;
    padding: 0 11px;
    border: none;
    border-radius: var(--rad2);
    background: var(--ink2);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.search-unit button:hover { background: #000; }

.search-unit button[value="1"] {
    background: var(--lime);
    color: #000;
    font-weight: 700;
}
.search-unit button[value="1"]:hover { background: var(--lime-dk); color: #fff; }

.search-unit button[value="2"] {
    background: #1a1a1a;
    color: #fff;
    font-weight: 700;
    border: 1.5px solid var(--lime);
}
.search-unit button[value="2"]:hover { background: var(--lime); color: #000; }

/* ===== HOT TAGS ===== */
.trending-block {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--rad3);
    padding: 6px 11px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.trending-block h4 {
    font-size: .76rem;
    font-weight: 700;
    color: var(--ink3);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.trending-tags .ttag {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--ink2);
    border: 1px solid var(--rule2);
    border-radius: var(--rad2);
    padding: 2px 9px;
    font-size: .74rem;
    text-decoration: none;
    transition: all .15s;
}

.trending-tags .ttag:hover {
    background: var(--lime-lt);
    color: var(--lime-dk);
    border-color: #99ee99;
}

/* ===== CONTENT SECTION ===== */
.editorial-sect {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--rad3);
    padding: 11px 11px 9px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.editorial-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--lime);
    position: relative;
}

.editorial-hd h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.1px;
}

.editorial-hd h3 a { color: var(--ink); }
.editorial-hd h3 a:hover { color: var(--lime-dk); }

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

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

.media-cards li {
    border-radius: var(--rad);
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--bg-soft);
    transition: box-shadow .2s, border-color .2s;
}

.media-cards li:hover {
    box-shadow: var(--sh3);
    border-color: var(--lime);
}

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

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

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

.thumb-info {
    padding: 4px 6px 6px;
    border-top: 2px solid transparent;
    transition: border-color .2s;
}

.media-cards li:hover .thumb-info { border-top-color: var(--lime); }

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

.thumb-info h5 a { color: var(--ink2); }
.thumb-info h5 a:hover { color: var(--lime-dk); }

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

.pages-row {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.pages-row a.pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--bg-card);
    border: 1.5px solid var(--rule2);
    border-radius: var(--rad2);
    font-size: .82rem;
    color: var(--ink2);
    text-decoration: none;
    transition: all .15s;
}

.pages-row a.pg:hover {
    background: var(--lime-lt);
    border-color: var(--lime);
    color: var(--lime-dk);
}

.pages-row a.pg-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--lime);
    border: 1.5px solid var(--lime);
    border-radius: var(--rad2);
    font-size: .82rem;
    font-weight: 700;
    color: #000;
    cursor: default;
}

/* ===== FOOTER ===== */
.flink-panel {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.flink-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.flink-items dd { display: inline; }

.flink-items a {
    display: inline-block;
    font-size: .75rem;
    color: var(--ink4);
    padding: 2px 8px;
    border-radius: var(--rad2);
    border: 1px solid var(--rule);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .15s;
}

.flink-items a:hover { color: var(--lime-dk); border-color: var(--lime); }

.foot-copy {
    text-align: center;
    padding: 7px 0 13px;
    color: var(--ink4);
    font-size: .74rem;
}

/* ===== DETAIL PAGES ===== */
.item-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 11px 14px;
    font-size: .96rem;
    margin: 3px 0;
    word-break: break-all;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--lime);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    color: var(--ink);
}

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

.item-spec-box {
    font-size: .88rem;
    line-height: 2;
    padding: 13px 16px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 3px 0;
    color: var(--ink2);
}

.screen-preview {
    display: block;
    width: 100%;
    margin-top: 9px;
}

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

/* ===== DL BUTTONS ===== */
.get-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 11px 0;
}

.get-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 20px;
    background: #000;
    color: var(--lime);
    border: 2px solid var(--lime);
    border-radius: var(--rad2);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, color .18s, transform .15s;
    text-decoration: none;
    letter-spacing: .2px;
}

.get-btn:hover {
    background: var(--lime);
    color: #000;
    transform: translateY(-1px);
}

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

.client-note a { color: var(--ink3); font-weight: 600; }
.client-note a:hover { color: var(--lime-dk); }

/* ===== SHARE ===== */
.share-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--rule);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 3px 0;
    flex-wrap: wrap;
}

.share-strip .ss-label { font-size: .74rem; color: var(--ink4); white-space: nowrap; }
.share-strip .ss-link { font-size: .77rem; color: var(--ink3); flex: 1; min-width: 0; word-break: break-all; }

.share-strip .ss-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #000;
    color: var(--lime);
    border: 1.5px solid var(--lime);
    border-radius: var(--rad2);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.share-strip .ss-btn:hover { background: var(--lime); color: #000; }

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

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

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

    .mast-sitename { font-size: 1.06rem; }
    .mast-domain-strip .mds-url { font-size: .9rem; }

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

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

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

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

    /* Search: NO wrap, all in one row */
    .search-unit form {
        flex-wrap: nowrap;
        gap: 3px;
    }

    .search-unit input[type="text"] {
        height: 32px;
        font-size: .77rem;
        padding: 0 6px;
    }

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

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

    .thumb-link { aspect-ratio: 600 / 350; }
    .thumb-info h5 { font-size: .7rem; }
    .editorial-sect { padding: 8px 8px 6px; }
    .get-btn { padding: 8px 13px; font-size: .82rem; }
}

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

@media (max-width: 380px) {
    .nav-section-tag { font-size: 10px; }
    .nav-link-group a { font-size: 12px; }
    .search-unit button { padding: 0 4px; font-size: .66rem; }
}
