:root {
    --rb-bg: #050507;
    --rb-surface: #0e0f13;
    --rb-card: #1a1b21;
    --rb-card-2: #24262d;
    --rb-red: #e10612;
    --rb-red-2: #ff3b47;
    --rb-red-dark: #8b000a;
    --rb-silver: #d9dde5;
    --rb-text: #f5f6f8;
    --rb-muted: #9aa0ab;
    --rb-line: rgba(255, 255, 255, 0.08);
    --rb-header: 64px;
    --rb-side: 244px;
    --rb-radius: 14px;
}

* { box-sizing: border-box; }

html, body.rb {
    margin: 0;
    background: var(--rb-bg);
    color: var(--rb-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.rb {
    background:
        radial-gradient(1200px 500px at 70% -10%, rgba(225, 6, 18, 0.18), transparent 60%),
        
        var(--rb-bg);
    min-height: 100vh;
}

body.rb a { color: inherit; text-decoration: none; }
.rb-muted { color: var(--rb-muted); }
.rb svg { width: 20px; height: 20px; fill: currentColor; }

.rb-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--rb-header);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(23, 24, 29, 0.96), rgba(10, 10, 12, 0.96));
    border-bottom: 1px solid var(--rb-line);
    backdrop-filter: blur(12px);
}

.rb-burger {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--rb-line);
    background: var(--rb-card);
    color: var(--rb-text);
    cursor: pointer;
}

.rb-brand img { height: 34px; width: auto; display: block; }

.rb-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rb-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--rb-card);
    border: 1px solid var(--rb-line);
    cursor: pointer;
    line-height: 1.1;
}
.rb-balance-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rb-muted); }
.rb-balance-value { font-size: 15px; font-weight: 800; }

.rb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--rb-silver);
    background: linear-gradient(160deg, #34363e, #0c0c0f);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.rb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    white-space: nowrap;
}
.rb-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.rb-btn-red {
    background: linear-gradient(180deg, var(--rb-red-2) 0%, var(--rb-red) 45%, #a3000c 100%);
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(225, 6, 18, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.rb-btn-silver {
    background: linear-gradient(180deg, #ffffff 0%, var(--rb-silver) 45%, #9a9ea9 100%);
    color: #0b0b0e !important;
    box-shadow: 0 8px 24px rgba(217, 221, 229, 0.18), inset 0 1px 0 #fff;
}
.rb-btn-ghost {
    background: var(--rb-card);
    border-color: var(--rb-line);
    color: var(--rb-text) !important;
}
.rb-btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.rb-btn-block { width: 100%; height: 48px; }

.rb-side {
    position: fixed;
    top: var(--rb-header);
    bottom: 0;
    left: 0;
    width: var(--rb-side);
    z-index: 55;
    overflow-y: auto;
    padding: 16px 12px 96px;
    background: linear-gradient(180deg, #111216, #08080a);
    border-right: 1px solid var(--rb-line);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
}
body.rb-side-open .rb-side { transform: translateX(0); }
.rb-side-backdrop {
    position: fixed;
    inset: var(--rb-header) 0 0 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
body.rb-side-open .rb-side-backdrop { opacity: 1; pointer-events: auto; }

.rb-side-block { margin-bottom: 18px; }
.rb-side-title {
    margin: 0 8px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rb-muted);
}
.rb-side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #d6d8de;
}
.rb-side-link img { width: 26px; height: 26px; object-fit: contain; }
.rb-side-link:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.rb-side-link.active {
    background: linear-gradient(90deg, rgba(225, 6, 18, 0.28), rgba(225, 6, 18, 0.04));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--rb-red);
}
.rb-side-provider { padding: 7px 12px; font-weight: 500; font-size: 13px; }

.rb-main {
    padding: calc(var(--rb-header) + 16px) 14px 96px;
    max-width: 1440px;
    margin: 0 auto;
}

.rb-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 260px;
    border: 1px solid var(--rb-line);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.rb-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rb-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 5, 7, 0.92) 0%, rgba(5, 5, 7, 0.55) 55%, rgba(5, 5, 7, 0.1) 100%);
}
.rb-hero-copy { position: relative; padding: 28px 22px; max-width: 560px; }
.rb-hero-copy h1 { margin: 10px 0 8px; font-size: 30px; line-height: 1.1; font-weight: 900; }
.rb-hero-copy p { margin: 0 0 18px; color: #cfd2d8; font-size: 15px; }
.rb-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.rb-grad {
    background: linear-gradient(90deg, #ffffff 0%, var(--rb-silver) 40%, var(--rb-red-2) 70%, var(--rb-red) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.rb-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(225, 6, 18, 0.25);
    border: 1px solid rgba(255, 59, 71, 0.45);
    margin: 0;
}

.rb-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0;
}
.rb-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px 10px;
    border-radius: var(--rb-radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 30%, rgba(225, 6, 18, 0.1) 100%),
        linear-gradient(160deg, #2c2e35 0%, #16171c 50%, #0a0a0d 100%);
    border: 1px solid rgba(217, 221, 229, 0.18);
    font-size: 13px;
    font-weight: 800;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.rb-tile img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6)); }
.rb-tile:hover, .rb-tile.active { transform: translateY(-2px); border-color: var(--rb-red); }

