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

:root {
    /* Deep navy - primary brand */
    --nv:           #1a2d5a;
    --nv-dk:        #111e3d;
    --nv-mid:       #243870;
    --nv-lt:        #2e4a8a;
    /* Bright blue - CTA accent */
    --bl:           #2b7de9;
    --bl-dk:        #1e65c8;
    --bl-lt:        #4d94f0;
    --bl-bg:        rgba(43,125,233,.08);
    --bl-bdr:       rgba(43,125,233,.25);
    /* Page surfaces */
    --pg-bg:        #f7f9fc;
    --surface:      #ffffff;
    --surface-off:  #f3f6fb;
    --surface-mute: #eaeff7;
    /* Text */
    --txt:          #1a2d5a;
    --txt2:         #374878;
    --txt3:         #6878a8;
    --txt4:         #a8b4cc;
    /* Borders */
    --line:         #dde3ef;
    --line2:        #c8d0e4;
    --line-nv:      rgba(26,45,90,.15);
    /* Shadows */
    --shd-xs:       0 1px 3px rgba(26,45,90,.07);
    --shd-sm:       0 2px 10px rgba(26,45,90,.10);
    --shd-md:       0 5px 20px rgba(26,45,90,.14);
    --shd-bl:       0 4px 14px rgba(43,125,233,.28);
    /* Radii */
    --r:            6px;
    --rsm:          4px;
    --rlg:          10px;
}

html { font-size: 15px; }

body {
    background: var(--pg-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(--bl); text-decoration: none; transition: color .17s; }
a:hover { color: var(--bl-dk); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.bg-cf::after { content: ''; display: table; clear: both; }

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

/* ===== SITE HEADER ===== */
.bg-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0;
    box-shadow: var(--shd-xs);
}

.bg-header .bg-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    height: 52px;
}

.bg-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-right: 18px;
    border-right: 1px solid var(--line);
    height: 100%;
}

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

.bg-sitename {
    font-size: 1.32rem;
    font-weight: 800;
    color: var(--nv);
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
}

.bg-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bl-bg);
    border: 1px solid var(--bl-bdr);
    border-radius: var(--r);
    padding: 4px 12px;
    margin-left: 12px;
}

.bg-domain-badge .bdb-lbl {
    font-size: 0.65rem;
    color: var(--txt3);
    white-space: nowrap;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.bg-domain-badge .bdb-url {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--bl);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.bg-nav-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--shd-xs);
}

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

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

.bg-zone-lbl {
    background: var(--nv);
    color: rgba(255,255,255,.85);
    font-size: .66rem;
    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;
}

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

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

.bg-cat-lks a:hover {
    background: var(--bl-bg);
    color: var(--bl);
    border-color: var(--bl-bdr);
}

.bg-cat-lks a.active {
    background: var(--bl);
    color: #fff;
    border-color: var(--bl-dk);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.bg-search {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--shd-xs);
}

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

.bg-search input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--line2);
    border-radius: var(--rsm);
    padding: 0 11px;
    font-size: .87rem;
    color: var(--txt);
    background: var(--surface-off);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

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

.bg-search input[type="text"]:focus {
    border-color: var(--bl);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(43,125,233,.10);
}

.bg-search button {
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid var(--line2);
    border-radius: var(--rsm);
    background: var(--surface);
    color: var(--txt2);
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .17s;
    flex-shrink: 0;
}

.bg-search button:hover {
    border-color: var(--bl);
    color: var(--bl);
    background: var(--bl-bg);
}

.bg-search button[value="1"] {
    background: var(--bl);
    color: #fff;
    border-color: var(--bl-dk);
    font-weight: 700;
    box-shadow: var(--shd-bl);
}

.bg-search button[value="1"]:hover {
    background: var(--bl-dk);
    box-shadow: 0 4px 16px rgba(43,125,233,.38);
}

.bg-search button[value="2"] {
    background: var(--surface);
    color: var(--nv);
    border-color: var(--nv);
    font-weight: 600;
}

.bg-search button[value="2"]:hover {
    background: var(--nv);
    color: #fff;
}

/* ===== HOT TAGS ===== */
.bg-hotbox {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--shd-xs);
}

.bg-hotbox h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--nv);
    margin-bottom: 5px;
}

