﻿/* CONTAINER CHÍNH */
.brodice-container {
    position: relative;
    width: min(100vw, calc(100vh * (9 / 16)));
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    background: #100b26 url('../../images/games/brodice/bg.png') center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(8px, 1.5vh, 12px) clamp(10px, 2vw, 14px);
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

    .brodice-container::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
        background-size: 100% 4px;
        pointer-events: none;
        z-index: 2;
    }

/* NÚT BACK */
.brodice-back-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #1886b5;
    border: 1.5px solid #00f0ff;
    color: #ffffff;
    border-radius: 6px;
    padding: 2px 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

    .brodice-back-btn:active {
        transform: scale(0.95);
    }

/* ================= TOP AREA & TIMER ================= */
.brodice-top-area {
    width: 100%;
    position: relative;
    height: 42%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

.brodice-game-title {
    position: absolute;
    top: 4px;
    left: 45px;
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: clamp(14px, 2.5vh, 18px);
    font-weight: 900;
    background: linear-gradient(180deg, #00f0ff 0%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(2px 2px 0px #000);
}

.brodice-timer-box {
    position: absolute;
    top: 32px;
    left: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.brodice-timer-label {
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: 8px;
    color: #38bdf8;
    text-shadow: 1px 1px 0px #000;
}

.brodice-timer-number {
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: 18px;
    color: #ffe600;
    text-shadow: 2px 2px 0px #000;
}

.brodice-status-text {
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: 10px;
    color: #00f0ff;
    text-shadow: 1px 1px 2px #000;
}

.brodice-win-text {
    color: #ffe600;
    animation: brodice-blinkText 0.5s infinite alternate;
}

@keyframes brodice-blinkText {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.brodice-history-box {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.brodice-dice-history-row {
    display: flex;
    gap: 3px;
}

.brodice-dice-pip-img {
    width: clamp(20px, 3vh, 24px);
    height: clamp(20px, 3vh, 24px);
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.brodice-result-pills-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.brodice-pill {
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: clamp(8px, 1.2vh, 10px);
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 1px #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    padding: 0 6px;
    border: none;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    box-sizing: border-box;
}

.brodice-total-pill {
    background-image: url('../../images/games/brodice/result_khung.png');
}

.brodice-type-pill {
    background-image: url('../../images/games/brodice/rs_type_khung.png');
}

/* ================= KHU VỰC ĐĨA, BÁT & XÚC XẮC ================= */
.brodice-dice-bowl-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 5px;
    box-sizing: border-box;
}

.brodice-plate-img {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: auto;
    object-fit: contain;
    z-index: 1;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.8));
    pointer-events: none;
}

.brodice-dice-group {
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 70px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.brodice-hide-dice {
    opacity: 0;
}

.brodice-show-dice {
    opacity: 1;
}

.brodice-dice-img {
    position: absolute;
    width: 52px;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.85));
}

.brodice-dice-1 {
    transform: translate(-34px, -12px) rotate(-6deg);
    z-index: 1;
}

.brodice-dice-2 {
    transform: translate(30px, -12px) rotate(8deg);
    z-index: 1;
}

.brodice-dice-3 {
    transform: translate(-2px, 10px) rotate(0deg);
    z-index: 3;
}

.brodice-bowl-img {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: auto;
    object-fit: contain;
    z-index: 4;
    image-rendering: pixelated;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.9));
    transform-origin: bottom center;
    transition: transform 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.brodice-anim-shake {
    animation: brodice-shakeBowl 0.2s infinite alternate;
}

@keyframes brodice-shakeBowl {
    0% {
        transform: translateX(-50%) translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translateX(-50%) translate(-4px, -12px) rotate(-4deg);
    }

    100% {
        transform: translateX(-50%) translate(4px, -6px) rotate(4deg);
    }
}

.brodice-anim-open {
    transform: translateX(-50%) translate(-95px, -20px) rotate(-32deg) !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ================= BETTING TABLE ================= */
.brodice-betting-table-container {
    width: 100%;
    height: 56%;
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.8vh, 6px);
    z-index: 5;
    transition: opacity 0.3s;
}

.brodice-disabled-table {
    opacity: 0.6;
    pointer-events: none;
}

.brodice-row-main {
    display: flex;
    gap: clamp(6px, 1.2vw, 10px);
    height: clamp(34px, 5.2vh, 42px);
    width: 100%;
}

/* MAIN BUTTON: BIG, SMALL, EVEN, ODD */
.brodice-main-btn {
    position: relative;
    flex: 1;
    height: 100%;
    background: transparent url('../../images/games/brodice/btn_big.png') center center / 100% 100% no-repeat;
    border: none;
    outline: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    image-rendering: pixelated;
    box-shadow: none;
    transition: transform 0.1s ease, filter 0.1s ease;
    font-family: inherit;
}

    .brodice-main-btn:hover {
        filter: brightness(1.2);
    }

    .brodice-main-btn:active,
    .brodice-main-btn.active {
        background-image: url('../../images/games/brodice/btn_big_active.png');
        transform: translateY(1px);
    }

.brodice-bet-label {
    font-family: 'DePixel Breit', monospace, sans-serif;
    color: #ffffff;
    font-size: clamp(11px, 1.8vh, 13px);
    text-shadow: 1px 1px 2px #000;
}

.brodice-bet-multiplier {
    font-family: 'DePixel Breit', monospace, sans-serif;
    color: #38bdf8;
    font-size: clamp(9px, 1.4vh, 11px);
    font-weight: bold;
}

/* SUM GRID BUTTONS */
.brodice-sum-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: clamp(3px, 0.6vh, 5px);
    flex-grow: 1;
    width: 100%;
}

