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

:root {
    --rb-red: #e8002d;
    --rb-red-dk: #c0001f;
    --rb-red-bg: #fff2f4;
    --rb-dark: #1c1c1e;
    --rb-dark2: #2c2c2e;
    --rb-nav-bg: rgba(30,30,34,.88);
    --rb-blue: #1a3bd4;
    --rb-blue-dk: #1230b0;
    --surface: #ffffff;
    --surface-dim: #f6f6f8;
    --surface-muted: #ececf0;
    --text-main: #111114;
    --text-sub: #3a3a44;
    --text-muted: #9494a2;
    --border: #e0e0e8;
    --border-dk: #d0d0dc;
    --shadow-sm: 0 1px 4px rgba(0,0,0,.07);
    --shadow-md: 0 3px 12px rgba(0,0,0,.10);
    --shadow-lg: 0 7px 24px rgba(0,0,0,.14);
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 10px;
    --radius-pill: 24px;
}

html { font-size: 15px; }

body {
    background: var(--surface-dim);
    color: var(--text-main);
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

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

/* ===== CONTAINER ===== */
.rb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.rb-masthead {
    background: var(--rb-dark);
    padding: 10px 0;
    border-bottom: none;
}

.rb-masthead .rb-container {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

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

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

.rb-sitename {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    font-style: normal;
    letter-spacing: -.5px;
    text-decoration: none;
    border-bottom: none;
}

.rb-sitename .nm-red {
    color: var(--rb-red);
    font-style: normal;
}

.rb-url-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-pill);
    padding: 4px 14px;
}

.rb-url-badge .ub-label {
    font-size: 0.67rem;
    color: rgba(255,255,255,.55);
    white-space: nowrap;
}

.rb-url-badge .ub-domain {
    font-size: 1.07rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.rb-catbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--rb-red);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

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

.rb-catline:last-child { border-bottom: none; }

.rb-cattag {
    background: var(--rb-dark);
    color: rgba(255,255,255,.78);
    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;
}

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

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

.rb-catitems a:hover {
    background: var(--rb-red-bg);
    color: var(--rb-red);
    border-color: #f8b0ba;
}

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

/* ===== SEARCH ===== */
.rb-searchbox {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

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

.rb-searchbox input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--border-dk);
    border-radius: var(--radius-pill);
    padding: 0 14px;
    font-size: .88rem;
    color: var(--text-main);
    background: var(--surface-dim);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.rb-searchbox input[type="text"]:focus {
    border-color: var(--rb-red);
    box-shadow: 0 0 0 3px rgba(232,0,45,.10);
    background: var(--surface);
}

.rb-searchbox button {
    height: 36px;
    padding: 0 13px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--rb-dark);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.rb-searchbox button:hover { background: var(--rb-dark2); }

.rb-searchbox button[value="1"] { background: var(--rb-red); }
.rb-searchbox button[value="1"]:hover { background: var(--rb-red-dk); }

.rb-searchbox button[value="2"] { background: var(--rb-blue); }
.rb-searchbox button[value="2"]:hover { background: var(--rb-blue-dk); }

/* ===== HOT TAGS ===== */
.rb-trending {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.rb-trending h4 {
    font-size: .78rem;
    font-weight: 800;
    color: var(--rb-red);
    margin-bottom: 5px;
    letter-spacing: .2px;
}

.rb-tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.rb-tagcloud .rb-taglnk {
    display: inline-block;
    background: var(--surface-dim);
    color: var(--text-sub);
    border: 1px solid var(--border-dk);
    border-radius: var(--radius-pill);
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .15s;
}

.rb-tagcloud .rb-taglnk:hover {
    background: var(--rb-red-bg);
    color: var(--rb-red);
    border-color: #f8b0ba;
}

/* ===== CONTENT SECTION ===== */
.rb-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

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

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

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

.rb-sect-hd h3 a { color: var(--rb-dark); }
.rb-sect-hd h3 a:hover { color: var(--rb-red); }

.rb-sect-hd h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--rb-dark);
}

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

