* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    background: #120017;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    align-items: center;
    height: 100vh;
    padding: 10px
}

/* ====== container ====== */
.mp-wrap {
    width: auto;
    max-width: 100%;
    background: linear-gradient(180deg, #ff0000b8, #520909);
    border-radius: 22px;
    padding: 20px;
    border: 0px solid rgba(255, 200, 255, 0.06);
    position: relative;
    }

.mp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px
}

.mp-title {
    font-size: 48px;
    font-weight: 900;
    color: #ffd86b;
    text-shadow: 0 4px 18px rgba(255, 180, 0, .25)
}

.mp-coin {
    background: linear-gradient(90deg, #2b0048, #4d006f);
    padding: 10px 18px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
    color: #ffe36e
}

.mp-frame {
    background: linear-gradient(180deg, #000000, #000000);
    border-radius: 16px;
    padding: 5px;
    border: 4px solid #680101;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, .6);
    display: flex;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 12px;
}

.mp-row-wrap {
    /* background: linear-gradient(180deg, #872727, #a02727); */
    border-radius: 14px;
    padding: 10px 0;
    border: 2px solid rgba(255, 255, 255, 0.03);
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.mp-row-wrap.win-highlight {
    border: 2px solid #ffd700;
    box-shadow: 0 0 16px 6px #ffd700a0;
    position: relative;
}

.mp-reel {
    display: inline-grid;
    width: 100%;
    max-width: 880px;
    justify-content: space-between;
    padding: 0;
    transform-style: preserve-3d;
    transition: transform 3s cubic-bezier(.25,.8,.25,1);
    height: 360px !important;   
    overflow: hidden !important;
    position: relative;
    background: #ffffff;
    border-radius: 5px;
}

.mp-cell {
    width: 150px;
    height: 110px;
    border-radius: 12px;
    /* background: #fff; */
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
  
    margin-bottom: 12px;
}

.mp-cell.win {
    box-shadow: 0px 0px 23px rgba(255, 200, 0, .6);
    border-color: #ffd700;
    transform: scale(1.06)
}

.mp-cell .small {
    position: absolute;
    left: 8px;
    top: 8px;
    font-size: 14px;
    color: #333;
    opacity: .9
}

.mp-row-wrap::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    height: 76px;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(255, 255, 255, .06) inset;
    pointer-events: none;
}

.mp-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    justify-content: space-between
}

.spin-area {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-right: 15px;
}

.spin-btn {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff7a00, #ff2b00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    border: 6px solid #ffd500;
    box-shadow: 0 14px 40px rgba(255, 120, 0, .25);
    cursor: pointer;
    transform-origin: center;
}

.spin-btn:active {
    transform: scale(.96)
}

.mult-strip {
    display: flex;
    gap: 8px;
    align-items: center
}

.mp-info {
    text-align: center;
    margin-top: 12px;
    align-items: center;
    font-size: 14px;
    color: #eaeaea
}

.history {
    max-height: 120px;
    overflow: auto;
    padding: 8px;
    background: rgba(0, 0, 0, .22);
    border-radius: 8px;
    font-size: 13px;
    color: #fff
}

#confetti-canvas {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 9999
}



.admin-panel {
    position: fixed;
    right: 16px;
    top: 80px;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    z-index: 999;
}

.admin-panel input {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.wps-btn {
    padding: 10px 14px;
    background: #1f6feb;
    color: #fff;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}
/* new spin  */
.spin-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    background: radial-gradient(circle at 30% 30%, #ff6a6a, #d40000 70%);
    box-shadow:
        0px 10px 20px rgba(0, 0, 0, 0.5),
        inset -5px -5px 15px rgba(0, 0, 0, 0.4),
        inset 5px 5px 15px rgba(255, 255, 255, 0.3);
    position: relative;
}

.spin-btn::before {
    content: "";
    position: absolute;
    top: 28%;
    left: 25%;
    width: 45%;
    height: 45%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
    border-radius: 50%;
    transform: rotate(-20deg);
}
.mp-cell .card-thumb{
  width: 100%;
  height: 100%;
}
.mp-cell .label img{
  width: 100% !important;
}

#winPopup , #hetluoc_quay{
    position: fixed;  top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
.win-popup-dev-wow{
    background: #fff;
    color: #111;
    padding: 20px 25px;
    width: 300px;
    border-radius: 12px;
    text-align: center;
    animation: popupShow 0.3s ease;
}
.chuc-mung-cmm{
    font-size: 24px; margin-bottom: 10px;
}
#winPrizeText{
    font-size: 20px; margin-bottom: 15px; font-weight: bold;
}
#closeWinPopup , #closeHetluocPopup{
    padding: 8px 16px;
    background: #007BFF;
    color: #fff;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

@keyframes popupShow {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
#winPrizeText img{
    width: 100%;
    height: 100%;
}


.spin-btn:active {
    transform: scale(0.92);
}

.power-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 rgba(255, 200, 0, 0.3);
    transform: scale(1);
    opacity: 0;
    transition: 0.15s;
}

