html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--cor-fundo-inicio), var(--cor-fundo-fim));
    font-family: var(--fonte-site);
    overflow-x: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    box-sizing: border-box;
    overflow-y: auto;
}

#app-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 100vh;
    box-sizing: border-box;
}

#roleta-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle, var(--cor-secundaria) 98%, transparent 98.5%),
        radial-gradient(circle, white 96%, transparent 96.5%);
    border-radius: 50%;
    box-sizing: border-box;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    box-sizing: border-box;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0;
    text-align: center;
    text-shadow: 2px 2px 5px var(--cor-secundaria);
    color: var(--cor-fonte);
}

button {
    background-color: var(--cor-primaria);
    color: var(--cor-fonte);
    padding: 16px 32px;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px;
}

button:hover {
    background-color: var(--cor-secundaria);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.6);
}

#seta {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 40px solid var(--cor-primaria);
    z-index: 20;
    animation: pulseSeta 1.5s infinite;
}

#logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(130px, 33%, 165px);
    height: clamp(130px, 33%, 165px);
    background-color: var(--cor-primaria);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    z-index: 15;
    transform: translate(-50%, -50%);
}

#logo img {
    width: 97%;
    height: 97%;
    border-radius: 50%;
    object-fit: cover;
}

@keyframes pulseSeta {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    #app-container {
        flex-grow: 1;
        min-height: 0;
        height: auto;
        justify-content: flex-start;
    }
    
    #roleta-container{
        margin-top: 3em;
    }
    
    body {
        align-items: stretch;
    }

    canvas {
        height: auto;
        max-height: 90vw; /* garante que a roleta caiba na tela */
    }
    
    h1 {
        font-size: clamp(1.8rem, 8vw, 3rem);
        margin-bottom: 1rem;
    }

    form#form-adicionar-brinde {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        margin-bottom: 1rem;
    }

    form#form-adicionar-brinde input,
    form#form-adicionar-brinde button {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    button {
        margin-top: 0;
    }

    #botao-girar {
        display: none;
    }
}