/* ============================================================
   JACKPOT PAGE — CSRUN-STYLE LAYOUT
   ============================================================ */

/* ---------- Layout ---------- */
.jr-layout {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-top: 20px;
    align-items: flex-start;
}

.jr-layout__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    order: 2;
}

.jr-layout__sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    order: 1;
}

/* ---------- Game Area Block ---------- */
.jr-game-area {
    background: #16161D;
    border-radius: 10px;
    overflow: hidden;
}

/* ---------- Top Row (Bank | Status | Players) ---------- */
.jr-game-top {
    display: flex;
    align-items: stretch;
    height: 130px;
    position: relative;
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.1) 0%, rgba(25, 30, 48, 0.5) 100%) !important;
}

/* Side panels (Bank / Players) — mask-arrow style */
.jr-side {
    position: relative;
    display: flex;
    align-items: center;
    width: 30%;
    flex-shrink: 0;
    padding: 16px 20px;
    z-index: 1;
}

.jr-side--left {
    justify-content: flex-end;
    padding-right: 32px;
}

.jr-side--right {
    justify-content: flex-start;
    padding-left: 32px;
}

/* Mask-arrow shapes (csgorun-style) */
.mask-arrow-right {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L280,0 L298,54 Q300,60 298,66 L280,120 L0,120 Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L280,0 L298,54 Q300,60 298,66 L280,120 L0,120 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.mask-arrow-left {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' preserveAspectRatio='none'%3E%3Cpath d='M20,0 L300,0 L300,120 L20,120 L2,66 Q0,60 2,54 L20,0 Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' preserveAspectRatio='none'%3E%3Cpath d='M20,0 L300,0 L300,120 L20,120 L2,66 Q0,60 2,54 L20,0 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* Gradient border + background layers */
.jr-side__mask-border,
.jr-side__mask-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.jr-side--left .jr-side__mask-border {
    background: linear-gradient(0deg, #2e2028, #5c3030, #CC6651, #5c3030, #2e2028);
}
.jr-side--left .jr-side__mask-border,
.jr-side--left .jr-side__mask-bg {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L280,0 L298,54 Q300,60 298,66 L280,120 L0,120 Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L280,0 L298,54 Q300,60 298,66 L280,120 L0,120 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}
.jr-side--left .jr-side__mask-bg {
    background: linear-gradient(90deg, #251a1a, #3d2427);
    margin-right: 3px;
}

.jr-side--right .jr-side__mask-border {
    background: linear-gradient(0deg, #1e2240, #2e3f6e, #5a7ae6, #2e3f6e, #1e2240);
}
.jr-side--right .jr-side__mask-border,
.jr-side--right .jr-side__mask-bg {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' preserveAspectRatio='none'%3E%3Cpath d='M20,0 L300,0 L300,120 L20,120 L2,66 Q0,60 2,54 L20,0 Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' preserveAspectRatio='none'%3E%3Cpath d='M20,0 L300,0 L300,120 L20,120 L2,66 Q0,60 2,54 L20,0 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}
.jr-side--right .jr-side__mask-bg {
    background: linear-gradient(-90deg, #1a1e36, #222d52);
    margin-left: 3px;
}

.jr-side__content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jr-side--left .jr-side__content {
    flex-direction: row-reverse;
    text-align: right;
}

.jr-side__info {
    flex-direction: column;
    gap: 2px;
}

.jr-side__label-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.jr-side__value {
    font-size: 22px;
    font-weight: 700;
}

.jr-side__value--bank {
    color: #ffc6b0;
}

.jr-side__value--skins {
    color: #93e7eb;
}

.jr-side__currency {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.6;
    color: #ffc6b0;
}

.jr-side__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
}

.jr-side__icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jr-side__icon--bank {
    background: rgba(204,102,81,0.15);
    border: 1px solid rgba(204,102,81,0.25);
    color: #CC6651;
}

.jr-side__icon--skins {
    background: rgba(59,92,204,0.15);
    border: 1px solid rgba(59,92,204,0.25);
    color: #5a7ae6;
}

/* Center status */
.jr-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    position: relative;
    z-index: 2;
}

.jr-center__status {
    text-align: center;
}

.jr-center__main-text {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.jr-center__sub-text {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    font-weight: 500;
}

.jr-center__indicator {
    display: none;
}

.jr-center__indicator-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.jr-center__indicator-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #CC6651, #e07a5f);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.jr-center__arrow {
    margin-top: 6px;
}

/* ---------- Carousel Zone ---------- */
.jr-carousel-zone {
    padding: 16px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Carousel wrap */
.jr-carousel-wrap {
    position: relative;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    width: 100%;
}

.jr-carousel-arrow-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #CC6651;
    z-index: 10;
}

.jr-carousel-viewport {
    overflow: hidden;
    height: 80px;
    position: relative;
}

.jr-carousel-viewport::before,
.jr-carousel-viewport::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 3;
    pointer-events: none;
}

.jr-carousel-viewport::before {
    left: 0;
    background: linear-gradient(to right, #16161D, transparent);
}

.jr-carousel-viewport::after {
    right: 0;
    background: linear-gradient(to left, #16161D, transparent);
}

.hero-carousel-scroll {
    display: flex;
    position: absolute;
    left: 50%;
    margin-left: -941px;
    height: 100%;
    will-change: transform;
    padding: 4px 0;
}

.hero-carousel-scroll .hero-carousel-user {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    margin: 0 2px;
    border-radius: 10px;
    overflow: hidden;
    transition: opacity 0.5s;
}

.hero-carousel-scroll .hero-carousel-user .hero-carousel-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
}

.hero-winner-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    gap: 4px;
    z-index: 20;
}

.hero-winner-overlay.show,
.hero-winner-overlay.visible {
    display: flex;
}

.hero-winner-name {
    color: #ffc6b0;
    font-weight: 700;
    font-size: 16px;
}

.hero-winner-chance {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}

/* Participants */
.jr-participants {
    display: flex;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(204,102,81,0.2) transparent;
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: 100%;
}

/* Bounce animation for bets count */
@keyframes jrCountBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.25) translateY(-2px); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.jr-count-bounce {
    display: inline-block;
    animation: jrCountBounce 0.35s ease;
}

.jr-participants--hiding {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.jr-participants__inner {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 auto;
}

/* Participant items generated by JS (update_bets chances) */
.jr-participants__inner .item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 10px 12px;
    width: 170px;
    flex-shrink: 0;
}

.jr-participants__inner .item .item-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jr-participants__inner .item .item-top img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.1);
}

