/* ===== Design Tokens ===== */
:root {
    --red: #E8001C;
    --red-dark: #B8001A;
    --red-glow: rgba(232,0,28,0.20);
    --bg: #111111;
    --bg-mid: #191919;
    --surface: #1E1E1E;
    --surface-raised: #252525;
    --border: rgba(255,255,255,0.10);
    --border-hover: rgba(232,0,28,0.50);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255,255,255,0.70);
    --text-muted: rgba(255,255,255,0.40);
    --text-link: #FF3344;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 24px;
    --shadow-red: 0 4px 20px rgba(232,0,28,0.25);
    --shadow-card: 0 4px 16px rgba(0,0,0,0.40);
    --max-w: 1200px;
    --gap: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Layout ===== */
.rb-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px;
}

.rb-row { margin: 6px 0; }

/* ===== Site Header ===== */
.rb-header {
    background: rgba(10,10,10,0.96);
    border-bottom: 2px solid var(--red);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rb-header .rb-container {
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 16px;
    flex-wrap: nowrap;
}

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

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

.rb-logo-link:hover { text-decoration: none; }

.rb-site-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--red);
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    line-height: 1;
    letter-spacing: -0.3px;
    text-shadow: 0 0 20px rgba(232,0,28,0.40);
}

.rb-domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-xl);
    padding: 5px 14px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.rb-domain-hint {
    font-size: 0.70rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rb-domain-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--red);
}

/* ===== Banner ===== */
.rb-banner {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.rb-banner img { width: 100%; display: block; }

/* ===== Category Nav ===== */
.rb-nav-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

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

.rb-zone-lbl {
    background: var(--red);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5px;
    min-width: 15%;
    flex-shrink: 0;
    word-break: break-all;
    line-height: 1.3;
}

.rb-zone-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 5px 8px;
    flex: 1;
    gap: 0;
    background: var(--surface);
}

.rb-zone-links a {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 5px 6px;
    border-radius: var(--radius);
    transition: background 0.14s, color 0.14s;
    white-space: nowrap;
    flex: 0 0 25%;
    text-align: center;
    font-weight: 500;
}

.rb-zone-links a:hover {
    background: var(--red-glow);
    color: var(--text-primary);
    text-decoration: none;
}

.rb-zone-links a.active {
    background: var(--red);
    color: var(--text-primary);
    font-weight: 700;
    border-radius: var(--radius);
}

/* ===== Search ===== */
.rb-search-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
}

#rb-search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

#rb-search-form input[type="text"] {
    flex: 1;
    min-width: 140px;
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-xl);
    padding: 8px 16px;
    font-size: 14px;
    background: var(--bg-mid);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.14s, box-shadow 0.14s;
}

#rb-search-form input[type="text"]::placeholder { color: var(--text-muted); }

#rb-search-form input[type="text"]:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
    background: var(--surface-raised);
}

#rb-search-form button {
    border: none;
    border-radius: var(--radius-xl);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.14s, box-shadow 0.14s;
    background: var(--red);
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

#rb-search-form button:hover {
    background: var(--red-dark);
    box-shadow: var(--shadow-red);
}

/* ===== Hot Tags ===== */
.rb-trending {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
}

.rb-trending h4 {
    font-size: 0.80rem;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.rb-tag-list a {
    display: inline-block;
    background: var(--bg-mid);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 4px 13px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.rb-tag-list a:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--text-primary);
    box-shadow: var(--shadow-red);
    text-decoration: none;
}

/* ===== Content Section ===== */
.rb-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}

.rb-sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.rb-sec-head h3,
.rb-sec-head h4 {
    font-size: 1.0rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
}

.rb-sec-head h3::after,
.rb-sec-head h4::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--red);
    border-radius: 2px;
    margin-top: 3px;
}

.rb-sec-head h3 a,
.rb-sec-head h4 a {
    color: var(--text-primary);
    text-decoration: none;
}

.rb-sec-head h3 a:hover,
.rb-sec-head h4 a:hover { color: var(--red); }

.rb-count {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
}

/* ===== Film Grid ===== */
.rb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    list-style: none;
    padding: 0;
    margin: 0;
}

.rb-grid li {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.rb-grid li:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: var(--red);
}

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

.rb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.22s, opacity 0.22s;
    opacity: 0.88;
}

.rb-grid li:hover .rb-thumb img {
    transform: scale(1.06);
    opacity: 1;
}

