body {
    margin: 0;
    padding: 0;
    background: #0a1e1e;
}

.table {
    position: relative;
    width: 1300px;
    margin: 20px auto;
    transform: perspective(1000px) rotateX(32deg);
    transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
}

.table.focused {
    margin: 0 auto;
    transform: perspective(1000px) rotateX(44deg) scale(2) translateY(4%);
}

.table-image-container {
    height: 100%;
}

.table-image {
    display: block;
    width: 100%;
    height: 100%;
    clip-path: inset(14% 5% 7% 5% round 184px);
}

.hotspot {
    transform: translateZ(0);
    /* Force hardware acceleration */
    will-change: transform;
    /* Optimize for transform changes */
    z-index: 1000;
    position: absolute;
    background: rgba(0, 0, 0, 0);
    border: 0.5px solid rgb(218 197 86 / 58%);
    box-shadow: none;
    transition: outline-color 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    left: var(--left);
    top: var(--top);
    width: var(--width);
    height: var(--height);
}

.hotspot-left {
    border-left: none;
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}

.hotspot-right {
    border-right: none;
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}

.hotspot.bottom-middle {
    border-bottom: none;
}

/* Only apply hover effects when table is focused */
.table.focused .hotspot-left:active {
    background: linear-gradient(to left, rgba(0, 255, 255, 0.6), rgba(0, 255, 255, 0));
    /* Remove or reduce the box-shadow */
    /* box-shadow: 4px 0 5px rgba(0, 255, 255, 0.55); */
}

.table.focused .hotspot-right:active {
    background: linear-gradient(to right, rgba(0, 255, 255, 0.6), rgba(0, 255, 255, 0));
    /* Remove or reduce the box-shadow */
    /* box-shadow: -4px 0 5px rgba(0, 255, 255, 0.55); */
}

.table.focused .diagonal-left:active {
    clip-path: polygon(0% 0%, 100% 0%, 98% 100%, 0% 100%);
    filter: drop-shadow(4px 0 5px rgba(0, 255, 255, 0.55));
}

.table.focused .diagonal-right:active {
    filter: drop-shadow(-4px 0 5px rgba(0, 255, 255, 0.55));
}

.hotspot.bottom-middle:active {
    background: linear-gradient(to bottom, rgba(0, 255, 255, 0.6), rgba(0, 255, 255, 0));
}

@media (hover: hover) and (pointer: fine) {
    .table.focused .hotspot-left:hover {
        background: linear-gradient(to left, rgba(0, 255, 255, 0.6), rgba(0, 255, 255, 0));
        /* Remove or reduce the box-shadow */
        /* box-shadow: 4px 0 5px rgba(0, 255, 255, 0.55); */
    }

    .table.focused .hotspot-right:hover {
        background: linear-gradient(to right, rgba(0, 255, 255, 0.6), rgba(0, 255, 255, 0));
        /* Remove or reduce the box-shadow */
        /* box-shadow: -4px 0 5px rgba(0, 255, 255, 0.55); */
    }

    .table.focused .diagonal-left:hover {
        clip-path: polygon(0% 0%, 100% 0%, 98% 100%, 0% 100%);
        filter: drop-shadow(4px 0 5px rgba(0, 255, 255, 0.55));
    }

    .table.focused .diagonal-right:hover {
        filter: drop-shadow(-4px 0 5px rgba(0, 255, 255, 0.55));
    }

    .hotspot.bottom-middle:hover {
        background: linear-gradient(to bottom, rgba(0, 255, 255, 0.6), rgba(0, 255, 255, 0));
    }
}

.hotspot::after {
    position: absolute;
    left: 50%;
    top: -1.8em;
    transform: translateX(-50%);
    padding: 2px 8px;
    font: 600 12px/1.6 system-ui, sans-serif;
    color: #e9fafa;
    background: rgba(0, 0, 0, 0.55);
    /* border: 1px solid rgba(0, 255, 255, 0.35); */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    white-space: nowrap;
    /* Prevent interference with parent cursor */
    z-index: -1;
}

.table.focused .hotspot:active::after {
    opacity: 1;
}

.bet-info {
    position: absolute;
    top: var(--top);
    left: var(--left);
    width: var(--width);
    height: var(--height);
    color: #e9fafa;
    pointer-events: none;
    /* Prevent interference with hotspot cursor */
}

.bet-info p {
    font-size: 50%;
    font-weight: bold;
    text-align: center;
}

.bet-info.upper-left p,
.bet-info.upper-right p {
    margin-top: 5%;
}

.bet-info.middle-right p,
.bet-info.middle-left p {
    margin-top: 1%;
}

.bet-info.middle-left p,
.bet-info.middle-right p {
    margin-left: 18%;
}

.chips-container-base {
    z-index: 1000;
    position: absolute;
    top: var(--top);
    left: var(--left);
    width: var(--width);
    height: var(--height);
}

.placed-chips {
    position: absolute;
    pointer-events: none;
    left: var(--left);
    top: var(--top);
    width: var(--width);
    height: var(--height);
    z-index: 500;
}