.rb-vidgrid li {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-dim);
    transition: box-shadow .2s, transform .2s;
    min-width: 0;
}

.rb-vidgrid li:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.rb-vidthumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--surface-muted);
}

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

.rb-vidthumb:hover img { transform: scale(1.05); }

.rb-vidmeta {
    padding: 5px 7px 7px;
    border-top: 2px solid transparent;
    transition: border-color .15s;
}

.rb-vidgrid li:hover .rb-vidmeta { border-top-color: var(--rb-red); }

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

.rb-vidmeta h5 a { color: var(--text-main); }
.rb-vidmeta h5 a:hover { color: var(--rb-red); }

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

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

.rb-pages-row a.rb-pg {
    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(--border-dk);
    border-radius: var(--radius-pill);
    font-size: .84rem;
    color: var(--text-sub);
    text-decoration: none;
    transition: all .15s;
}

.rb-pages-row a.rb-pg:hover {
    background: var(--rb-red-bg);
    border-color: var(--rb-red);
    color: var(--rb-red);
}

.rb-pages-row a.rb-pg-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--rb-red);
    border: 1.5px solid var(--rb-red);
    border-radius: var(--radius-pill);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.rb-foot-lnks {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

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

.rb-flink-set dd { display: inline; }

.rb-flink-set a {
    display: inline-block;
    font-size: .77rem;
    color: var(--text-muted);
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface-dim);
    text-decoration: none;
    transition: all .15s;
}

.rb-flink-set a:hover { color: var(--rb-red); border-color: var(--rb-red); }

.rb-foot-copy {
    text-align: center;
    padding: 8px 0 13px;
    color: var(--text-muted);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.rb-detail-hd {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--rb-red);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.rb-detail-hd a {
    color: var(--rb-red);
    font-weight: 700;
    margin-right: 6px;
}

.rb-detail-body {
    font-size: .9rem;
    line-height: 2;
    padding: 14px 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 4px 0;
}

.rb-imgpreview {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.rb-imgpreview picture,
.rb-imgpreview img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}

/* ===== ACTION BUTTONS ===== */
.rb-actrow {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 11px 0;
}

.rb-actbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--rb-red);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .13s;
    text-decoration: none;
}

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

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

.rb-dltip a { color: var(--rb-dark); font-weight: 600; }
.rb-dltip a:hover { color: var(--rb-red); }

/* ===== SHARE BAR ===== */
.rb-shareline {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.rb-shareline .rsl-lbl { font-size: .77rem; color: var(--text-muted); white-space: nowrap; }
.rb-shareline .rsl-url { font-size: .79rem; color: var(--text-sub); flex: 1; min-width: 0; word-break: break-all; }

.rb-shareline .rsl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--rb-red);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.rb-shareline .rsl-btn:hover { background: var(--rb-red-dk); }

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

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

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

    .rb-sitename { font-size: 1.12rem; }
    .rb-url-badge .ub-domain { font-size: .9rem; }

    .rb-catline { align-items: stretch; }

    .rb-cattag {
        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;
    }

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

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

    .rb-searchbox form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .rb-searchbox input[type="text"] {
        height: 34px;
        font-size: .79rem;
        padding: 0 8px;
    }

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

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

    .rb-vidthumb { aspect-ratio: 600 / 350; }
    .rb-vidmeta h5 { font-size: .72rem; }
    .rb-section { padding: 9px 9px 7px; }
    .rb-actbtn { padding: 9px 14px; font-size: .84rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .rb-cattag { font-size: 10px; }
    .rb-catitems a { font-size: 13px; }
}

@media (max-width: 380px) {
    .rb-cattag { font-size: 10px; }
    .rb-catitems a { font-size: 12px; }
    .rb-searchbox button { padding: 0 5px; font-size: .68rem; }
}