.rb-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.60), transparent);
    pointer-events: none;
}

.rb-caption {
    padding: 7px 9px 9px;
    background: var(--surface-raised);
}

.rb-caption h5 {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-secondary);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rb-caption h5 a {
    color: var(--text-secondary);
    text-decoration: none;
}

.rb-caption h5 a:hover {
    color: var(--red);
    text-decoration: none;
}

/* ===== Detail Title ===== */
.rb-entry-head {
    background: linear-gradient(135deg, #1A0000 0%, #2E0005 50%, #1A0808 100%);
    border: 1px solid rgba(232,0,28,0.30);
    border-left: 4px solid var(--red);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    line-height: 1.8;
    text-align: center;
    font-size: 17px;
    word-break: break-all;
}

.rb-entry-head .rb-cat-link {
    color: var(--red);
    font-weight: 700;
    margin-right: 8px;
    text-decoration: none;
}

.rb-entry-head b { color: var(--text-primary); }

/* ===== Detail Specs ===== */
.rb-specs {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    font-size: 15px;
    line-height: 2;
    color: var(--text-secondary);
}

/* ===== Capture ===== */
.rb-cap-wrap { margin-top: 14px; }

.rb-cap-wrap picture img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ===== Download Buttons ===== */
.rb-dl-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 0;
}

.rb-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--red);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-xl);
    padding: 10px 26px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.15s, transform 0.10s, box-shadow 0.15s;
    box-shadow: var(--shadow-red);
}

.rb-dl-btn:hover {
    background: var(--red-dark);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(232,0,28,0.40);
}

/* ===== Client hint ===== */
.rb-client-tip {
    text-align: center;
    padding: 8px 0;
}

.rb-client-tip a {
    color: var(--red);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.rb-client-tip a:hover { text-decoration: underline; }

/* ===== Share bar ===== */
.rb-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
}

.rb-share-lbl {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rb-share-url {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
}

.rb-copy-btn {
    background: var(--red);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-xl);
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.14s;
}

.rb-copy-btn:hover { background: var(--red-dark); }

/* ===== Pagination ===== */
.rb-pager {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 14px 0;
}

.rb-pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-xl);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}

.rb-pg:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--text-primary);
    box-shadow: var(--shadow-red);
    text-decoration: none;
}

.rb-pg-cur {
    background: var(--red);
    border-color: var(--red);
    color: var(--text-primary);
    font-weight: 800;
    box-shadow: var(--shadow-red);
}

/* ===== Friend Links ===== */
.rb-flinks {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
}

.rb-flinks h4 {
    font-size: 0.80rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}

.rb-fl-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rb-fl-list dl { display: contents; }
.rb-fl-list dd { display: inline; margin: 0; }

.rb-fl-list a {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    padding: 3px 11px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--bg-mid);
    text-decoration: none;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.rb-fl-list a:hover {
    color: var(--text-primary);
    border-color: var(--red);
    background: var(--red-glow);
    text-decoration: none;
}

/* ===== Footer ===== */
.rb-footer {
    background: #0A0A0A;
    border-top: 2px solid var(--red);
    padding: 16px 0;
    margin-top: 8px;
}

.rb-footer-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* ===== Utility ===== */
.clearfix::after { content: ''; display: table; clear: both; }

/* ===== Responsive ===== */
@media (max-width: 768px) {

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

    .rb-zone-lbl {
        font-size: 10px;
        min-width: 15%;
        padding: 0 3px;
    }

    .rb-zone-links { padding: 3px 4px; }

    .rb-zone-links a {
        font-size: 12px;
        padding: 4px 3px;
        flex: 0 0 25%;
    }

    .rb-entry-head { font-size: 15px; padding: 12px 14px; }

    #rb-search-form input[type="text"] { min-width: 120px; }
    #rb-search-form button { padding: 8px 12px; font-size: 12px; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .rb-zone-links a { font-size: 14px; }
    .rb-zone-lbl { font-size: 10px; }
}

@media (min-width: 769px) {
    .rb-zone-lbl {
        font-size: 13px;
        min-width: auto;
        padding: 0 18px;
    }
    .rb-zone-links { padding: 6px 12px; }
    .rb-zone-links a {
        font-size: 14px;
        flex: 1;
        padding: 6px 4px;
    }
}

@media (max-width: 768px) { .rb-pc { display: none !important; } }
@media (min-width: 769px) { .rb-mb { display: none !important; } }
