/* ============================================================
   Roulette2 - pixel-identical WBET table/wheel (dark theme)
   values mirrored from nexusrivo.wo3yulsti.com/roulette2
   ============================================================ */
.r2-root {
    --rb-card-deep: #191939;
    --rb-card-sunken: #12142E;
    --rb-bg: #090C1D;
    --rb-text: #ffffff;
    --rb-text-soft: rgba(191, 191, 191, 0.82);
    --rb-text-faint: rgba(160, 160, 160, 0.55);
    --rb-gold: #01e0a3;
    --rb-gold-deep: #04241b;
    --rb-border: rgba(1, 224, 163, 0.18);
    --rb-button-gradient: linear-gradient(420deg, rgb(0 255 142) 0%, #01e0a3 49%, #00aa6d 49%, #00aa6d 100%);
    --rb-button-box: #3a6d5f 0 -3px 0 0 inset, rgb(47 255 186) 0 2px 0 0 inset;
    background: var(--rb-bg);
    color: var(--rb-text);
    font-family: 'Inter', 'Exo 2', system-ui, sans-serif;
}

.r2-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 0;
}
@media (min-width: 640px) { .r2-wrap { padding: 8px; } }

.r2-title {
    margin: 0 0 12px;
    padding-left: 4px;
    font-size: 19px;
    font-weight: 700;
    color: var(--rb-text);
}

.r2-grid {
    display: grid;
    gap: 12px;
}
@media (min-width: 1024px) {
    .r2-grid { grid-template-columns: 320px minmax(0, 1fr); }
}

/* ---- left panel (BetControls) ---- */
.r2-left {
    order: 2;
    border-radius: 14px;
    background: var(--rb-card-deep);
    padding: 16px;
}
@media (min-width: 1024px) { .r2-left { order: 1; } }
.r2-stack { display: flex; flex-direction: column; gap: 12px; }

.r2-betlabel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-faint);
}
.r2-balance { text-transform: none; letter-spacing: normal; }

.r2-inputrow { display: flex; align-items: stretch; gap: 4px; }
.r2-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--rb-bg);
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rb-text);
    outline: none;
    font-family: inherit;
}
.r2-mini {
    flex-shrink: 0;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--rb-bg);
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--rb-text-soft);
    cursor: pointer;
    transition: filter 0.15s;
    font-family: inherit;
}
.r2-mini:hover { filter: brightness(1.25); }

