/* Shared play-page theme for rail, luckybox, slot and randomcard. */
.mg24-page,
.rcg24 {
    max-width: 1180px;
    margin: auto;
    padding: 24px 12px 52px;
}
.mg24-page *,
.rcg24 * {
    box-sizing: border-box;
}
.mg24-page > .container-sm,
.rcg24 > .container-sm {
    max-width: 1180px;
    padding: 0;
}

/* Main paper */
.mg24-game,
.rcg24-panel {
    position: relative;
    min-width: 0;
    padding: 18px;
    border: 0 !important;
    border-radius: 16px !important;
    background: var(--bg_main) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .09);
}
.mg24-head,
.rcg24-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 0 42px 8px 0;
    border: 0;
}
.mg24-head-icon,
.rcg24-icon {
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 1px solid var(--sub) !important;
    border-radius: 16px !important;
    background: var(--bg_sub) !important;
    color: var(--main) !important;
    font-size: 25px;
    box-shadow: none !important;
}
.mg24-head h2,
.rcg24-head h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}
.mg24-head small,
.rcg24-head small {
    color: var(--font_sub) !important;
    font-size: 12px;
    font-weight: 700;
}
.mg24-sound,
.rcg24-sound {
    display: grid;
    place-items: center;
    position: absolute;
    z-index: 8;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--bg_border);
    border-radius: 16px;
    background: var(--bg_sub);
    color: var(--main);
    font-size: 13px;
    transition: .2s;
}
.mg24-sound:hover,
.rcg24-sound:hover {
    border-color: var(--main);
}
.mg24-sound.is-muted,
.rcg24-sound.is-muted {
    color: var(--font_sub);
    opacity: .72;
}

/* Price, balance and actions */
.mg24-balance,
.rcg24-balance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 0 0 9px;
    color: var(--font_sub);
    text-align: center;
}
.mg24-stat,
.rcg24-balance > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 23px;
    color: var(--font_sub);
    font-size: 12px;
    line-height: 1.45;
}
.mg24-stat:first-child,
.rcg24-balance > div:first-child {
    min-height: 30px;
    color: var(--font_main);
    font-size: 16px;
    font-weight: 700;
}
.mg24-stat strong,
.rcg24-balance strong {
    color: var(--font_main);
    font-size: 14px;
    white-space: nowrap;
}
.mg24-stat:first-child strong,
.rcg24-balance > div:first-child strong {
    color: var(--main);
    font-size: 21px;
    font-weight: 700;
}
.mg24-balance.is-low .mg24-balance-value,
.mg24-balance.is-low .mg24-balance-value *,
.rcg24-balance.is-low .rcg24-balance-value,
.rcg24-balance.is-low .rcg24-balance-value * {
    color: #ff3b4f !important;
}
.mg24-refresh,
.rcg24-refresh {
    display: inline-grid;
    place-items: center;
    width: 23px;
    height: 23px;
    margin-left: 2px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--main);
    font-size: 11px;
}
.mg24-refresh.loading i,
.rcg24-refresh.loading i {
    animation: mgThemeRefresh .65s linear infinite;
}
.mg24-actions {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
    gap: 9px;
}
.mg24-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 16px !important;
    font-size: 13px;
    font-weight: 700;
    transition: .2s;
}
.mg24-actions .mg24-play {
    font-size: 16px;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--main) 23%, transparent);
}
.mg24-actions .mg24-batch {
    border: 1px solid color-mix(in srgb, var(--main) 35%, var(--bg_border));
}
.mg24-actions .mg24-batch:hover {
    transform: translateY(-1px);
    border-color: var(--main);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--main) 14%, transparent);
}
.mg24-actions button:disabled {
    pointer-events: none;
    opacity: .7;
}

/* BOOT WIN RATE */
.mg24-boost {
    margin-top: 14px;
    padding: 8px 0 0;
    border: 0;
    background: none;
    box-shadow: none;
}
.mg24-boost-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
}
.mg24-boost-head > div {
    display: flex;
    align-items: baseline;
    gap: 9px;
    min-width: 0;
    white-space: nowrap;
}
.mg24-boost-head b {
    color: var(--font_main);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .45px;
}
.mg24-boost-head small {
    display: inline;
    margin: 0;
    color: var(--font_sub);
    font-size: 12px;
}
.mg24-boost-bolt {
    color: #ffc107;
    filter: drop-shadow(0 0 6px rgba(255, 193, 7, .62));
}
.mg24-boost-value {
    color: var(--main);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}
