/**
 * Game.css - Estilos para Roll Prêmios
 */

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

body {
    font-family: 'Montserrat', sans-serif;
    background-image: url('/images/BG-WEB-JOGAO-at-1.png');
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        background-image: url('/images/BG-mob-JOGAO-at-1.png');
    }
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loader-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

/* Game Container */
.game-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

/* Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 20;
}

.balance-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.balance-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
}

.balance-value {
    font-size: 24px;
    color: #fff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.game-title {
    font-size: 20px;
    color: #fff;
    font-weight: 800;
}

/* Wheel Area */
.wheel-area {
    position: relative;
    margin: 30px 0;
}

.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.wheel-image {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    transform-origin: center center;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s;
}

.spin-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.spin-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.spin-button img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    z-index: 20;
}

.wheel-pointer img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

/* Prize Display */
.prize-display {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    position: relative;
    z-index: 20;
}

.prize-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
    font-weight: 600;
}

.prize-value {
    font-size: 28px;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 168, 150, 0.5);
}

/* Bet Controls */
.bet-controls {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    position: relative;
    z-index: 20;
}

.bet-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}

.bet-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.bet-min,
.bet-max {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.bet-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

.bet-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #00A896;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 168, 150, 0.5);
}

.bet-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #00A896;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 168, 150, 0.5);
    border: none;
}

.bet-value-display {
    text-align: center;
    font-size: 32px;
    color: #fff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Footer */
.game-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    position: relative;
    z-index: 20;
}

.info-button,
.history-button {
    flex: 1;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.info-button:hover,
.history-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #2b2b2b 0%, #151515 100%);
    border: 1px solid rgba(0, 168, 150, 0.25);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.7);
    transition: transform 0.3s;
    /* Scrollbar padrão modal */
    scrollbar-width: thin;
    scrollbar-color: #00A896 rgba(0, 0, 0, 0.2);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #00A896;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #008B8B;
}

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

.modal-header h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    color: #fff;
    line-height: 1.6;
}

.modal-body h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.modal-body ol {
    padding-left: 20px;
    margin: 15px 0;
}