.jr-participants__inner .item .carousel-item-username {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.jr-participants__inner .item .item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 10px;
}

.jr-participants__inner .item .item-bet {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.jr-participants__inner .item .ruble-icon-svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.jr-participants__inner .item .item-chance {
    font-size: 11px;
    font-weight: 700;
    color: #CC6651;
    white-space: nowrap;
    background: rgba(178, 95, 78, .2);
    padding: 5px;
    border-radius: 5px;
}

/* Hero chance items (sidebar or hidden) */
.hero-chance-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 140px;
}

.hero-chance-item img,
.hero-chance-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hero-chance-item .carousel-item-username,
.hero-chance-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-chance-item .carousel-item-bet,
.hero-chance-bet {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-chance-percent {
    font-size: 12px;
    color: #93e7eb;
    font-weight: 600;
}

/* Empty state for participants */
.preload-carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    padding: 8px 0;
}

.jackpot-bets-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    padding: 20px 0;
}

.hero-chances-empty {
    text-align: center;
    padding: 12px 0;
}

.hero-chances-empty__text {
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

/* ---------- Bets Section ---------- */
.jr-bets-section {
    background: #16161D;
    border-radius: 10px;
    padding: 20px;
}

.jr-bets-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.jr-bets-header__title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.jr-bets-header__count {
    background: rgba(204,102,81,0.15);
    color: #CC6651;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 8px;
    min-width: 24px;
    text-align: center;
}

/* Bet cards inside bets container */
.jackpot-bets-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.jackpot-bets-container::-webkit-scrollbar {
    display: none;
}

.jackpot-bet-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px 16px;
    transition: background 0.2s;
    animation: jrBetSlideIn 0.35s ease-out;
}

@keyframes jrBetSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.jackpot-bet-card:hover {
    background: rgba(255,255,255,0.06);
}

/* Bet card internal structure (matches JS buildBetCardHTML) */
.jackpot-bet-card .jackpot-bet-main {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.jackpot-bet-card .jackpot-bet-player {
    flex: 1;
    min-width: 0;
}

.jackpot-bet-card .jackpot-bet-player .btn-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    min-width: 0;
}

.jackpot-bet-card .jackpot-bet-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.jackpot-bet-card .jackpot-bet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jackpot-bet-card .jackpot-bet-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.jackpot-bet-card .jackpot-bet-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jackpot-bet-card .jackpot-bet-amount {
    display: flex;
    align-items: center;
    gap: 4px;
}