.mg24-boost .progress {
    position: relative;
    overflow: hidden;
    height: 11px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--sub) 9%, var(--bg_main));
    box-shadow: inset 0 0 0 1px var(--bg_border);
}
.mg24-boost .progress-bar {
    border-radius: 99px;
    background: linear-gradient(90deg, var(--main), var(--sub), var(--main)) !important;
    background-size: 220% 100% !important;
    box-shadow: 0 0 16px color-mix(in srgb, var(--main) 48%, transparent);
    transition: width .35s ease;
    animation: mgThemeBoostFlow 1.5s linear infinite;
}
.mg24-boost-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 10px;
}
.mg24-boost-option {
    padding: 7px 4px;
    border: 1px solid var(--bg_border);
    border-radius: 16px !important;
    color: var(--font_sub);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
    transition: .18s;
}
.mg24-boost-option:hover,
.mg24-boost-option.active {
    border-color: var(--main);
    color: var(--main);
    box-shadow: 0 5px 14px color-mix(in srgb, var(--main) 12%, transparent);
}
.mg24-preview {
    margin-top: 12px;
    text-align: center;
}
.mg24-record-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ff3b4f;
    border-radius: 16px;
    background: rgba(255, 59, 79, .07);
    color: #ff5365;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

/* Side papers */
.mg24-side-row,
.rcg24-side-row {
    --bs-gutter-y: 1.5rem;
}
.mg24-info,
.mg24-rewards,
.rcg24-info,
.rcg24-prizes {
    --mg-accent: var(--sub);
    position: relative;
    display: block;
    min-height: 158px;
    overflow: hidden;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: var(--bg_main) !important;
    color: var(--font_main);
    box-shadow: none !important;
    transform: none !important;
}
.mg24-info::before,
.mg24-rewards::before,
.rcg24-info::before,
.rcg24-prizes::before {
    content: "";
    position: absolute;
    z-index: 3;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--mg-accent);
}
.mg24-info:hover,
.mg24-rewards:hover,
.rcg24-info:hover,
.rcg24-prizes:hover {
    --mg-accent: var(--main);
}
.mg24-info,
.rcg24-info {
    padding: 18px !important;
}
.mg24-rewards,
.rcg24-prizes {
    padding: 14px !important;
}
.mg24-info > .row,
.rcg24-info > .row,
.mg24-rewards > h3,
.mg24-prize-grid,
.rcg24-prizes > h3,
.rcg24-prize-grid {
    position: relative;
    z-index: 2;
}
.mg24-info img,
.rcg24-game-img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    object-fit: cover;
}
.mg24-info-game-name,
.rcg24-info-game-name {
    margin: 0 0 4px;
    color: var(--font_main);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}
.mg24-info-price,
.rcg24-info-price {
    margin: 0 0 8px;
    color: var(--main);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}