.modal-body li {
    margin: 10px 0;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn.primary {
    background: #00A896;
    color: #fff;
}

.modal-btn.primary:hover {
    background: #008B8B;
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Prize Modal */
.prize-modal .modal-body {
    text-align: center;
}

.prize-animation {
    margin: 30px 0;
}

.prize-amount {
    font-size: 48px;
    color: #00A896;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 168, 150, 0.6);
    animation: prizeGlow 1s ease-in-out infinite;
}

@keyframes prizeGlow {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.prize-multiplier {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
}

.prize-details {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.prize-details p {
    margin: 10px 0;
    font-size: 16px;
}

/* History */
.history-list {
    max-height: 400px;
    overflow-y: auto;
    /* Estilos de scrollbar padrão */
    scrollbar-width: thin;
    scrollbar-color: #00A896 rgba(255, 255, 255, 0.1);
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #00A896;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #008B8B;
}

.history-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
}

.history-multiplier {
    font-size: 20px;
    color: #00A896;
    font-weight: 800;
    margin-bottom: 5px;
}

.history-bet,
.history-prize {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 3px 0;
}

.history-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.empty-history {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 20px;
}

/* Responsivo */
@media (max-width: 768px) {
    .game-container {
        padding: 5px 10px;
    }

    .game-header {
        padding: 8px 15px;
        margin-bottom: 10px;
    }

    .balance-label {
        font-size: 10px;
    }

    .game-title {
        font-size: 16px;
    }

    .balance-value {
        font-size: 20px;
    }

    .wheel-area {
        margin: 15px 0;
    }

    .wheel-container {
        width: 300px;
        height: 300px;
    }

    .spin-button {
        width: 90px;
        height: 90px;
    }

    .prize-display {
        margin-top: 10px;
        padding: 10px;
    }

    .prize-label {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .prize-value {
        font-size: 22px;
    }

    .bet-controls {
        margin: 10px 0;
        padding: 10px 15px;
    }

    .bet-label {
        margin-bottom: 5px;
    }

    .bet-slider-container {
        margin-bottom: 10px;
    }

    .bet-value-display {
        font-size: 22px;
    }

    .game-footer {
        margin-top: 10px;
    }

    .info-button,
    .history-button {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* Roleta Visuals: Lights and Rings */
.wheel-light-behind {
    position: absolute;
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: cover;
    animation: lightBehindScale 600s ease infinite, lightBehindOpacity 5s ease infinite;
    height: 180%;
    left: -40%;
    pointer-events: none;
    top: -40%;
    width: 180%;
    z-index: -1;
}

.wheel-ring,
.wheel-ring-overlay {
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: cover;
    bottom: 0;
    margin: auto;
    pointer-events: none;
    position: absolute;
    right: 0;
    z-index: 3;
}

.wheel-ring {
    height: 100%;
    left: 0;
    top: 0;
    width: 100%;
}

.wheel-lights {
    bottom: 0;
    height: 100%;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 15;
}

.wheel-lights :first-child {
    transform: rotate(-5deg);
}

.wheel-lights :nth-child(2) {
    transform: rotate(31deg);
}

.wheel-lights :nth-child(3) {
    transform: rotate(67deg);
}

.wheel-lights :nth-child(4) {
    transform: rotate(103deg);
}

.wheel-lights :nth-child(5) {
    transform: rotate(139deg);
}

.wheel-lights :nth-child(6) {
    transform: rotate(175deg);
}

.wheel-lights :nth-child(7) {
    transform: rotate(211deg);
}

.wheel-lights :nth-child(8) {
    transform: rotate(247deg);
}

.wheel-lights :nth-child(9) {
    transform: rotate(283deg);
}

.wheel-lights :nth-child(10) {
    transform: rotate(319deg);
}

.wheel-lights :nth-child(11) {
    transform: rotate(5deg);
}

.wheel-lights :nth-child(12) {
    transform: rotate(41deg);
}

.wheel-lights :nth-child(13) {
    transform: rotate(77deg);
}

.wheel-lights :nth-child(14) {
    transform: rotate(113deg);
}

.wheel-lights :nth-child(15) {
    transform: rotate(149deg);
}

.wheel-lights :nth-child(16) {
    transform: rotate(185deg);
}

.wheel-lights :nth-child(17) {
    transform: rotate(221deg);
}

.wheel-lights :nth-child(18) {
    transform: rotate(257deg);
}

.wheel-lights :nth-child(19) {
    transform: rotate(293deg);
}

.wheel-lights :nth-child(20) {
    transform: rotate(90deg);
}

.wheel-lights :nth-child(21) {
    transform: rotate(126deg);
}

.wheel-lights :nth-child(22) {
    transform: rotate(162deg);
}

.wheel-lights :nth-child(23) {
    transform: rotate(198deg);
}

.wheel-lights :nth-child(24) {
    transform: rotate(234deg);
}

.wheel-lights :nth-child(25) {
    transform: rotate(270deg);
}

.wheel-lights :nth-child(26) {
    transform: rotate(306deg);
}

.wheel-lights :nth-child(27) {
    transform: rotate(342deg);
}

.wheel-lights :nth-child(28) {
    transform: rotate(378deg);
}

.wheel-lights :nth-child(29) {
    transform: rotate(414deg);
}

.wheel-lights .light {
    height: 100%;
    position: absolute;
    width: 100%;
}

.wheel-lights .light .light-icon {
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
}

.wheel-lights .light .light-icon.static {
    background-image: url(/images/light-static-wood.png);
    height: 5%;
    left: 47.5%;
    top: .5%;
    width: 5%;
}

.wheel-lights .light .light-icon.dynamicSmall {
    background-image: url(/images/light-dynamic-small-wood.png);
    height: 11%;
    left: 44.5%;
    top: -2%;
    width: 11%;
}

.wheel-lights .light .light-icon.dynamicBig {
    background-image: url(/images/light-dynamic-big-wood.png);
    height: 16%;
    left: 42%;
    top: -4.5%;
    width: 16%;
}

@keyframes lightBehindScale {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(180deg);
    }

    to {
        transform: scale(1) rotate(1turn);
    }
}

@keyframes lightBehindOpacity {
    0% {
        opacity: 1;
    }

    50% {
        opacity: .7;
    }

    to {
        opacity: 1;
    }
}

@keyframes lightRotate {
    0% {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(5turn);
    }
}

@keyframes lightOpacity {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes lightZoom {
    0% {
        zoom: 1;
    }

    50% {
        zoom: 2;
    }

    to {
        zoom: 1;
    }
}