.jackpot-bet-card .jackpot-bet-sum {
    font-size: 13px;
    font-weight: 600;
    color: #ffc6b0;
}

.jackpot-bet-card .icon-coin {
    width: 14px;
    height: 14px;
}

.jackpot-bet-card .jackpot-bet-details {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.jackpot-bet-card .jackpot-bet-ticket,
.jackpot-bet-card .jackpot-bet-chance {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    gap: 2px;
}

.jackpot-bet-card .jackpot-bet-label {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: none;
}

.jackpot-bet-card .jackpot-bet-value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}

.jackpot-bet-card .jackpot-bet-chance .chance-value {
    color: #93e7eb;
}

/* ---------- History Row ---------- */
.jr-history-row {
    display: flex;
    justify-content: center;
}

.jr-history-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #16161D;
    color: rgba(255,255,255,0.6);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: background 0.2s, color 0.2s;
}

.jr-history-btn:hover {
    background: #252d48;
    color: rgba(255,255,255,0.9);
}

/* ---------- Sidebar: Bet Panel ---------- */
.jr-bet-panel {
    background: #16161D;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.jr-bet-panel__section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jr-bet-panel__label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
}

/* Bet Type Tabs (legacy) */
.jr-bet-type-tabs {
    display: none;
}

/* ---------- Room Mode Cards (horizontal above game area) ---------- */
.jr-room-cards {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
}

.jr-room-cards > .jr-room-card {
    flex: 1;
    min-width: 0;
}

.jr-room-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #16161D;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    border: 1.5px solid transparent;
}

.jr-room-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59,92,204,0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.jr-room-card:hover {
    transform: translateY(-1px);
}

.jr-room-card:hover::before {
    opacity: 1;
}

.jr-room-card--active {
    background: linear-gradient(135deg, rgba(30,35,55,0.95) 0%, rgba(25,30,48,0.95) 100%) !important;
}

.jr-room-card--active::before {
    opacity: 1 !important;
    background: linear-gradient(135deg, rgba(59,92,204,0.12) 0%, transparent 60%) !important;
}

.jr-room-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(59, 92, 204, 0.15);
    color: #5a7ae6;
    flex-shrink: 0;
}

.jr-room-card--active .jr-room-card__icon {
    background: rgba(59, 92, 204, 0.25);
    color: #8fa8ff;
}

.jr-room-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.jr-room-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.jr-room-card__name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}

.jr-room-card__bank {
    display: flex;
    align-items: center;
    gap: 5px;
}

.jr-room-card__bank svg {
    flex-shrink: 0;
}

.jr-room-card__bank-val {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.jr-room-card--active .jr-room-card__bank-val {
    color: #8fa8ff;
}

.jr-room-card__progress {
    width: 100%;
    height: 8px;
    background: #202430;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.jr-room-card__progress-fill {
    height: 100%;
    width: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #3b5ccc, #5a7ae6);
    transition: width 0.15s linear;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.jr-room-card__progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    bottom: 0;
    width: calc(100% + 100px);
    background: repeating-linear-gradient(
        -55deg,
        transparent,
        transparent 4px,
        rgba(255,255,255,0.15) 4px,
        rgba(255,255,255,0.15) 8px
    );
    animation: hero-card-stripes 1.2s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes hero-card-stripes {
    0% { transform: translateX(0); }
    100% { transform: translateX(9.8px); }
}

/* Bet Input — inline action buttons */
.jr-bet-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    overflow: hidden;
}

.jr-bet-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    padding: 16px 14px;
    -moz-appearance: textfield;
}

.jr-bet-input::-webkit-outer-spin-button,
.jr-bet-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.jr-bet-input-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    flex-shrink: 0;
}

.jr-bet-input-action {
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.jr-bet-input-action:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* (Quick buttons removed — now inline in input) */

/* My Bet Row */
.jr-my-bet-row {
    display: flex;
    gap: 8px;
}

.jr-my-bet-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 8px;
    border-radius: 10px;
    border: 1.5px dashed rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.15);
}

.jr-my-bet-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jr-my-bet-card--amount .jr-my-bet-icon {
    background: rgba(59,92,204,0.15);
    color: #7b9eff;
}

.jr-my-bet-card--chance .jr-my-bet-icon {
    background: rgba(147,231,235,0.15);
    color: #93e7eb;
}

.jr-my-bet-card--amount {
    border-color: rgba(59,92,204,0.25);
}

