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

:root {
    --bg: #ffffff;
    --bg-soft: #f4f4f4;
    --bg-panel: #f9f9f9;
    --bg-card: #ffffff;
    --red: #d0021b;
    --red-dk: #a80016;
    --red-lt: rgba(208,2,27,.08);
    --red-mid: #e8001e;
    --orange: #ff6600;
    --ink: #222222;
    --ink2: #444444;
    --ink3: #777777;
    --ink4: #aaaaaa;
    --rule: #e8e8e8;
    --rule2: #d8d8d8;
    --sh1: 0 1px 4px rgba(0,0,0,.07);
    --sh2: 0 3px 12px rgba(0,0,0,.10);
    --sh3: 0 6px 22px rgba(0,0,0,.13);
    --rv: 3px;
    --rv2: 2px;
    --rv3: 5px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.sp-header {
    background: var(--red);
    border-bottom: 2px solid var(--red-dk);
    padding: 9px 0;
    box-shadow: 0 2px 8px rgba(208,2,27,.25);
}

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

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

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

.sp-sitename {
    font-size: 1.32rem;
    font-weight: 900;
    color: #fff;
    font-style: normal;
    letter-spacing: -.2px;
    text-decoration: none;
    border-bottom: none;
}

.sp-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: var(--rv2);
    padding: 4px 12px;
}

.sp-domain-badge .sdb-hint {
    font-size: .67rem;
    color: rgba(255,255,255,.6);
    white-space: nowrap;
}

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

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

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

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

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

.sp-zone-tag {
    background: var(--red);
    color: rgba(255,255,255,.88);
    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(0,0,0,.1);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

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

.sp-cat-row a:hover {
    background: var(--red-lt);
    color: var(--red);
    border-color: rgba(208,2,27,.2);
}

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

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

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

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

.sp-search-box input[type="text"]::placeholder { color: var(--ink4); }
.sp-search-box input[type="text"]:focus {
    border-color: var(--red);
    background: var(--bg);
}

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

.sp-search-box button:hover { background: var(--ink); }

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

.sp-search-box button[value="2"] {
    background: var(--orange);
    color: #fff;
    font-weight: 700;
}
.sp-search-box button[value="2"]:hover { background: #e05500; }

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

.sp-hotbox h4 {
    font-size: .75rem;
    font-weight: 700;
    color: var(--ink3);
    margin-bottom: 5px;
    letter-spacing: .3px;
}

.sp-hotbox h4 strong { color: var(--red); }

.sp-hottags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sp-hottags .shtag {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--ink2);
    border: 1px solid var(--rule2);
    border-radius: var(--rv2);
    padding: 2px 9px;
    font-size: .73rem;
    text-decoration: none;
    transition: all .15s;
}

.sp-hottags .shtag:hover {
    background: var(--red-lt);
    color: var(--red);
    border-color: rgba(208,2,27,.25);
}

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

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

.sp-section-head h3 {
    font-size: .96rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.1px;
}

.sp-section-head h3 a { color: var(--ink); }
.sp-section-head h3 a:hover { color: var(--red); }

.sp-section-head h4 {
    font-size: .94rem;
    font-weight: 800;
    color: var(--ink);
}

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

.sp-grid li {
    border-radius: var(--rv);
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--bg-panel);
    transition: box-shadow .2s, border-color .2s;
}

.sp-grid li:hover {
    box-shadow: var(--sh3);
    border-color: var(--red);
}

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

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

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

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

.sp-grid li:hover .sp-postercap { border-top-color: var(--red); }

.sp-postercap h5 {
    font-size: .75rem;
    font-weight: 500;
    color: var(--ink3);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sp-postercap h5 a { color: var(--ink3); }
.sp-postercap h5 a:hover { color: var(--red); }

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

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

.sp-pagelist a.spg {
    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(--rv2);
    font-size: .81rem;
    color: var(--ink3);
    text-decoration: none;
    transition: all .15s;
}

.sp-pagelist a.spg:hover {
    background: var(--red-lt);
    border-color: var(--red);
    color: var(--red);
}

.sp-pagelist a.spg-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--red);
    border: 1.5px solid var(--red);
    border-radius: var(--rv2);
    font-size: .81rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

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

.sp-flinks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sp-flinks dd { display: inline; }

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

.sp-flinks a:hover { color: var(--red); border-color: rgba(208,2,27,.3); }

.sp-copybar {
    text-align: center;
    padding: 7px 0 13px;
    color: var(--ink4);
    font-size: .73rem;
}

/* ===== DETAIL PAGES ===== */
.sp-item-ttl {
    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(--red);
    border-radius: var(--rv);
    box-shadow: var(--sh1);
    color: var(--ink);
}

.sp-item-ttl a {
    color: var(--red);
    font-weight: 700;
    margin-right: 6px;
}

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

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

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

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

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

.sp-btn:hover {
    background: var(--red-dk);
    color: #fff;
    transform: translateY(-1px);
}

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

.sp-clinote a { color: var(--ink3); font-weight: 600; }
.sp-clinote a:hover { color: var(--red); }

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

.sp-sharebar .shb-lbl { font-size: .73rem; color: var(--ink4); white-space: nowrap; }
.sp-sharebar .shb-url { font-size: .76rem; color: var(--ink3); flex: 1; min-width: 0; word-break: break-all; }

.sp-sharebar .shb-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: var(--rv2);
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.sp-sharebar .shb-copy:hover { background: var(--red-dk); }

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

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

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

    .sp-sitename { font-size: 1.06rem; }
    .sp-domain-badge .sdb-url { font-size: .9rem; }

    .sp-nav-strip { align-items: stretch; }

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

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

    .sp-cat-row 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 */
    .sp-search-box form {
        flex-wrap: nowrap;
        gap: 3px;
    }

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

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

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

    .sp-poster { aspect-ratio: 600 / 350; }
    .sp-postercap h5 { font-size: .7rem; }
    .sp-section { padding: 8px 8px 6px; }
    .sp-btn { padding: 8px 14px; font-size: .82rem; }
}

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

@media (max-width: 380px) {
    .sp-zone-tag { font-size: 10px; }
    .sp-cat-row a { font-size: 12px; }
    .sp-search-box button { padding: 0 4px; font-size: .66rem; }
}