.brodice-sum-btn {
    position: relative;
    background: transparent url('../../images/games/brodice/bg_318.png') center center / 100% 100% no-repeat;
    border: none;
    outline: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    image-rendering: pixelated;
    box-shadow: none;
    transition: transform 0.1s ease, filter 0.1s ease;
    font-family: inherit;
}

    .brodice-sum-btn:hover {
        filter: brightness(1.2);
    }

    .brodice-sum-btn:active,
    .brodice-sum-btn.active {
        background-image: url('../../images/games/brodice/bg_318_active.png');
        transform: scale(0.96);
    }

.brodice-sum-score {
    font-family: 'DePixel Breit', monospace, sans-serif;
    color: #ffffff;
    font-size: clamp(10px, 1.6vh, 13px);
    text-shadow: 1px 1px 2px #000;
}

.brodice-sum-multiplier {
    font-family: 'DePixel Breit', monospace, sans-serif;
    color: #38bdf8;
    font-size: clamp(8px, 1.1vh, 10px);
    font-weight: bold;
}

/* THẺ HIỂN THỊ TIỀN CƯỢC MÀU VÀNG SÁT BOTTOM CỬA CƯỢC */
.brodice-placed-bet {
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: clamp(7px, 1.1vh, 9px);
    font-weight: bold;
    color: #ffe600;
    text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
    white-space: nowrap;
    pointer-events: none;
    z-index: 6;
}

/* ================= POPUP ĐẶT CƯỢC (BET MODAL) ================= */
.brodice-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    backdrop-filter: blur(2px);
}

.brodice-modal-card {
    width: 100%;
    max-width: 380px;
    background: #333d61;
    border: 2px solid #556799;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), inset 0 0 4px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'DePixel Breit', monospace, sans-serif;
    color: #ffffff;
    box-sizing: border-box;
}

.brodice-modal-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brodice-modal-reward-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: bold;
    color: #ffe600;
    text-shadow: 1px 1px 0 #000;
}

.brodice-coin-icon {
    font-size: 14px;
}

.brodice-modal-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #cbd5e1;
}

.brodice-highlight-yellow {
    color: #ffe600;
    font-weight: bold;
}

.brodice-highlight-green {
    color: #22c55e;
    font-weight: bold;
}

.brodice-modal-divider {
    height: 1px;
    background: #475569;
    width: 100%;
}

.brodice-preset-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
}