.bg-taglist {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bg-taglist .bg-tag {
    display: inline-block;
    background: var(--surface-off);
    color: var(--txt2);
    border: 1px solid var(--line);
    border-radius: var(--rsm);
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .17s;
}

.bg-taglist .bg-tag:hover {
    background: var(--bl-bg);
    color: var(--bl);
    border-color: var(--bl-bdr);
}

/* ===== CONTENT SECTION ===== */
.bg-sect {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--rlg);
    padding: 13px 13px 10px;
    margin: 5px 0;
    box-shadow: var(--shd-xs);
}

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

.bg-sect-hd::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1.5px;
    width: 36px;
    height: 2px;
    background: var(--bl);
    border-radius: 2px;
}

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

.bg-sect-hd h3 a { color: var(--nv); }
.bg-sect-hd h3 a:hover { color: var(--bl); }

.bg-sect-hd h4 {
    font-size: .94rem;
    font-weight: 800;
    color: var(--nv);
}

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

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

.bg-grid li:hover {
    box-shadow: var(--shd-md);
    transform: translateY(-2px);
    border-color: var(--bl-bdr);
}

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

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

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

.bg-cap {
    padding: 5px 7px 7px;
    background: var(--surface);
}

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

.bg-cap h5 a { color: var(--txt2); }
.bg-cap h5 a:hover { color: var(--bl); }

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

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

.bg-pgrow a.bpb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--surface);
    border: 1.5px solid var(--line2);
    border-radius: var(--rsm);
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .17s;
}

.bg-pgrow a.bpb:hover {
    background: var(--bl);
    border-color: var(--bl-dk);
    color: #fff;
    box-shadow: var(--shd-bl);
}

.bg-pgrow a.bpb-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--nv);
    border: 1.5px solid var(--nv-dk);
    border-radius: var(--rsm);
    font-size: .83rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER LINKS ===== */
.bg-flink-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 9px 13px;
    margin: 5px 0;
    box-shadow: var(--shd-xs);
}

.bg-flinks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bg-flinks dd { display: inline; }

.bg-flinks a {
    display: inline-block;
    font-size: .76rem;
    color: var(--txt3);
    padding: 2px 9px;
    border-radius: var(--rsm);
    border: 1px solid var(--line);
    background: var(--surface-off);
    text-decoration: none;
    transition: all .17s;
}

.bg-flinks a:hover {
    color: var(--bl);
    border-color: var(--bl-bdr);
    background: var(--bl-bg);
}

.bg-cr {
    text-align: center;
    padding: 7px 0 13px;
    color: var(--txt4);
    font-size: .75rem;
}

/* ===== DETAIL PAGES ===== */
.bg-dtl-title {
    line-height: 1.8;
    text-align: center;
    padding: 12px 14px;
    font-size: .97rem;
    margin: 5px 0;
    word-break: break-all;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--bl);
    border-radius: var(--r);
    box-shadow: var(--shd-xs);
    color: var(--txt);
}

.bg-dtl-title a {
    color: var(--bl);
    font-weight: 700;
    margin-right: 6px;
}

.bg-dtl-info {
    font-size: .89rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shd-xs);
    margin: 5px 0;
    color: var(--txt2);
}

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

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

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

.bg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--bl);
    color: #fff;
    border: 1.5px solid var(--bl-dk);
    border-radius: var(--r);
    font-size: .89rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .14s, box-shadow .2s;
    text-decoration: none;
    box-shadow: var(--shd-bl);
    letter-spacing: .1px;
}

.bg-btn:hover {
    background: var(--bl-dk);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(43,125,233,.38);
}

.bg-cli-tip {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.bg-cli-tip a { color: var(--nv); font-weight: 600; }
.bg-cli-tip a:hover { color: var(--bl); }

/* ===== SHARE BAR ===== */
.bg-sharebar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-off);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 5px 0;
    flex-wrap: wrap;
}

.bg-sharebar .bsb-lbl { font-size: .76rem; color: var(--txt3); white-space: nowrap; }
.bg-sharebar .bsb-url { font-size: .78rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.bg-sharebar .bsb-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: var(--nv);
    color: #fff;
    border: none;
    border-radius: var(--rsm);
    font-size: .79rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .17s;
    flex-shrink: 0;
}

.bg-sharebar .bsb-btn:hover { background: var(--bl); }

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

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

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

    .bg-sitename { font-size: 1.06rem; }
    .bg-domain-badge .bdb-url { font-size: .9rem; }

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

    .bg-zone-lbl {
        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;
    }

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

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

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

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

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

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

    .bg-thumb { aspect-ratio: 600 / 350; }
    .bg-cap h5 { font-size: .71rem; }
    .bg-sect { padding: 9px 9px 7px; }
    .bg-btn { padding: 9px 14px; font-size: .83rem; }
}

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

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