.mg24-info-text,
.rcg24-desc {
    margin: 0;
    color: var(--font_sub) !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.65;
    text-align: left;
}
.mg24-rewards h3,
.rcg24-prizes h3 {
    margin: 0 0 10px !important;
    padding: 0 0 3px;
    border: 0;
    color: var(--font_main);
    font-size: 15px;
    font-weight: 700;
}
.mg24-prize-grid,
.rcg24-prize-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    max-height: none;
    overflow: visible;
}
.mg24-prize,
.rcg24-prize {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 166px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--bg_border);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--bg_main), var(--bg_sub));
    text-align: center;
    transition: .2s;
}
.mg24-prize:hover,
.rcg24-prize:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--main) 48%, var(--bg_border));
}
.mg24-prize-image,
.rcg24-prize-img {
    position: relative;
    width: 106px;
    height: 106px;
    margin: 34px auto 0;
    overflow: visible;
    border: 4px solid transparent;
    border-radius: 50%;
    background: linear-gradient(var(--bg_main), var(--bg_main)) padding-box,
                conic-gradient(from 30deg, var(--main), var(--sub), var(--main)) border-box;
    box-shadow: 0 0 16px color-mix(in srgb, var(--sub) 56%, transparent),
                0 0 34px color-mix(in srgb, var(--sub) 24%, transparent);
}
.mg24-prize-image img,
.rcg24-prize-img img {
    width: 100%;
    height: 100%;
    padding: 5px;
    border-radius: 50%;
    background: var(--bg_main);
    object-fit: contain;
}
.mg24-stock,
.rcg24-stock {
    position: absolute;
    z-index: 3;
    top: 7px;
    right: 7px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.mg24-prize-body,
.rcg24-prize-body {
    padding: 7px 6px 8px;
}
.mg24-prize-name,
.rcg24-prize-name {
    display: -webkit-box;
    overflow: hidden;
    color: var(--font_main);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.mg24-chance,
.rcg24-chance {
    margin-top: 3px;
    color: var(--font_sub);
    font-size: 10px;
    line-height: 1;
}
.mg24-chance b,
.rcg24-chance b {
    color: var(--font_main);
    font-size: 13px;
    font-weight: 700;
}

/* SweetAlert follows the website theme. */
.swal2-container .swal2-popup {
    border: 1px solid var(--bg_border) !important;
    border-radius: 20px !important;
    background: color-mix(in srgb, var(--bg_main) 96%, transparent) !important;
    color: var(--font_main) !important;
    box-shadow: 0 22px 65px rgba(0, 0, 0, .32),
                0 0 26px color-mix(in srgb, var(--main) 12%, transparent) !important;
    backdrop-filter: blur(16px);
}
.swal2-container .swal2-title {
    color: var(--font_main) !important;
    font-weight: 700 !important;
}
.swal2-container .swal2-html-container,
.swal2-container .swal2-content {
    color: var(--font_sub) !important;
}
.swal2-container .swal2-html-container .text-muted {
    color: var(--font_sub) !important;
}
.swal2-container .swal2-html-container .bg-sub,
.swal2-container .swal2-validation-message {
    border: 1px solid var(--bg_border) !important;
    background: var(--bg_sub) !important;
    color: var(--font_main) !important;
}
.swal2-container .swal2-input,
.swal2-container .swal2-select,
.swal2-container .swal2-textarea {
    border: 1px solid var(--bg_border) !important;
    background: var(--bg_sub) !important;
    color: var(--font_main) !important;
    box-shadow: none !important;
}
.swal2-container .swal2-input:focus,
.swal2-container .swal2-select:focus,
.swal2-container .swal2-textarea:focus {
    border-color: var(--main) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--main) 16%, transparent) !important;
}
.swal2-container .swal2-confirm {
    border: 0 !important;
    background: var(--main) !important;
    color: #fff !important;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--main) 24%, transparent) !important;
}
.swal2-container .swal2-deny {
    border: 0 !important;
    background: var(--sub) !important;
    color: #fff !important;
}
.swal2-container .swal2-cancel {
    border: 1px solid #dc3545 !important;
    background: #dc3545 !important;
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(220, 53, 69, .22) !important;
}
.swal2-container .swal2-close {
    color: #dc3545 !important;
}
.swal2-container .swal2-footer {
    color: var(--font_sec) !important;
}
.swal2-container .swal2-actions button {
    border-radius: 12px !important;
    font-weight: 700 !important;
}
.swal2-container .swal2-timer-progress-bar {
    background: linear-gradient(90deg, var(--main), var(--sub)) !important;
}
.swal2-container.swal2-backdrop-show {
    background: rgba(0, 0, 0, .62) !important;
    backdrop-filter: blur(5px);
}

@keyframes mgThemeRefresh {
    to { transform: rotate(360deg); }
}
@keyframes mgThemeBoostFlow {
    to { background-position: 220% 0; }
}

@media (max-width: 700px) {
    .mg24-actions {
        grid-template-columns: 1fr;
    }
    .mg24-actions .mg24-batch {
        width: 100%;
        min-height: 50px;
        padding-inline: 6px;
        font-size: 11px;
    }
    .mg24-stat,
    .rcg24-balance > div {
        font-size: 11px;
    }
    .mg24-stat:first-child,
    .rcg24-balance > div:first-child {
        font-size: 14px;
    }
    .mg24-stat:first-child strong,
    .rcg24-balance > div:first-child strong {
        font-size: 18px;
    }
    .mg24-boost-head b {
        font-size: 16px;
    }
    .mg24-boost-head small {
        font-size: 11px;
    }
    .mg24-boost-value {
        font-size: 23px;
    }
    .mg24-record-warning {
        font-size: 10px;
    }
}
@media (max-width: 575.98px) {
    .mg24-page,
    .rcg24 {
        padding: 17px 9px 42px;
    }
    .mg24-game,
    .rcg24-panel {
        padding: 14px;
    }
    .mg24-head-icon,
    .rcg24-icon {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        border-radius: 14px !important;
        font-size: 22px;
    }
    .mg24-head h2,
    .rcg24-head h1 {
        font-size: 18px;
    }
    .mg24-prize-grid,
    .rcg24-prize-grid {
        grid-template-columns: 1fr 1fr;
    }
    .mg24-prize,
    .rcg24-prize {
        min-height: 150px;
    }
    .mg24-prize-image,
    .rcg24-prize-img {
        width: 88px;
        height: 88px;
        margin-top: 30px;
        border-width: 3px;
    }
}
@media (max-width: 430px) {
    .mg24-boost-options {
        grid-template-columns: 1fr 1fr;
    }
}
@media (prefers-reduced-motion: reduce) {
    .mg24-page *,
    .rcg24 * {
        transition: none !important;
    }
    .mg24-refresh i,
    .rcg24-refresh i,
    .mg24-boost .progress-bar {
        animation: none !important;
    }
}
