﻿.roulette-page {
    display: flex;
    width: 85vw;
    height: 60vh;
    margin: 5vh auto;
    position: relative;
}

.carpet-container {
    flex: 2;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.carpet {
    margin-top: 10%;
    width: 90%;
    height: auto;
    object-fit: contain;
}

.wheel-container {
    top: 10%;
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
}

.roulette-support {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 130%;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: -1;
}

.roulette-wheel {
    width: 100%;
    height: auto;
    transition: transform 5s ease-out;
    transform-origin: 50% 50%;
    z-index: 10;
}

.ball-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    pointer-events: none;
    z-index: 2;
}

.roulette-ball {
    position: absolute;
    top: -5%;
    left: 50%;
    width: 5%;
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: top 0.5s ease-in, opacity 0.3s ease;
}

@keyframes spin-ball {
    from { transform: rotate(5deg); }
    to   { transform: rotate(-355deg); }
}

.ball-wrapper.animate {
    animation: spin-ball 5s ease-out forwards;
}

.roulette-ball.fall {
    top: 16%;
}

.result-message {
    position: absolute;
    bottom: -3rem;
    width: 100%;
    right: 20%;
    top: 110%;
    text-align: center;
    font-weight: bold;
    font-size: 250%;
    font-family: "Jersey 10";
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.logo {
    position: absolute;
    width: 30%;
    left: 15%;
    bottom:89%;
    height: auto;
    object-fit: contain;
    margin-bottom: 1rem;  
}

#cancel-button {
    position: absolute;
    bottom: 4%;
    left: 41%;
    width: 4vw;
    height: 2.4vw;
    background-image: url('../assets/Roulette/ui/cancel_button.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-color: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

#cancel-button:hover {
    background-image: url('../assets/Roulette/ui/cancel_button_hover.png');
}

#cancel-button:active {
    background-image: url('../assets/Roulette/ui/cancel_button_pressed.png');
}

#play-button {
    position: absolute;
    bottom: 4.5%;
    left: 68.3%;
    width: 6vw;
    height: 3vw;
    background-image: url('../assets/Roulette/ui/roulette_button.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-color: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

#play-button:hover {
    background-image: url('../assets/Roulette/ui/roulette_button_hover.png');
}

#play-button:active {
    background-image: url('../assets/Roulette/ui/roulette_button_pressed.png');
}

.betting-board {
    position: relative;
    width: 90%;
    margin: 0 auto;
}

.betting-board .carpet {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.bet-wrapper {
    display: inline-block;
    position: relative;
}

.button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.chip-button.selected {
    outline: 3px solid gold;
    outline-offset: 2px;
}

.placed-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3vw;
    height: auto;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 6;
}

.info {
    position: absolute;
    transform: translateX(-50%);
    font-family: "Jersey 10", cursive;
    font-size: 1.2vw;
    color: #ff0000;
    z-index: 10;
}

#bet-text {
    color: rgb(11, 15, 23);
    bottom: 20%;
    left: 70.5%;
}

#bet-amount {
    bottom: 15.5%;
    left: 73%;
}

#gain-text {
    color: rgb(11, 15, 23);
    bottom: 10%;
    left: 13%;
}

#gain-amount {
    bottom: 5.5%;
    left: 16.5%;
}

#money-text {
    color: rgb(11, 15, 23);
    bottom: 20%;
    left: 14.5%;
}

#money-amount {
    bottom: 15.5%;
    left: 16.5%;
}

/* ─────────────────────────────────────────────────────────────────── */
/* HORRORS BEYOND HUMAN COMPREHENSION BELOW, PROCEED WITH CAUTION */
/* ─────────────────────────────────────────────────────────────────── */

.bet-button {
    position: absolute;
    width: 5%;
    height: auto;
    aspect-ratio: 1 / 1;
    background-color: transparent;
    border-radius: 0;
    border: none;
    font-family: "Jersey 10";
    color: #fff;
    font-size: 2.2vw;
    text-align: center;
    line-height: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
    pointer-events: auto;
    z-index: 5;
}

.bet-button:hover {
    background-color: rgba(255,255,255,0.3);
}

.bet-0 {
    top:  32.7%;
    left: 4%;
}

.bet-3 {
    top: 22.2%;
    left: 10.5%;
}
.bet-2 {
    top: 32.8%;
    left: 10.5%;
}
.bet-1 {
    top: 43.3%;
    left: 10.5%;
}

.bet-6 {
    top: 22.2%;
    left: 16.3%;
}
.bet-5 {
    top: 32.7%;
    left: 16.3%;
}
.bet-4 {
    top: 43.3%;
    left: 16.3%;
}

.bet-9 {
    top: 22.2%;
    left: 22%;
}
.bet-8 {
    top: 32.7%;
    left: 22%;
}
.bet-7 {
    top: 43.3%;
    left: 22%;
}

.bet-12 {
    top: 22.2%;
    left: 27.7%;
}
.bet-11 {
    top: 32.7%;
    left: 27.7%;
}
.bet-10 {
    top: 43.3%;
    left: 27.7%;
}