.brodice-preset-btn {
    background: transparent url('../../images/games/brodice/bg_318.png') center center / 100% 100% no-repeat;
    border: none;
    outline: none;
    border-radius: 0;
    color: #ffffff;
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    padding: 10px 0;
    cursor: pointer;
    image-rendering: pixelated;
    box-shadow: none;
    transition: transform 0.1s ease, filter 0.1s ease;
    text-shadow: 1px 1px 2px #000;
}

    .brodice-preset-btn:hover {
        filter: brightness(1.2);
        transform: translateY(-1px);
    }

    .brodice-preset-btn:active {
        background-image: url('../../images/games/brodice/bg_318_active.png');
        transform: scale(0.95);
    }

.brodice-modal-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #ffffff;
    gap: 8px;
}

.brodice-summary-label {
    white-space: nowrap;
}

.brodice-orange-txt {
    color: #f97316;
    font-weight: bold;
}

.brodice-input-wrapper {
    flex: 1;
    max-width: 120px;
}

.brodice-bet-input {
    width: 100%;
    background: #1e2538;
    border: 1.5px solid #475569;
    border-radius: 8px;
    color: #ffe600;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    padding: 6px 4px;
    box-sizing: border-box;
    outline: none;
}

.brodice-modal-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.brodice-btn-cancel {
    flex: 1;
    background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
    border: 2px solid #fdba74;
    border-radius: 18px;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    padding: 8px 0;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 8px rgba(0, 0, 0, 0.6);
    text-shadow: 1px 1px 2px #000;
    transition: transform 0.1s ease, filter 0.1s ease;
}

    .brodice-btn-cancel:hover {
        filter: brightness(1.15);
    }

    .brodice-btn-cancel:active {
        transform: scale(0.96);
    }

.brodice-btn-confirm {
    flex: 1.5;
    background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
    border: 2px solid #fef08a;
    border-radius: 18px;
    color: #000000;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    padding: 8px 0;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 8px rgba(0, 0, 0, 0.6);
    text-shadow: 0.5px 0.5px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.1s ease, filter 0.1s ease;
}

    .brodice-btn-confirm:hover {
        filter: brightness(1.15);
    }

    .brodice-btn-confirm:active {
        transform: scale(0.96);
    }

/* ================= POPUP LỊCH SỬ CƯỢC & HƯỚNG DẪN CHƠI ================= */
.brodice-history-modal-card {
    position: relative;
    width: 92%;
    max-width: 380px;
    height: 80vh;
    max-height: 560px;
    background: transparent url('../../images/games/brodice/khung_popup.png') center center / 100% 100% no-repeat;
    display: flex;
    flex-direction: column;
    padding: 24px 18px 20px 18px;
    box-sizing: border-box;
    image-rendering: pixelated;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.95);
    animation: brodiceModalPop 0.25s ease-out;
}

@keyframes brodiceModalPop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.brodice-history-modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 14px;
    padding-top: 4px;
}

.brodice-history-title-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.brodice-title-star-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.brodice-title-history-img {
    height: 22px;
    width: auto;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.brodice-title-howtoplay-img {
    height: 22px;
    width: auto;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.brodice-history-close-btn {
    position: absolute;
    top: 0;
    right: 4px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

    .brodice-history-close-btn:hover {
        filter: brightness(1.25);
    }

    .brodice-history-close-btn:active {
        transform: scale(0.9);
    }

.brodice-close-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: pixelated;
}

/* POPUP HƯỚNG DẪN CHƠI CONTENT */
.brodice-howtoplay-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-y: auto;
    padding: 10px 8px;
    box-sizing: border-box;
}

.brodice-howtoplay-text {
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: #e2e8f0;
    text-shadow: 1px 1px 2px #000;
    margin: 0;
    text-align: justify;
}

/* POPUP LỊCH SỬ CONTENT */
.brodice-history-table-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    margin-top: 2px;
}

.brodice-history-table-header {
    display: grid;
    grid-template-columns: 1.1fr 1.5fr 1.2fr 1.3fr;
    align-items: center;
    text-align: center;
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: 10px;
    color: #88a2d4;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: bold;
}

.brodice-history-table-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

    .brodice-history-table-body::-webkit-scrollbar,
    .brodice-howtoplay-content-wrapper::-webkit-scrollbar {
        width: 4px;
    }

    .brodice-history-table-body::-webkit-scrollbar-thumb,
    .brodice-howtoplay-content-wrapper::-webkit-scrollbar-thumb {
        background: rgba(56, 189, 248, 0.5);
        border-radius: 4px;
    }

