/*Para splicar a todos os elementos*/

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

/*Para o body*/

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /*ocupa 100% da altura da tela*/
    font-family: 'Arial', sans-serif;
    background-color: #e0e0e0;
    padding: 20px;
    text-align: center;
}

/*Para os visores*/

.visors {
    font-size: 25vw;
    color: #000;
    line-height: 1;
}

h1 {
    font-size: 15vw;
    margin-bottom: 2vh;
}

h3 {
    font-size: 6vw;
}

/*Para os seletores e botões*/

.selects, .buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap; /*quebra a linha se necessário*/
    justify-content: center;
    width: 100%;
    max-width: 400px;
}

#startBtn, #pauseBtn, #resetBtn, #finishBtn, #rounds, #seconds, #rest {
    padding: 15px 20px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex: 1 1 auto; /*Permite que os botões cresçam e encolham conforme necessário*/
    min-width: 100px;
}

#startBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ccc;
}


/*Efeitos de piscar e mudar a tela*/

.tela-pausada {background-color: #87CEFA;}
.tela-descanso {background-color: #90EE90;}
.tela-prep{background-color: #FFCC00; color: #000;}

.tela-piscando-vermelho {animation: piscar 1s infinite;} /*Executa a animacao "piscar" de 1 em 1 segundo*/

@keyframes piscar { 
    0% { background-color: #E0E0E0; }
    50% { background-color: #F00; }
    100% { background-color: #E0E0E0;}
} /*Cria animações puras*/

@media (min-width: 768px) {
    .visors {
        font-size: 150px;
    }

    h1 {font-size: 80px;}
    h3 {font-size: 30px;}

    .selects, .buttons {
        flex-wrap: nowrap; /*Não quebra a linha em telas maiores*/
        max-width: 800px;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    body {
        padding: 5px;
    }

    .visors {
        font-size: 35vh;
    }

    h1 {
        font-size: 20vh;
        margin-bottom: 5px;
    }

    h3 {
        font-size: 12vh;
    }

    .selects, .buttons {
        margin-top: 10px;
        gap: 10px;
    }

    #startBtn, #pauseBtn, #resetBtn, #finishBtn, #rounds, #seconds, #rest {
        padding: 8px 15px;
    }
}