.placed-chips.bottom-right {
    right: 35%;
}

.placed-chips.bottom-left {
    right: 19%;
}

.placed-chips.middle-right {
    right: 18%;
}

.placed-chips.middle-left {
    right: -17%;
}

.placed-chips.upper-left {
    right: 7%;
    bottom: 12%;
}

.placed-chips.upper-right {
    right: -13%;
    bottom: 32%;
}

.placed-chips .chips-stack {
    transform: scale(0.6);
    transform-origin: bottom right;
}

/* Animation for sliding chips */
.animating-chip {
    pointer-events: none;
}

@keyframes slideChip {
    0% {
        left: var(--start-left);
        top: var(--start-top);
    }

    100% {
        left: var(--end-left);
        top: var(--end-top);
    }
}

@keyframes balancePulse {
    0% {
        transform: scale(1);
        color: #e9fafa;
    }

    50% {
        transform: scale(1.2);
        color: #4ade80;
        /* Green color for positive change */
    }

    100% {
        transform: scale(1);
        color: #e9fafa;
    }
}

.table-image-container {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Only apply hover effects when table is focused */
.table.focused .table-image-container {
    cursor: default;
}

/* Return Arrow Button */
.return-arrow-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgb(139 133 26 / 80%);
    border: 2px solid rgba(218, 197, 86, 0.8);
    border-radius: 50%;
    color: #e9fafa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.return-arrow-btn:active {
    background: rgba(218, 197, 86, 0.2);
    border-color: rgba(218, 197, 86, 1);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(218, 197, 86, 0.5);
}

.return-arrow-btn:active {
    transform: scale(0.95);
}

.balance-info p,
.result-info,
.bets-info {
    color: #c0c0c0;
    /* Silver color */
    background: none;
    /* No background */
    font-weight: bold;
    /* Bold text */
    font-size: 55%;
}

.balance-info {
    position: absolute;
    top: 55%;
    left: 30%;
    width: fit-content;
    height: fit-content;
    color: #e9fafa;
    pointer-events: none;
    /* Prevent interference with hotspot cursor */
    transition: transform 0.1s ease;
}

.balance-info.pulse {
    animation: balancePulse 0.8s ease-in-out;
}

.round-info {
    position: absolute;
    top: 52%;
    left: 60%;
    width: fit-content;
    height: fit-content;
    max-width: 10%;
    color: #e9fafa;
    pointer-events: none;

    padding: 2px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    font-family: 'Teko', sans-serif;
}

.round-info p {
    margin: 2px;
}

.round-info p.total {
    margin-top: 4px;
}
/* Bets Info */

/* Disable hover effects when hotspot is disabled, but keep visual appearance normal */
.table.focused .hotspot.disabled:active {
    background: rgba(0, 0, 0, 0) !important;
    border-color: rgb(218 197 86 / 58%) !important;
    box-shadow: none !important;
    filter: none !important;
}

.table.focused .hotspot-left.disabled:active {
    background: rgba(0, 0, 0, 0) !important;
}

.table.focused .hotspot-right.disabled:active {
    background: rgba(0, 0, 0, 0) !important;
}

.table.focused .hotspot-middle.disabled:active {
    background: rgba(0, 0, 0, 0) !important;
}

.hotspot.disabled {
    cursor: default !important;
}

.hotspot.disabled::after {
    display: none !important;
}

/* Small notification styles */
.notification {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(218, 197, 86, 0.6);
    animation: notificationFadeIn 0.3s ease-out, notificationFadeOut 0.3s ease-in 2.2s;
    animation-fill-mode: forwards;
}

.notification.error {
    background: rgba(220, 38, 38, 0.9);
    border-color: rgba(220, 38, 38, 0.8);
}

.notification.success {
    background: rgba(34, 197, 94, 0.9);
    border-color: rgba(34, 197, 94, 0.8);
}

.notification.warning {
    background: rgba(245, 158, 11, 0.9);
    border-color: rgba(245, 158, 11, 0.8);
}

@keyframes notificationFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes notificationFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
}

