/* Estilos gerais */
body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #FFF;
    text-align: center;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow-x: hidden;
}

.background {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-image: url('assets/Background.jpeg');
    background-size: cover;
    background-position: center;
    filter: grayscale(10%) contrast(100%) brightness(80%);
    overflow: hidden;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.container {
    position: relative;
    z-index: 1;
    color: #ff0000;
    padding: 50px;
}

.logo {
    width: 200px;
    margin-bottom: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

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

/* Estilos para os dados */
#diceArea {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.dice, #okayButton {
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-align: center;
    outline-offset: 4px;
    transition: filter 250ms;
    user-select: none;
    touch-action: manipulation;
    margin-top: 20px;
    margin-left: 10px;
}

#selectedDiceArea {
    margin-top: 20px;
    text-align: center;
}

#selectedDiceList {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.selected-dice {
    width: 85px;
    height: 80px;
    margin: 5px;
    background-color: hsl(340deg 100% 32%) 8%;
    color: #ececec;
    font-size: 25px;
    line-height: 100px;
    border-radius: 50%;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, background-color 0.2s ease;
}

.selected-dice:hover {
    background-color: #fa0000;
}

#result {
    font-size: 14px;
    margin-top: 2px;
    color: #ffffff;
}

#interpretation {
    font-size: 18px;
    margin-top: 10px;
    color: #d10d06;
}

#rollButton {
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    outline-offset: 4px;
    transition: filter 250ms;
    user-select: none;
    touch-action: manipulation;
    margin-top: 20px;
}

/* Botão de rolar */
.shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: hsl(0deg 0% 0% / 0.25);
    will-change: transform;
    transform: translateY(2px);
    transition: transform 600ms cubic-bezier(.3, .7, .4, 1);
}

.edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(to left, hsl(340deg 100% 16%) 0%, hsl(340deg 100% 32%) 8%, hsl(340deg 100% 32%) 92%, hsl(340deg 100% 16%) 100%);
}

.front {
    display: block;
    position: relative;
    padding: 12px 27px;
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    color: white;
    background: hsl(0, 100%, 47%);
    will-change: transform;
    transform: translateY(-4px);
    transition: transform 600ms cubic-bezier(.3, .7, .4, 1);
}

.dice, .button:hover {
    filter: brightness(110%);
}

.dice:hover .front {
    transform: translateY(-6px);
    transition: transform 250ms cubic-bezier(.3, .7, .4, 1.5);
}

.dice:active .front {
    transform: translateY(-2px);
    transition: transform 34ms;
}

.dice:hover .shadow {
    transform: translateY(4px);
    transition: transform 250ms cubic-bezier(.3, .7, .4, 1.5);
}

.dice:active .shadow {
    transform: translateY(1px);
    transition: transform 34ms;
}

.dice:focus:not(:focus-visible) {
    outline: none;
}


#rollButton:hover {
    filter: brightness(110%);
}

#rollButton:hover .front {
    transform: translateY(-6px);
    transition: transform 250ms cubic-bezier(.3, .7, .4, 1.5);
}

#rollButton:active .front {
    transform: translateY(-2px);
    transition: transform 34ms;
}

#rollButton:hover .shadow {
    transform: translateY(4px);
    transition: transform 250ms cubic-bezier(.3, .7, .4, 1.5);
}

#rollButton:active .shadow {
    transform: translateY(1px);
    transition: transform 34ms;
}

#rollButton:focus:not(:focus-visible) {
    outline: none;
}

/* Exibir os dados lado a lado */
#result {
    display: flex;
    flex-wrap: wrap;  /* Permite quebrar para a próxima linha */
    justify-content: space-evenly;  /* Distribui as colunas de forma eficiente */
    gap: 20px;  /* Espaço entre as caixas */
    margin-top: 20px;
}

.dice-container {
    display: flex;
    flex-wrap: wrap;  /* Permite que os itens "quebrem" para a próxima linha */
    justify-content: space-evenly;  /* Distribui os itens com espaço entre eles */
    align-items: center;  /* Garante que os itens estejam centralizados verticalmente */
    margin: 10px;
    background-color: rgba(50, 50, 50, 0.8); /* Fundo escuro semitransparente */
    border-radius: 10px; /* Bordas arredondadas */
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Sombra para destacar o bloco */
    width: 200px;  /* Largura fixa para cada caixa */
    min-height: 100px; /* Altura mínima para a caixa */
}

.selected {
    border: 3px solid #ce0505; /* Borda dourada para indicar a seleção */
    box-shadow: 0px 0px 10px rgba(255, 67, 67, 0.8); /* Sombra brilhante */
    transform: scale(1.05); /* Aumenta levemente a carta */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Suaviza a transição */
}

.selected-border {
    border: 3px solid #ff0000; /* Borda dourada para indicar seleção */
    box-shadow: 0px 0px 8px rgba(255, 30, 0, 0.8); /* Sombra leve para destaque */
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.dice-container:hover {
    transform: scale(1.03); /* Aumenta levemente ao passar o mouse */
}

.dice-container img {
    width: 60px;  /* Tamanho fixo para as imagens */
    height: 60px;
    margin: 5px;  /* Espaçamento entre as imagens */
}

.dice-description {
    text-align: center;  /* Centraliza a descrição */
    font-size: 12px;  /* Tamanho maior para a descrição */
    color: #ff0000;  /* Cor da descrição */
    margin-top: 10px;  /* Espaço entre a caixa e a descrição */
    width: 200px; /* Alinha com a largura da caixa */
}

/* Botão de selecionar (inicialmente escondido) */
#okayButton {
    display: none;  /* Esconde o botão inicialmente */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;  /* Transição suave para a opacidade */
}

/* Quando o botão for mostrado após o rolar */
#okayButton.show {
    display: inline-block;  /* Torna o botão visível */
    opacity: 1;
}


/* Responsividade */
/* Ajustes para melhorar a responsividade em telas menores */
@media (max-width: 768px) {
    #dicearea {
        width: 70px;  /* Ajuste do tamanho do botão para telas médias */
        height: 70px;
    }

    .dice img {
        max-width: 50%;  /* Ajuste do tamanho da imagem */
    }

    .dice span {
        font-size: 12px;  /* Reduzindo o tamanho da fonte em dispositivos móveis */
    }
}   

@media (max-width: 480px) {

.dice-container {
    width: calc(50% - 10px);  /* Exibe 2 resultados por linha */
}

.dice-image {
    width: 40px;  /* Tamanho menor da imagem */
    height: 40px;
}

.dice-description {
    font-size: 8px;
    text-align: center;  /* Tamanho menor para a descrição */
}
}

.fade-out {
animation: fadeOut 1s ease-in-out forwards;
}

@keyframes fadeOut {
0% {
    opacity: 1;
}
100% {
    opacity: 0;
}
}