.r2-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.r2-stat {
    border-radius: 8px;
    background: var(--rb-bg);
    padding: 8px;
}
.r2-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-faint);
    margin-bottom: 2px;
}
.r2-stat-val {
    display: block;
    font-size: 13px;
    font-weight: 900;
    color: var(--rb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.r2-note {
    font-size: 11px;
    line-height: 1.625;
    color: var(--rb-text-faint);
    margin: 0;
}

.r2-resultline { margin: 0; text-align: center; font-size: 13px; font-weight: 900; }
.r2-resultline.r2-win { color: var(--rb-gold); }
.r2-resultline.r2-lose { color: var(--rb-text-faint); }

.r2-goldbtn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: var(--rb-button-gradient);
    box-shadow: var(--rb-button-box);
    color: var(--rb-gold-deep);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.15s, filter 0.15s;
    font-family: inherit;
}
.r2-goldbtn:hover { filter: brightness(1.08); }
.r2-goldbtn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- board (right) ---- */
.r2-right {
    order: 1;
    min-width: 0;
    border-radius: 14px;
    background: var(--rb-card-sunken);
    padding: 12px;
}
@media (min-width: 640px) { .r2-right { padding: 16px; } }
@media (min-width: 1024px) { .r2-right { order: 2; } }

.r2-arena {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    min-height: auto;
}
.r2-arena-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url('/assets/originals/board-bg.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.r2-arena-tint {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(6, 10, 18, 0.5);
}
.r2-arena-inner { position: relative; }
.r2-space {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 12px;
}

.r2-toprow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
@media (min-width: 640px) {
    .r2-toprow { flex-direction: row; align-items: center; justify-content: center; }
}

/* ---- wheel ---- */
.r2-wheelwrap { position: relative; width: 100%; max-width: 620px; }
.r2-wheelclip {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 2.380952380952381;
    container-type: inline-size;
}
.r2-wheel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    transition-property: transform;
    transition-duration: 0ms;
    transition-timing-function: cubic-bezier(0.08, 0.72, 0.12, 1);
    will-change: transform;
}
.r2-wheelring {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle closest-side at 50% 50%, transparent 0 81.3%, #090C1D 81.3% 100%, transparent 100%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.r2-wcell {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    border-radius: 3px;
    color: #fff;
    transition: box-shadow 0.3s;
}
.r2-wcelltxt { font-weight: 900; line-height: 1; }
.r2-wballparent {
    position: absolute;
    inset: 0;
    transition-property: transform;
    transition-duration: 0ms;
    transition-timing-function: cubic-bezier(0.08, 0.72, 0.12, 1);
    will-change: transform;
}
.r2-wball {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #ffffff, #d7dee9 55%, #8d99ab);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    transition: transform 1632ms cubic-bezier(0.4, 0, 0.3, 1);
}
.r2-resultrow {
    margin-top: 12px;
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.r2-resulttile {
    display: grid;
    place-items: center;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
}

/* ---- recentes ---- */
.r2-recentcol { display: flex; flex-direction: row; gap: 6px; }
@media (min-width: 640px) { .r2-recentcol { flex-direction: column; } }
.r2-recentlabel {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-faint);
    white-space: nowrap;
}
.r2-recentlist { display: flex; flex-wrap: wrap; gap: 4px; }
.r2-recentempty { font-size: 11px; color: var(--rb-text-faint); }
.r2-recenttile {
    display: grid;
    place-items: center;
    height: 24px;
    width: 24px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 900;
}
.r2-recenttile.red { background: #bf1235; color: #fff; }
.r2-recenttile.black { background: #191939; color: #eef4fb; }
.r2-recenttile.green { background: #00a862; color: #04231a; }
.r2-recenttile.gold { background: var(--rb-gold); color: #04231a; }

/* ---- undo/clear pills ---- */
.r2-padrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 4px;
}
.r2-pill {
    display: flex;
    height: 36px;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 18px;
    background: rgba(7, 5, 19, 0.8);
    padding: 0 16px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(226, 238, 255, 0.9);
    cursor: pointer;
    transition: filter 0.15s;
    font-family: inherit;
    fill: none;
}
.r2-pill:hover { filter: brightness(1.25); }
.r2-pill:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- table ---- */
.r2-tablewrap { overflow-x: auto; padding-bottom: 4px; }
.r2-table {
    min-width: 620px;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.r2-trow {
    display: grid;
    gap: 4px;
    grid-template-columns: 46px repeat(12, minmax(0, 1fr)) 48px;
}
.r2-cell { position: relative; min-width: 0; }
.r2-cell6 { grid-column: span 6 / span 6; }
.r2-cell4 { grid-column: span 4 / span 4; }
.r2-cell3 { grid-column: span 3 / span 3; }
.r2-cell1 { grid-column: span 1 / span 1; }
.r2-cell.rowspan3 { grid-row: span 3 / span 3; height: 100%; }

.r2-num {
    height: 44px;
    width: 100%;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: filter 0.15s;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}
.r2-num.red { background: #bf1235; color: #fff; }
.r2-num.black { background: #191939; color: #eef4fb; }
.r2-num.green { background: #00a862; color: #04231a; }
.r2-num:hover { filter: brightness(1.25); }
.r2-num.ring { box-shadow: inset 0 0 0 2px var(--rb-gold); }

.r2-out {
    height: 40px;
    width: 100%;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: filter 0.15s;
    font-family: inherit;
}
.r2-out.plain {
    background: var(--rb-bg);
    color: var(--rb-text-soft);
}
.r2-out.red { background: #bf1235; color: #fff; }
.r2-out.black { background: #191939; color: #eef4fb; }
.r2-out:hover { filter: brightness(1.25); }

/* zone edge buttons (split/street/corner/sixline) */
.r2-zbtn {
    position: absolute;
    z-index: 10;
    border: none;
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.15s;
    padding: 0;
}
.r2-zbtn:hover { background: rgba(217, 162, 39, 0.55); }
.r2-zbtn.right { right: -3px; top: 50%; height: 24px; width: 7px; transform: translateY(-50%); }
.r2-zbtn.bottom { bottom: -3px; left: 50%; height: 7px; width: 24px; transform: translateX(-50%); }
.r2-zbtn.corner { bottom: -4px; right: -4px; height: 9px; width: 9px; }
.r2-zbtn.active { background: var(--rb-gold); }
.r2-zbtn.active:hover { background: var(--rb-gold); }

.r2-zpill {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    height: 17px;
    width: 17px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--rb-gold);
    color: var(--rb-gold-deep);
    font-size: 9px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

/* chip overlay (numbers / outside / zero / columns) */
.r2-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    height: 24px;
    width: 24px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.r2-chip-img {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.r2-chip-count {
    position: relative;
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    text-shadow: rgba(0, 0, 0, 0.9) 0 1px 2px;
    line-height: 1;
}

.r2-numbtn:disabled { cursor: not-allowed; }

/* ---- provably fair accordion ---- */
.r2-fair {
    margin-top: 12px;
    border-radius: 14px;
    background: var(--rb-card-deep);
}
.r2-fair-head {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: none;
    background: transparent;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.r2-fair-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rb-text);
}
.r2-fair-title svg { color: var(--rb-gold); }
.r2-fair-chevron { color: var(--rb-text-faint); transition: transform 0.2s; }
.r2-fair-chevron.open { transform: rotate(180deg); }
.r2-fair-body {
    display: none;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--rb-border);
    padding: 16px;
}
.r2-fair-body.open { display: flex; }
.r2-fair-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.625;
    color: var(--rb-text-soft);
}
.r2-fair-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.r2-fair-boxlabel {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-faint);
}
.r2-fair-value {
    overflow-x: auto;
    word-break: break-all;
    border-radius: 6px;
    background: var(--rb-bg);
    padding: 6px 8px;
    font-size: 11px;
    color: var(--rb-text-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.r2-fair-value.strong { font-family: inherit; font-weight: 600; }
.r2-fair-attach {
    display: flex;
    gap: 8px;
}
.r2-fair-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: var(--rb-bg);
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--rb-text);
    outline: none;
    font-family: inherit;
}
.r2-fair-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--rb-border);
    background: var(--rb-bg);
    color: var(--rb-text);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.15s;
    font-family: inherit;
    fill: none;
}
.r2-fair-btn:hover { filter: brightness(1.25); }
.r2-fair-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.r2-fair-btn.shrink { flex-shrink: 0; padding: 0 16px; }
.r2-fair-btn.full { width: 100%; }

/* disable clicks while spinning: panels */
.r2-busy .r2-table .r2-num,
.r2-busy .r2-table .r2-out,
.r2-busy .r2-table .r2-zbtn { cursor: not-allowed; }
.r2-busy .r2-table { pointer-events: none; }