.bet-15 {
    top: 22.2%;
    left: 33.5%;
}
.bet-14 {
    top: 32.7%;
    left: 33.5%;
}
.bet-13 {
    top: 43.3%;
    left: 33.5%;
}

.bet-18 {
    top: 22.2%;
    left: 39.2%;
}
.bet-17 {
    top: 32.7%;
    left: 39.2%;
}
.bet-16 {
    top: 43.3%;
    left: 39.2%;
}

.bet-21 {
    top: 22.2%;
    left: 45%;
}
.bet-20 {
    top: 32.7%;
    left: 45%;
}
.bet-19 {
    top: 43.3%;
    left: 45%;
}

.bet-24 {
    top: 22.2%;
    left: 50.7%;
}
.bet-23 {
    top: 32.7%;
    left: 50.7%;
}
.bet-22 {
    top: 43.3%;
    left: 50.7%;
}

.bet-27 {
    top: 22.2%;
    left: 56.4%;
}
.bet-26 {
    top: 32.7%;
    left: 56.4%;
}
.bet-25 {
    top: 43.3%;
    left: 56.4%;
}

.bet-30 {
    top: 22.2%;
    left: 62.2%;
}
.bet-29 {
    top: 32.7%;
    left: 62.2%;
}
.bet-28 {
    top: 43.3%;
    left: 62.2%;
}

.bet-33 {
    top: 22.2%;
    left: 68%;
}
.bet-32 {
    top: 32.7%;
    left: 68%;
}
.bet-31 {
    top: 43.3%;
    left: 68%;
}

.bet-36 {
    top: 22.2%;
    left: 73.7%;
}
.bet-35 {
    top: 32.7%;
    left: 73.7%;
}
.bet-34 {
    top: 43.3%;
    left: 73.7%;
}

.bet-row3 {
    font-size: 1.3vw;
    border-radius: 0;
    top:    22.2%;
    left:   79.4%; 
    width:  5.5%; 
    height: auto;
}

.bet-row2 {
    font-size: 1.3vw;
    top:    32.7%;
    left:   79.4%;
    width:  5.5%;
    height: auto;
}

.bet-row1 {
    font-size: 1.3vw;
    top:    43.3%;
    left:   79.4%;
    width:  5.5%;
    height: auto;
}

.bet-dozen1 {
    top:    54.2%;
    left:   10.5%;
    width:  22.4%;
    height: 8.8%;
}

.bet-dozen2 {
    top:    54.2%;
    left:   33.5%;
    width:  22.4%;
    height: 8.8%;
}

.bet-dozen3 {
    top:    54.2%;
    left:   56.3%;
    width:  22.4%;
    height: 8.8%;
}

.bet-low {        /* “1 à 18” */
    font-size: 1.3vw;
    top:    65.3%;
    left:   10.5%;
    width:  7.8%;
    height: 9%;
}

.bet-even {      /* “Pair” */
    font-size: 1.3vw;
    top:    65.3%;
    left:   18.8%;
    width:  7.8%;
    height: 9%;
}

.bet-red {       /* “Rouge” */
    top:    65.3%;
    left:   27.5%;
    width:  16.7%;
    height: 9%;
}

.bet-black {     /* “Noir” */
    top:    65.3%;
    left:   44.8%;
    width:  17%;
    height: 9%;
}

.bet-odd {       /* “Impair” */
    font-size: 1.2vw;
    top:    65.3%;
    left:   62.3%;
    width:  7.9%;
    height: 9%;
}

.bet-high {      /* “19 à 36” */
    font-size: 1.3vw;
    top:    65.3%;
    left:   71%;
    width:  7.8%;
    height: 9%;
}

.chip-1 {
    border-radius: 100%;
    color: #000000;
    font-size: 1.1vw;
    top:    78.5%;
    left:   26%;
    width:  4.5%;
    height: auto;
}
.chip-5 {
    border-radius: 100%;
    font-size: 1.1vw;
    top:    78.5%;
    left:   31.8%;
    width:  4.5%;
    height: auto;
}
.chip-25 {
    border-radius: 100%;
    font-size: 1.1vw;
    top:    78.5%;
    left:   37.6%;
    width:  4.5%;
    height: auto;
}
.chip-50 {
    border-radius: 100%;
    font-size: 1.1vw;
    top:    78.5%;
    left:   43.3%;
    width:  4.5%;
    height: auto;
}
.chip-100 {
    border-radius: 100%;
    font-size: 0.8vw;
    top:    78.5%;
    left:   49%;
    width:  4.5%;
    height: auto;
}
.chip-500 {
    border-radius: 100%;
    font-size: 0.8vw;
    top:    78.5%;
    left:   54.8%;
    width:  4.5%;
    height: auto;
}
.chip-1000 {
    border-radius: 100%;
    font-size: 1.1vw;
    font-weight: bold;
    color:#000000;
    top:    78.5%;
    left:   60.5%;
    width:  4.5%;
    height: auto;
}