.brodice-history-row {
    display: grid;
    grid-template-columns: 1.1fr 1.5fr 1.2fr 1.3fr;
    align-items: center;
    text-align: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: 11px;
}

.col-phien {
    color: #ffffff;
    font-weight: bold;
    word-break: break-all;
}

.col-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.brodice-history-dice-dices {
    display: flex;
    gap: 2px;
    align-items: center;
    justify-content: center;
}

.brodice-history-pip {
    width: 16px;
    height: 16px;
    object-fit: contain;
    image-rendering: pixelated;
}

.brodice-history-dice-pills {
    display: flex;
    gap: 3px;
    justify-content: center;
    align-items: center;
}

.col-bet {
    color: #00f0ff;
    font-weight: bold;
}

.col-win {
    color: #ffe600;
    font-weight: bold;
}

/* SIGNALR STATUS & PING-PONG BAR */
.brodice-signalr-bar {
    position: absolute;
    top: 32px;
    right: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'DePixel Breit', monospace, sans-serif;
    z-index: 10;
}

.brodice-signalr-status {
    font-size: 8px;
    font-weight: bold;
    text-shadow: 1px 1px 0px #000;
}

    .brodice-signalr-status.online {
        color: #22c55e;
    }

    .brodice-signalr-status.offline {
        color: #ef4444;
    }

