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

:root {
    --bg: #f5f5f5;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-muted: #f0f0f0;
    --bg-hover: #fafafa;
    --primary: #f4511e;
    --primary-dk: #d43a0a;
    --primary-lt: #fff3ef;
    --primary-mid: #ff6b3d;
    --dark: #1a1a1a;
    --dark2: #2d2d2d;
    --txt: #1a1a1a;
    --txt2: #555566;
    --txt3: #999aaa;
    --line: #e8e8ee;
    --line2: #d8d8e4;
    --s1: 0 1px 5px rgba(0,0,0,.07);
    --s2: 0 3px 12px rgba(0,0,0,.1);
    --s3: 0 6px 24px rgba(244,81,30,.18);
    --r: 10px;
    --r2: 6px;
    --r3: 14px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.top-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    box-shadow: var(--s1);
}

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

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

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

.site-name {
    font-size: 1.32rem;
    font-weight: 900;
    color: var(--primary);
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
}

.newest-domain {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-lt);
    border: 1.5px solid rgba(244,81,30,.22);
    border-radius: 24px;
    padding: 4px 15px;
}

.newest-domain .nd-label {
    font-size: 0.68rem;
    color: rgba(244,81,30,.6);
    white-space: nowrap;
}

.newest-domain .nd-url {
    font-size: 1.06rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    letter-spacing: .2px;
}

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

/* ===== CATEGORY NAV ===== */
.nav-board {
    background: var(--bg-white);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--s1);
}

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

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

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

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

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

.cat-items a:hover {
    background: var(--primary-lt);
    color: var(--primary);
    border-color: rgba(244,81,30,.25);
}

.cat-items a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.search-bar {
    background: var(--bg-white);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--s1);
}

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

.search-bar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--line2);
    border-radius: 20px;
    padding: 0 14px;
    font-size: .88rem;
    color: var(--txt);
    background: var(--bg-muted);
    outline: none;
    transition: border-color .18s, background .18s;
}

.search-bar input[type="text"]:focus {
    border-color: var(--primary);
    background: #fff;
}

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

.search-bar button {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 20px;
    background: var(--dark);
    color: #fff;
    font-size: .81rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.search-bar button:hover { background: var(--dark2); }
.search-bar button[value="1"] { background: var(--primary); }
.search-bar button[value="1"]:hover { background: var(--primary-dk); }
.search-bar button[value="2"] { background: #ff9000; color: #fff; }
.search-bar button[value="2"]:hover { background: #dd7800; }

/* ===== HOT TAGS ===== */
.trend-block {
    background: var(--bg-white);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--s1);
}

.trend-block h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

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

.kw-list .kw-item {
    display: inline-block;
    background: var(--bg-muted);
    color: var(--txt2);
    border: 1px solid var(--line2);
    border-radius: 20px;
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .15s;
}

.kw-list .kw-item:hover {
    background: var(--primary-lt);
    color: var(--primary);
    border-color: rgba(244,81,30,.3);
}

/* ===== CONTENT SECTION ===== */
.sec-block {
    background: var(--bg-white);
    border: 1.5px solid var(--line);
    border-radius: var(--r3);
    padding: 13px 13px 10px;
    margin: 4px 0;
    box-shadow: var(--s1);
}

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

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

.sec-hd h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--dark);
}

.sec-hd h3 a { color: var(--dark); }
.sec-hd h3 a:hover { color: var(--primary); }

.sec-hd h4 {
    font-size: .94rem;
    font-weight: 800;
    color: var(--dark);
}

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

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

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

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

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

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

.item-caption {
    padding: 5px 7px 7px;
    background: var(--bg-white);
}

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

.item-caption h5 a { color: var(--txt); }
.item-caption h5 a:hover { color: var(--primary); }

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

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

.pager-wrap a.pn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg-white);
    border: 1.5px solid var(--line2);
    border-radius: var(--r2);
    font-size: .84rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .15s;
}

.pager-wrap a.pn:hover {
    background: var(--primary-lt);
    border-color: var(--primary);
    color: var(--primary);
}

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

/* ===== FOOTER ===== */
.flink-area {
    background: var(--bg-white);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--s1);
}

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

.flink-list dd { display: inline; }

.flink-list a {
    display: inline-block;
    font-size: .77rem;
    color: var(--txt3);
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--bg-muted);
    text-decoration: none;
    transition: all .15s;
}

.flink-list a:hover { color: var(--primary); border-color: rgba(244,81,30,.3); background: var(--primary-lt); }

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

/* ===== DETAIL PAGES ===== */
.dtl-name {
    line-height: 1.8;
    text-align: center;
    padding: 13px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--bg-white);
    border: 1.5px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: var(--r);
    box-shadow: var(--s1);
}

.dtl-name a {
    color: var(--primary);
    font-weight: 700;
    margin-right: 6px;
}

.dtl-body {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--bg-white);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--s1);
    margin: 4px 0;
    color: var(--txt2);
}

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

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

/* ===== DL BUTTONS ===== */
.btn-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.dl-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .15s, box-shadow .18s;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(244,81,30,.3);
}

.dl-action:hover {
    background: var(--primary-dk);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(244,81,30,.4);
}

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

.client-tip a { color: var(--dark); font-weight: 600; }
.client-tip a:hover { color: var(--primary); }

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

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

.share-strip .ss-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(244,81,30,.25);
}

.share-strip .ss-btn:hover { background: var(--primary-dk); }

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

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

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

    .site-name { font-size: 1.05rem; }
    .newest-domain .nd-url { font-size: .9rem; }

    /* Nav mobile: zone label 15%, links 85%, 4 per row = 2 rows */
    .nav-line { align-items: stretch; }

    .zone-label {
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        font-size: 10px;
        padding: 3px 1px;
        letter-spacing: 0;
        line-height: 1.4;
        word-break: break-all;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

    .cat-items a {
        font-size: 12px;
        padding: 4px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    /* Search: same row no wrap */
    .search-bar form {
        flex-wrap: nowrap;
        gap: 3px;
    }

    .search-bar input[type="text"] {
        height: 33px;
        font-size: .78rem;
        padding: 0 8px;
    }

    .search-bar button {
        height: 33px;
        padding: 0 7px;
        font-size: .72rem;
    }

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

    .thumb-link { aspect-ratio: 600 / 350; }
    .item-caption h5 { font-size: .72rem; }
    .sec-block { padding: 9px 9px 7px; }
    .dl-action { padding: 9px 15px; font-size: .84rem; }
}

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

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