.spin-power {
    opacity: 1 !important;
    border-color: rgba(255, 230, 150, 0.7) !important;
    box-shadow: 0 0 25px 10px rgba(255, 200, 0, 0.9) !important;
}
@media (max-width:980px) {
    .mp-cell {
        font-size: 22px
    }
}


@media (max-width:768px) {
     .mp-row-wrap , .mp-reel{
        padding: 0px !important;
    }
    .mp-cell{
        width: auto;
        height: 100px;
    }
    .mp-controls{
        flex-flow: column-reverse;
        align-items: normal;
    }
    .mp-cell .label{
        width: 100%;
    }
    #kiotInput{
        width: 160px;
    }
    #kiotSubmit{
        font-size: 12px;
    }
    /* #slot-trigger{
        display: none;

    }
    #spinBtn{
        display: block !important;
    } */

    #slot-trigger {
        right: 0px !important;
        bottom: 28%;
        top: 28px;
    }
    .custom-content{
        display: flex;
        gap: 20px;
        justify-content: center;
        align-items: center;
        width: max-content;
    }
    .spin-area{
        padding-left: 12px;
        margin-right: 0px;
        justify-content: space-between;
    }
}

@media (min-width:768px) {
  body{
    display: flex;
    justify-content: center;
  }
  .cbw-title{
    font-size: 60px;
  }
  .cbw-amount{
    font-size: 45px;
  }
}
#hetluoc_quay .chuc-mung-cmm{
    margin-bottom: 25px;
}
#closeHetluocPopup:hover{
    background: #b80107;
}


/* new content */


#slot-trigger {
    cursor: pointer;
    height: 85px;
    right: 0;
    position: relative;
    width: 37px;
}

#slot-trigger div {
    position: absolute;
    top: 0;
}

#slot-trigger .ring1 {
    background: #282828;
    background: -moz-linear-gradient(top, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #282828), color-stop(14%, #959595), color-stop(37%, #d1d1d1), color-stop(49%, #bababa), color-stop(67%, #959595), color-stop(100%, #212121));
    background: -webkit-linear-gradient(top, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    background: -o-linear-gradient(top, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    background: -ms-linear-gradient(top, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    background: linear-gradient(to bottom, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    -moz-border-radius: 0 2px 2px 0;
    -webkit-border-radius: 0 2px 2px 0;
    border-radius: 0 2px 2px 0;
    -moz-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8);
    -webkit-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8);
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8);
    height: 100%;
    left: -9px;
    width: 16px;
    z-index: 2;
}

#slot-trigger .ring1 .shadow {
    background: -moz-linear-gradient(top, rgba(149, 149, 149, 0.2) 0%, rgba(13, 13, 13, 0.18) 46%, rgba(1, 1, 1, 0.18) 50%, rgba(10, 10, 10, 0.18) 53%, rgba(78, 78, 78, 0.17) 76%, rgba(56, 56, 56, 0.16) 87%, rgba(27, 27, 27, 0.15) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(149, 149, 149, 0.2)), color-stop(46%, rgba(13, 13, 13, 0.18)), color-stop(50%, rgba(1, 1, 1, 0.18)), color-stop(53%, rgba(10, 10, 10, 0.18)), color-stop(76%, rgba(78, 78, 78, 0.17)), color-stop(87%, rgba(56, 56, 56, 0.16)), color-stop(100%, rgba(27, 27, 27, 0.15)));
    background: -webkit-linear-gradient(top, rgba(149, 149, 149, 0.2) 0%, rgba(13, 13, 13, 0.18) 46%, rgba(1, 1, 1, 0.18) 50%, rgba(10, 10, 10, 0.18) 53%, rgba(78, 78, 78, 0.17) 76%, rgba(56, 56, 56, 0.16) 87%, rgba(27, 27, 27, 0.15) 100%);
    background: -o-linear-gradient(top, rgba(149, 149, 149, 0.2) 0%, rgba(13, 13, 13, 0.18) 46%, rgba(1, 1, 1, 0.18) 50%, rgba(10, 10, 10, 0.18) 53%, rgba(78, 78, 78, 0.17) 76%, rgba(56, 56, 56, 0.16) 87%, rgba(27, 27, 27, 0.15) 100%);
    background: -ms-linear-gradient(top, rgba(149, 149, 149, 0.2) 0%, rgba(13, 13, 13, 0.18) 46%, rgba(1, 1, 1, 0.18) 50%, rgba(10, 10, 10, 0.18) 53%, rgba(78, 78, 78, 0.17) 76%, rgba(56, 56, 56, 0.16) 87%, rgba(27, 27, 27, 0.15) 100%);
    background: linear-gradient(to bottom, rgba(149, 149, 149, 0.2) 0%, rgba(13, 13, 13, 0.18) 46%, rgba(1, 1, 1, 0.18) 50%, rgba(10, 10, 10, 0.18) 53%, rgba(78, 78, 78, 0.17) 76%, rgba(56, 56, 56, 0.16) 87%, rgba(27, 27, 27, 0.15) 100%);
    -moz-border-radius: 0 2px 2px 0;
    -webkit-border-radius: 0 2px 2px 0;
    border-radius: 0 2px 2px 0;
    height: 50%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 10px;
    z-index: 1;
}