/* Chip distribution display */
.chip-distribution-display {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.chip-info-btn {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border: none;
    color: #ecf0f1;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chip-info-btn:active {
    background: linear-gradient(145deg, #34495e, #2c3e50);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.chip-info-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Enhanced notification styles for different types */
.notification.success {
    background: linear-gradient(145deg, #27ae60, #2ecc71);
    border-left: 4px solid #16a085;
}

.notification.info {
    background: linear-gradient(145deg, #2980b9, #3498db);
    border-left: 4px solid #1abc9c;
}

.notification.warning {
    background: linear-gradient(145deg, #e67e22, #f39c12);
    border-left: 4px solid #d35400;
}

.notification.error {
    background: linear-gradient(145deg, #c0392b, #e74c3c);
    border-left: 4px solid #8e44ad;
}

/* Simple highlight spot pulse animation */
.hotspot.hilght-spot {
    animation: highlightPulse 3s ease-in-out;
}

@keyframes highlightPulse {

    0%,
    100% {
        background: rgba(255, 215, 0, 0);
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
        border-color: rgb(218 197 86 / 58%);
    }

    50% {
        background: rgba(255, 215, 0, 0.5);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
        border-color: #ffd700;
    }
}

/* NEW BUTTON STYLES - Centered container with Deal button bigger and in the middle */
.buttons-container {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2%;
}

.undo-btn {
    all: unset;
    /* removes all browser default styles */
    display: inline-block;
    /* makes it size to its content (the img) */
    cursor: pointer;
    /* keep pointer for click */
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    width: 20%;
}

.undo-btn img {
    display: block;
    /* removes inline gap */
    transition: transform 0.15s ease, filter 0.15s ease;
}

.undo-btn:active img:not(:disabled) {
    transform: translateY(-2px);
    /* elevation */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    /* soft shadow */
}

@media (hover: hover) and (pointer: fine) {
    .undo-btn:hover img:not(:disabled) {
        transform: translateY(-2px);
        /* elevation */
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        /* soft shadow */
    }
}

.deal-btn {
    background: #71ced46e;
    padding: 0;
    font-size: 1.8%;
    width: 36%;
    height: 60%;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateZ(0);
    will-change: transform;
}

.deal-btn:active:not(.disabled) {
    transform: scale(1.08);
}

@media (hover: hover) and (pointer: fine) {
    .deal-btn:hover:not(.disabled) {
        transform: scale(1.08);
    }
}

.deal-btn.disabled {
    cursor: not-allowed;
    background: transparent;
}

.bet-return-btn {
    all: unset;
    /* removes all browser default styles */
    display: inline-block;
    /* makes it size to its content (the img) */
    cursor: pointer;
    /* keep pointer for click */
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    width: 20%;
}

.bet-return-btn img {
    display: block;
    /* removes inline gap */
    transition: transform 0.15s ease, filter 0.15s ease;
}

.bet-return-btn:active img:not(:disabled) {
    transform: translateY(-2px);
    /* elevation */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    /* soft shadow */
}

@media (hover: hover) and (pointer: fine) {
    .bet-return-btn:hover img:not(:disabled) {
        transform: translateY(-2px);
        /* elevation */
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        /* soft shadow */
    }
}

/* Loading spinner for deal button */
.loading-spinner {
    position: absolute;
    top: 28%;
    left: 29%;
    width: 40%;
    height: 54%;
    aspect-ratio: 1 / 1;
    /* force circle */
    border: 2px solid #489596;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

.loading-spinner-img {
    height: 50%;
    width: 50%;
    position: absolute;
    top: 25%;
    left: 25%;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.deal-btn.loading {
    pointer-events: none;
    background: transparent;
}

.deal-btn-img {
    position: relative;
    display: inline-block;
    /* shrink to fit */
    width: 100%;
    height: 100%;
}

.deal-btn-img.cards img {
    display: block;
    /* base card image */
    width: 100%;
    height: auto;
    margin-top: -5%;
    position: absolute;
    width: 29%;
    /* size of circle relative to cards */
    height: auto;
    pointer-events: none;
}

.deal-btn-img.play img {
    display: block;
    width: 100%;
    height: 100%;
    margin-top: -5%;
    position: absolute;
    width: 29%;
    /* size of circle relative to cards */
    height: auto;
    pointer-events: none;
}

.silence-btn {
    position: absolute;
    left: 10px;
    top: 2%;
    width: 24px;
    height: 20px;
    z-index: 100000;
    background: rgb(193, 191, 191);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.silence-btn img {
    width: 100%;
    height: 100%;
}

.volume-control {
    position: absolute;
    left: 40px;
    top: 2%;
    width: 70px;
    height: 20px;
    z-index: 100000;
    display: flex;
    align-items: center;
    background: rgba(128, 128, 128, 0.8); /* Gray background */
    border-radius: 10px;
}

.volume-control-input {
    width: 100%;
    height: 20px;
    background: transparent;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-control-input::-webkit-slider-track {
    background: #666; /* Gray track */
    height: 4px;
    border-radius: 2px;
}

.volume-control-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #000; /* Black thumb */
    height: 16px;
    width: 16px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-control-input::-webkit-slider-thumb:hover {
    background: #333;
    transform: scale(1.1);
}

.volume-control-input::-webkit-slider-thumb:active {
    background: #000;
    transform: scale(1.2);
}

/* Firefox styles */
.volume-control-input::-moz-range-track {
    background: #666; /* Gray track */
    height: 4px;
    border-radius: 2px;
    border: none;
}

.volume-control-input::-moz-range-thumb {
    background: #000; /* Black thumb */
    height: 16px;
    width: 16px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-control-input::-moz-range-thumb:hover {
    background: #333;
    transform: scale(1.1);
}

.volume-control-input::-moz-range-thumb:active {
    background: #000;
    transform: scale(1.2);
}