.jr-my-bet-card--chance {
    border-color: rgba(147,231,235,0.25);
}

.jr-my-bet-value {
    font-size: 14px;
    font-weight: 700;
}

.jr-my-bet-card--amount .jr-my-bet-value {
    color: #7b9eff;
}

.jr-my-bet-card--chance .jr-my-bet-value {
    color: #93e7eb;
}

/* Place Bet Button */
.jr-bet-panel__action {
    padding-top: 4px;
}

.jr-place-bet-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #3b5ccc 0%, #2a4ab8 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.jr-place-bet-icon {
    flex-shrink: 0;
    opacity: 0.85;
}

.jr-place-bet-amount {
    margin-left: auto;
    font-size: 15px;
    font-weight: 700;
}

.jr-place-bet-btn:hover {
    opacity: 0.9;
    box-shadow: none;
}

.jr-place-bet-btn:active {
    transform: scale(0.98);
}

/* Round Row */
.jr-round-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.jr-round-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.jr-round-history {
    font-size: 12px;
    color: rgba(204,102,81,0.7);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.jr-round-history:hover {
    color: #CC6651;
}

/* ---------- Lucky Day Card ---------- */
.jr-lucky-card {
    position: relative;
    background: linear-gradient(135deg, #3198ad 0%, #1e7485 100%);
    border-radius: 10px;
    padding: 20px;
    overflow: hidden;
}

.jr-lucky-card__bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.jr-lucky-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.jr-lucky-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    position: relative;
    z-index: 1;
}

.jr-lucky-card__subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.jr-lucky-card__badge {
    padding: 8px 16px;
    border: 1.5px dashed rgba(255,255,255,0.35);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.08);
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
    text-align: center;
}

.jr-lucky-card__winner {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.jr-lucky-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.jr-lucky-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jr-lucky-card__info {
    flex: 1;
    min-width: 0;
}

.jr-lucky-card__name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jr-lucky-card__amount {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

.jr-lucky-card__gift {
    position: absolute;
    right: -5px;
    bottom: -5px;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

/* ---------- Guest disabled state ---------- */
.jr-bet-panel.guest-disabled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

/* ---------- Animated counter (reused from old styles) ---------- */
.ac-counter {
    display: inline-flex;
    align-items: center;
    height: 1.2em;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

.ac-digit {
    display: inline-block;
    width: 0.7em;
    height: 1.2em;
    overflow: hidden;
    position: relative;
    text-align: center;
    line-height: 1.2em;
    font-weight: 700;
}

.ac-digit-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.ac-digit-strip span {
    display: block;
    height: 1.2em;
    line-height: 1.2em;
    text-align: center;
}

.ac-separator {
    display: inline-block;
    width: 0.3em;
    text-align: center;
    font-weight: 700;
}

.ac-text-fallback {
    font-weight: 700;
}

/* ---------- Hide legacy slider/winner anomaly ---------- */
.slider,
.slider .winner-stats-wrapp,
.slider .winner-stats,
.slider .winner-badge {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .jr-layout {
        flex-direction: column;
    }
    .jr-layout__sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .jr-game-top {
        flex-direction: column;
        gap: 0;
        height: auto;
    }
    .jr-side {
        padding: 12px 16px;
        min-width: auto;
        width: auto;
        flex: 1;
        justify-content: center;
    }
    .jr-side--left {
        padding-right: 16px;
    }
    .jr-side--right {
        padding-left: 16px;
    }
    .jr-side__mask-border,
    .jr-side__mask-bg {
        -webkit-mask-image: none !important;
        mask-image: none !important;
        border-radius: 0;
    }
    .jr-side--left .jr-side__mask-bg {
        margin-right: 0;
    }
    .jr-side--right .jr-side__mask-bg {
        margin-left: 0;
    }
    .jr-side__content {
        justify-content: center;
    }
    .jr-bets-section {
        padding: 16px;
    }
    .jr-bet-panel {
        padding: 16px;
    }

    /* Hide room card icons on mobile, keep text + status + amount */
    .jr-room-card__icon {
        display: none;
    }

    .jr-room-card {
        gap: 6px;
        padding: 10px;
    }

    /* Reduce sidebar bets section width */
    .jr-layout__sidebar {
        width: 100%;
    }

    .jr-bets-section {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .jr-side__value {
        font-size: 18px;
    }
    .jr-center__main-text {
        font-size: 15px;
    }
    .jr-my-bet-row {
        flex-direction: column;
    }
}