#slot-trigger .ring2 {
    background: #282828;
    background: -moz-linear-gradient(top, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #282828), color-stop(14%, #959595), color-stop(37%, #d1d1d1), color-stop(49%, #bababa), color-stop(67%, #959595), color-stop(100%, #212121));
    background: -webkit-linear-gradient(top, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    background: -o-linear-gradient(top, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    background: -ms-linear-gradient(top, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    background: linear-gradient(to bottom, #282828 0%, #959595 14%, #d1d1d1 37%, #bababa 49%, #959595 67%, #212121 100%);
    -moz-border-radius: 0 2px 2px 0;
    -webkit-border-radius: 0 2px 2px 0;
    border-radius: 0 2px 2px 0;
    -moz-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8);
    -webkit-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8);
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8);
    height: 80%;
    left: 6px;
    overflow: hidden;
    top: 10%;
    width: 15px;
    z-index: 1;
}

#slot-trigger .ring2 .shadow {
    background: -moz-linear-gradient(top, rgba(149, 149, 149, 0.15) 0%, rgba(13, 13, 13, 0.15) 46%, rgba(1, 1, 1, 0.15) 50%, rgba(10, 10, 10, 0.15) 53%, rgba(78, 78, 78, 0.15) 76%, rgba(56, 56, 56, 0.15) 87%, rgba(27, 27, 27, 0.15) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(149, 149, 149, 0.15)), color-stop(46%, rgba(13, 13, 13, 0.15)), color-stop(50%, rgba(1, 1, 1, 0.15)), color-stop(53%, rgba(10, 10, 10, 0.15)), color-stop(76%, rgba(78, 78, 78, 0.15)), color-stop(87%, rgba(56, 56, 56, 0.15)), color-stop(100%, rgba(27, 27, 27, 0.15)));
    background: -webkit-linear-gradient(top, rgba(149, 149, 149, 0.15) 0%, rgba(13, 13, 13, 0.15) 46%, rgba(1, 1, 1, 0.15) 50%, rgba(10, 10, 10, 0.15) 53%, rgba(78, 78, 78, 0.15) 76%, rgba(56, 56, 56, 0.15) 87%, rgba(27, 27, 27, 0.15) 100%);
    background: -o-linear-gradient(top, rgba(149, 149, 149, 0.15) 0%, rgba(13, 13, 13, 0.15) 46%, rgba(1, 1, 1, 0.15) 50%, rgba(10, 10, 10, 0.15) 53%, rgba(78, 78, 78, 0.15) 76%, rgba(56, 56, 56, 0.15) 87%, rgba(27, 27, 27, 0.15) 100%);
    background: -ms-linear-gradient(top, rgba(149, 149, 149, 0.15) 0%, rgba(13, 13, 13, 0.15) 46%, rgba(1, 1, 1, 0.15) 50%, rgba(10, 10, 10, 0.15) 53%, rgba(78, 78, 78, 0.15) 76%, rgba(56, 56, 56, 0.15) 87%, rgba(27, 27, 27, 0.15) 100%);
    background: linear-gradient(to bottom, rgba(149, 149, 149, 0.15) 0%, rgba(13, 13, 13, 0.15) 46%, rgba(1, 1, 1, 0.15) 50%, rgba(10, 10, 10, 0.15) 53%, rgba(78, 78, 78, 0.15) 76%, rgba(56, 56, 56, 0.15) 87%, rgba(27, 27, 27, 0.15) 100%);
    -moz-border-radius: 0 2px 2px 0;
    -webkit-border-radius: 0 2px 2px 0;
    border-radius: 0 2px 2px 0;
    height: 50%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 10px;
    z-index: 1;
}