.brodice-ping-btn {
    background: #0284c7;
    border: 1px solid #38bdf8;
    color: #ffffff;
    font-family: inherit;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

    .brodice-ping-btn:hover:not(:disabled) {
        filter: brightness(1.2);
    }

    .brodice-ping-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.brodice-pong-text {
    font-size: 8px;
    color: #ffe600;
    text-shadow: 1px 1px 0px #000;
    font-weight: bold;
}

/* HIỆU ỨNG NHẤP NHÁY CỬA TRÚNG THƯỞNG */
.brodice-winning-blink {
    animation: brodice-gateBlink 0.5s infinite alternate !important;
    box-shadow: 0 0 15px #ffe600, inset 0 0 10px #ffe600 !important;
    border: 2px solid #ffe600 !important;
    z-index: 10 !important;
}

@keyframes brodice-gateBlink {
    0% {
        filter: brightness(1) drop-shadow(0 0 2px #ffe600);
        transform: scale(1);
    }

    100% {
        filter: brightness(1.6) drop-shadow(0 0 12px #ffe600);
        transform: scale(1.04);
    }
}

/* THANH SỐ DƯ (BALANCE) NGAY DƯỚI TIMER BOX */
.brodice-balance-box {
    position: absolute;
    top: 75px;
    left: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.65);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #ffe600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

.brodice-balance-label {
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: 8px;
    color: #38bdf8;
    text-shadow: 1px 1px 0px #000;
    font-weight: bold;
}

.brodice-balance-value {
    font-family: 'DePixel Breit', monospace, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: #ffe600;
    text-shadow: 1px 1px 0px #000;
}

/* ================= HIỆU ỨNG TIỀN BAY (FLYING COINS) ================= */
.brodice-flying-coin {
    position: fixed;
    width: 22px;
    height: 22px;
    object-fit: contain;
    image-rendering: pixelated;
    pointer-events: none;
    z-index: 9999;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    transition: all 0.7s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Hiệu ứng nảy sáng thanh Balance khi xu chạm vào */
.brodice-balance-bump {
    animation: brodice-balanceBump 0.3s ease-in-out;
}

@keyframes brodice-balanceBump {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
        color: #ffffff !important;
        text-shadow: 0 0 10px #ffe600, 0 0 20px #ffe600 !important;
    }

    100% {
        transform: scale(1);
    }
}

/* ================= CỤM NÚT CHỨC NĂNG BÊN PHẢI (ÂM THANH & LỊCH SỬ) ================= */
.brodice-action-buttons-box {
    position: absolute;
    right: 8px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.brodice-action-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border: 1.5px solid #38bdf8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    transition: transform 0.1s ease, filter 0.1s ease, border-color 0.1s ease;
}

    .brodice-action-btn:hover {
        filter: brightness(1.2);
        border-color: #ffe600;
    }

    .brodice-action-btn:active {
        transform: scale(0.92);
    }

.brodice-action-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: pixelated;
}


/* ==========================================================================
   BRODICE HOW-TO-PLAY CONTENT & SCROLLBAR STYLES
   ========================================================================== */
 
/* MAIN CONTENT WRAPPER WITH SCROLLBAR */
.brodice-howtoplay-content-wrapper {
    font-family: 'DePixel Breit', monospace, sans-serif;
    color: #e2e8f0;
    font-size: 10px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px #000000;
    /* SCROLL CONFIGURATION */
    max-height: 380px; /* Maximum height limit inside the Modal */
    overflow-y: auto; /* Enables vertical scrollbar when overflowing */
    padding-right: 8px; /* Prevents content from overlapping the scrollbar */
    box-sizing: border-box;
    text-align: left;
}

    /* HEADINGS */
    .brodice-howtoplay-content-wrapper h2 {
        font-size: 12px;
        color: #facc15; /* Pixel Yellow */
        margin: 14px 0 6px 0;
        font-weight: bold;
        border-bottom: 1px dashed rgba(250, 204, 21, 0.35);
        padding-bottom: 4px;
        text-transform: uppercase;
    }

        .brodice-howtoplay-content-wrapper h2:first-child {
            margin-top: 0;
        }

    .brodice-howtoplay-content-wrapper h3 {
        font-size: 10.5px;
        color: #38bdf8; /* Cyan */
        margin: 10px 0 4px 0;
        font-weight: bold;
    }

    /* PARAGRAPHS & TEXT */
    .brodice-howtoplay-content-wrapper p {
        margin: 4px 0 8px 0;
        color: #cbd5e1;
        font-size: 9.5px;
    }

    .brodice-howtoplay-content-wrapper strong {
        color: #ffffff;
        font-weight: bold;
    }

    .brodice-howtoplay-content-wrapper em {
        color: #94a3b8;
        font-style: italic;
    }

    /* LISTS */
    .brodice-howtoplay-content-wrapper ul,
    .brodice-howtoplay-content-wrapper ol {
        margin: 4px 0 10px 0;
        padding-left: 16px;
    }

    .brodice-howtoplay-content-wrapper li {
        margin-bottom: 6px;
        font-size: 9.5px;
        color: #cbd5e1;
    }

/* RESPONSIVE PAYTABLE STYLES */
.brodice-table-responsive {
    overflow-x: auto;
    margin: 10px 0;
}

.brodice-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
}

    .brodice-guide-table th {
        background: #1e293b;
        color: #38bdf8;
        padding: 6px 4px;
        border: 1px solid #334155;
        font-weight: bold;
    }

    .brodice-guide-table td {
        padding: 5px 4px;
        border: 1px solid #334155;
        color: #f1f5f9;
    }

.brodice-multiplier-highlight {
    color: #facc15;
    font-weight: bold;
}

/* BLOCKQUOTES & NOTES */
.brodice-howtoplay-content-wrapper blockquote {
    background: rgba(15, 23, 42, 0.85);
    border-left: 3px solid #facc15;
    margin: 10px 0;
    padding: 8px 10px;
    border-radius: 0 6px 6px 0;
    color: #fef08a;
    font-size: 9px;
}

    .brodice-howtoplay-content-wrapper blockquote p {
        margin: 0;
        color: #fef08a;
        font-size: 9px;
    }

/* HORIZONTAL RULER */
.brodice-howtoplay-content-wrapper hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 12px 0;
}

/* ==========================================================================
   CUSTOM PIXEL GAMING SCROLLBAR
   ========================================================================== */
.brodice-howtoplay-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.brodice-howtoplay-content-wrapper::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
}

.brodice-howtoplay-content-wrapper::-webkit-scrollbar-thumb {
    background: #00f0ff;
    border-radius: 4px;
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
}

    .brodice-howtoplay-content-wrapper::-webkit-scrollbar-thumb:hover {
        background: #facc15;
        box-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
    }