@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #1e2639;
    height: 100vh;
    margin: 0;
    background-size: cover;
}

#wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin-top: 50px;
}

#final-value {
    font-size: 1.5em;
    margin-top: 20px;
    text-align: center;
}

.chart-container canvas {
    padding: 10px;
}

.wrapper {
    width: 106%;
    max-width: 36.37em;
    max-height: 90vh;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 58%;
    left: 50%;
    padding: 3em;
    border-radius: 1em;
    box-shadow: 0 4em 5em rgba(27, 8, 53, 0.2);
    height: calc(75% - 10px);
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .12);
}

.main > h1 {
    text-align: center;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.37;
    text-shadow: 0 1px 1px 0 rgba(0, 0, 0, .12);
    padding-bottom: 50px;
    color: rgb(220, 79, 36);
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Adicionando animação de oscilação inicial */
@keyframes oscillate {
    0% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
    100% {
        transform: rotate(-3deg);
    }
}

@keyframes slow-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#wheel {
    max-height: inherit;
    width: inherit;
    top: 0;
    padding: 0;
    border: 5px solid orange;
    border-radius: 50%;
    box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.7);
    animation: oscillate 1.5s ease-in-out infinite; /* Oscilação inicial */
    /* Para um giro lento contínuo, substitua pela linha abaixo: */
    /* animation: slow-spin 15s linear infinite; */
}

/* Confetes */
.confetti {
    position: fixed;
    top: 0;
    left: 50%; /* Começa mais centralizado */
    transform: translateX(-50%); /* Ajusta para alinhar horizontalmente */
    background: #FF6347;
    border-radius: 50%;
    animation: confettiFall 3s ease-in-out infinite;
    z-index: 9999;
    pointer-events: none;
}

/* Animação dos confetes */
@keyframes confettiFall {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(calc(-50vw + 100px)) translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}


/* Efeito de pulsação */


#spin-btn {
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    height: 20%; /* Ajuste conforme necessário */
    width: 20%;  /* Ajuste conforme necessário */
    border-radius: 50%;
    cursor: pointer;
    border: 0;
    background-image: linear-gradient(120deg, #0f4aa8 0%, #f3a200 100%);
    color: #ffffff;
    text-transform: uppercase;
    font-size: calc(0.6vw + 0.9vh + 1vmin); /* Texto ajustável ao tamanho do botão */
    letter-spacing: 0.01em;
    font-weight: 600;
    display: flex; /* Centraliza o texto */
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center; /* Centraliza verticalmente */
    overflow: hidden; /* Garante que o texto não ultrapasse os limites do botão */
    text-align: center; /* Centraliza múltiplas linhas, se necessário */
}


.btn {
    background: rgb(220, 79, 36);
    color: #fff;
    border: none;
    font-weight: bolder;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px auto;
    border: 1px solid #ccc;
    animation: pulse 1s infinite ease-in-out; /* Adicionando animação de pulsação */
    width: 50%;
}

#spin-btnn {
    margin-top: 20px;
    padding: 15px 30px;
    background-color: #FFA500;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background: #feb47b;
}

#spin-btnn:hover {
    background-color: #FF8C00;
}

img {
    position: absolute;
    width: 4em;
    top: 45%;
    right: -8%;
}

@media (max-width: 768px) {
    .wrapper {
        font-size: 12px;
    }

    .chart-container canvas {
        width: 80vw !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    h1, h2 {
        font-size: 16px;
    }

    p {
        padding-top: 9px;
        color: floralwhite;
        font-weight: bold;
        text-align: center;
    }

    button {
        font-size: 20px;
        padding: 6px 12px;
        color: #FFFFFF;
        background-color: #0f4aa8;
        font-weight: bold;
        animation-duration: 10s;
    }

    .btn {
        cursor: pointer;
        transition: all 0.3s ease-in-out;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 5% auto;
        border: 1px solid #ccc;
    }

    .prize-box {
        padding: 10px;
    }

    .claim-btn {
        font-size: 14px;
        padding: 6px 12px;
    }

    .timer {
        font-size: 12px;
    }
}

/* Animação de pulsação */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Para dispositivos móveis como iPhone 6, 7, 8, X e Samsung Galaxy A5, A6, S5, S6 */
@media (max-width: 430px) {
    body {
        font-size: 14px;
        padding: -4px;
    }

    button {
        width: 100%;
        font-size: 16px;
        width: 100%;
        font-size: 16px;
        margin-top: 4px;
    }
}

/* Para dispositivos menores, como iPhone 5, Samsung Galaxy J3, J5 */
@media (max-width: 360px) {
    body {
        font-size: 12px;
        padding: -4px;
    }

    .btn {
        width: 100%;
        font-size: 14px;
    }
}
/* Para dispositivos menores, como iPhone 4 */
@media (max-width: 320px) {
    #wheel-container {
        margin-top: 100px; /* Aumenta o espaço acima da roda */
    }

    .wrapper {
        width: 95%; /* Ajusta a largura */
        max-width: 30em;
        max-height: 70vh; /* Reduz a altura da roda */
        top: 63%; /* Reposiciona a roda */
    }

    
}