#slot-trigger .arm {
    background: #0d0d0d;
    background: -moz-linear-gradient(left, #0d0d0d 0%, #4e4e4e 47%, #383838 87%, #1b1b1b 100%);
    background: -webkit-gradient(linear, left top, right top, color-stop(0%, #0d0d0d), color-stop(47%, #4e4e4e), color-stop(87%, #383838), color-stop(100%, #1b1b1b));
    background: -webkit-linear-gradient(left, #0d0d0d 0%, #4e4e4e 47%, #383838 87%, #1b1b1b 100%);
    background: -o-linear-gradient(left, #0d0d0d 0%, #4e4e4e 47%, #383838 87%, #1b1b1b 100%);
    background: -ms-linear-gradient(left, #0d0d0d 0%, #4e4e4e 47%, #383838 87%, #1b1b1b 100%);
    background: linear-gradient(to right, #0d0d0d 0%, #4e4e4e 47%, #383838 87%, #1b1b1b 100%);
    -moz-border-radius: 0 0 4px 4px;
    -webkit-border-radius: 0 0 4px 4px;
    border-radius: 0 0 4px 4px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
    height: 50%;
    left: 10px;
    top: -25px;
    width: 6px;
    z-index: 3;
    overflow: visible !important;
}

#slot-trigger .arm .knob {
    background: #ff6363;
    background: -moz-radial-gradient(center, ellipse cover, #ff6363 0%, #cf0404 100%);
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #ff6363), color-stop(100%, #cf0404));
    background: -webkit-radial-gradient(center, ellipse cover, #ff6363 0%, #cf0404 100%);
    background: -o-radial-gradient(center, ellipse cover, #ff6363 0%, #cf0404 100%);
    background: -ms-radial-gradient(center, ellipse cover, #ff6363 0%, #cf0404 100%);
    background: radial-gradient(ellipse at center, #ff6363 0%, #cf0404 100%);
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    height: 16px;
    left: -7px;
    top: -15px;
    width: 20px;
    z-index: 4;
}

#slot-trigger .arm-shadow {
    background: #000;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    bottom: 66px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    height: 6px;
    left: 9px;
    top: auto;
    width: 8px;
    z-index: 2;
}

#slotTrigger.slotTriggerDown {
    background-position: 0px -17px;
}

#slotTrigger.slotTriggerDisabled {
    background-position: 0px -34px;
    display: none;
}

.slotSpinAnimation {
    display: none;
}


.mp-controls{
    padding: 20px;
    border: 15px solid #000;
    border-radius: 20px;
}
#kiotInput{
outline: none;
border: none;
}



@keyframes slide {
    0% { transform: translateY(0); }
    100% { transform: translateY(-180px); }
}
.mp-cell {
    animation: cellSlide 0.09s linear;
}
@keyframes cellSlide {
    0%   { transform: translateY(-70%);}
    100% { transform: translateY(0);}
}
.mp-cell img {
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.4));
    transform: translateZ(0);
}
/* .mp-reel {
    will-change: transform;
    transform-style: preserve-3d;
} */


/* ===========================
   POPUP BIG WIN 
   ===========================*/

   .cbw-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.65);
    z-index: 999999;
}

.cbw-wrapper.hidden {
    display: none;
}

/* --- KHUNG HÌNH BIG WIN (hình sẽ được gán bằng JS) --- */
.cbw-frame {
    position: absolute;
    width: 90vw;
    max-width: 500px;
    height: 55vh;
    border-radius: 20px;
    background: url('../images/BIG-WIN.jpg') center/cover no-repeat;
    filter: drop-shadow(0 0 25px gold);
    z-index: 1;
    animation: bigWinPop 0.6s ease-out forwards;
}

/* --- CHỮ BIG WIN --- */
.cbw-title {
    position: relative;
    z-index: 2;
    font-size: 75px;
    font-weight: 900;
    color: #ffe29e;
    text-shadow: 0 0 10px #ffcf5b, 0 0 30px #ffbb00;
    margin-top: -20px;
    animation: bigWinPop 0.8s ease-out infinite;
}

@keyframes bigWinPop {
    0% { transform: scale(0.2); opacity: 0; }
    60% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); }
}

/* --- SỐ TIỀN --- */
.cbw-amount {
    position: relative;
    z-index: 3;
    font-size: 55px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 15px gold, 0 0 35px orange;
    animation: amountPulse 1s infinite;
    margin-top: 15px;
}

@keyframes amountPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* --- VÀNG RƠI --- */
.cbw-coins {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 5;
}

.coin {
    width: 42px;
    height: 42px;
    background-image: url('../images/coin.png');
    background-size: cover;
    position: absolute;
    animation: coinFall linear infinite;
    opacity: 0.9;
}

@keyframes coinFall {
    0% { transform: translateY(-120px) rotate(0deg); }
    100% { transform: translateY(110vh) rotate(360deg); }
}
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-thumb {
  background: red; 
  border-radius: 10px;
}