.rb-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: var(--rb-header);
    z-index: 20;
    padding: 10px 0;
    background: linear-gradient(180deg, var(--rb-bg) 70%, rgba(5, 5, 7, 0));
}
.rb-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.rb-tabs::-webkit-scrollbar { display: none; }
.rb-tab {
    flex: 0 0 auto;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--rb-card);
    border: 1px solid var(--rb-line);
    font-size: 14px;
    font-weight: 700;
    color: #cfd2d8;
}
.rb-tab.active {
    background: linear-gradient(180deg, var(--rb-red-2), var(--rb-red) 50%, #a3000c);
    border-color: transparent;
    color: #fff;
}
.rb-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--rb-card);
    border: 1px solid var(--rb-line);
    color: var(--rb-muted);
}
.rb-search input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--rb-text);
    font-family: inherit;
    font-size: 15px;
}
.rb-search:focus-within { border-color: var(--rb-red); }

.rb-providers {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: none;
}
.rb-providers::-webkit-scrollbar { display: none; }
.rb-provider {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 10px;
    background: linear-gradient(160deg, #22242b, #121317);
    border: 1px solid var(--rb-line);
    font-size: 13px;
    font-weight: 600;
    color: #d6d8de;
}
.rb-provider.active { border-color: var(--rb-red); color: #fff; }

.rb-section { margin-top: 8px; }
.rb-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 6px 2px 12px;
}
.rb-section-head h2 { margin: 0; font-size: 20px; font-weight: 900; }
.rb-count { font-size: 13px; color: var(--rb-muted); }

.rb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.rb-card { min-width: 0; }
.rb-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--rb-radius);
    overflow: hidden;
    background: linear-gradient(160deg, #2c2e35, #0a0a0d);
    border: 1px solid rgba(217, 221, 229, 0.16);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.rb-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-card-media img.rb-fallback { object-fit: contain; padding: 18%; }
.rb-card-over {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.2s ease;
}
.rb-card:hover .rb-card-media { transform: translateY(-3px); border-color: var(--rb-red); box-shadow: 0 16px 36px rgba(225, 6, 18, 0.25); }
.rb-card:hover .rb-card-over { opacity: 1; }
.rb-play {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--rb-red-2), var(--rb-red) 50%, #a3000c);
    color: #fff;
    box-shadow: 0 8px 24px rgba(225, 6, 18, 0.5);
}
.rb-play svg { width: 26px; height: 26px; }
.rb-card-name {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #e3e5ea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rb-empty {
    padding: 40px 16px;
    text-align: center;
    border-radius: var(--rb-radius);
    background: var(--rb-card);
    border: 1px solid var(--rb-line);
}

.rb-footer {
    margin-top: 40px;
    padding: 24px 8px;
    text-align: center;
    border-top: 1px solid var(--rb-line);
    font-size: 13px;
}
.rb-footer-logo { height: 30px; margin-bottom: 10px; }
.rb-footer p { margin: 4px 0; }

.rb-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(23, 24, 29, 0.98), rgba(8, 8, 10, 0.98));
    border-top: 1px solid var(--rb-line);
    backdrop-filter: blur(12px);
}
.rb-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 0;
    font-size: 11px;
    font-weight: 700;
    color: #b9bdc6;
}
.rb-bottom-item svg { width: 22px; height: 22px; }
.rb-bottom-item:active, .rb-bottom-item:hover { color: #fff; }

.modal .modal-content.rb-modal {
    background: linear-gradient(160deg, #1d1e24 0%, #101115 100%) !important;
    border: 1px solid rgba(217, 221, 229, 0.18) !important;
    border-radius: 20px !important;
    color: var(--rb-text) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(225, 6, 18, 0.15) !important;
}
.rb-modal h2 { margin: 6px 0 4px; font-size: 24px; font-weight: 900; }
.rb-modal-logo { height: 30px; display: block; margin-bottom: 10px; }
.rb-modal .form-group label { color: #cfd2d8; font-size: 13px; font-weight: 600; }
.rb-modal input, .rb-modal select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px !important;
    background: #0b0b0e !important;
    border: 1px solid var(--rb-line) !important;
    color: var(--rb-text) !important;
    font-family: inherit;
    font-size: 15px;
}
.rb-modal input:focus, .rb-modal select:focus { outline: 0; border-color: var(--rb-red) !important; }
.rb-modal .switcher a { color: var(--rb-red-2); font-weight: 700; }
.rb-modal .member-tab {
    border-radius: 999px !important;
    background: var(--rb-card) !important;
    border: 1px solid var(--rb-line) !important;
    color: #cfd2d8 !important;
    font-weight: 700;
}
.rb-modal .member-tab.active {
    background: linear-gradient(180deg, var(--rb-red-2), var(--rb-red) 50%, #a3000c) !important;
    color: #fff !important;
    border-color: transparent !important;
}
.rb-modal .panel-surface {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid var(--rb-line) !important;
    border-radius: 14px !important;
}

@media (min-width: 560px) {
    .rb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .rb-tiles { grid-template-columns: repeat(6, 1fr); }
    .rb-hero { min-height: 300px; }
    .rb-hero-copy { padding: 40px 34px; }
    .rb-hero-copy h1 { font-size: 40px; }
    .rb-toolbar { flex-direction: row; align-items: center; }
    .rb-search { flex: 0 0 300px; margin-left: auto; }
}

@media (min-width: 900px) {
    .rb-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
    .rb-brand img { height: 38px; }
}

@media (min-width: 1100px) {
    .rb-burger, .rb-bottom, .rb-side-backdrop { display: none; }
    .rb-side { transform: none; }
    .rb-main { margin-left: var(--rb-side); padding: calc(var(--rb-header) + 20px) 28px 40px; }
    .rb-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .rb-hero { min-height: 340px; }
    .rb-hero-copy h1 { font-size: 48px; }
}

@media (min-width: 1500px) {
    .rb-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
