@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

:root {
    --orange: #EE9430;
    --yellow: #ECC839;
    --wine: #2B0E11;
    --black: #15181F;
}

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

html {
    font-size: 62.5%;
}

body {
    font-size: 1.6rem;
    font-family: 'Open Sans', sans-serif;
    background-image: url('../images/background.png');
    background-size: cover;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-top-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    margin-top: 4rem;
}

h2 {
    color: white;
    -webkit-text-stroke: 0.05rem var(--orange);
}

.logo {
    padding: 0 1.5rem;
}

.logo img {
    width: 100%;
}

select {
    width: 28rem;
    padding: 1.3rem 2rem;
    background-image: url("../images/arrow-select.svg");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-color: var(--wine);
    color: var(--orange);
    border: 0.1rem solid var(--orange);
    border-radius: 0.4rem;
    font-size: 1.6rem;

    /* Desabilita o icon default */
    outline: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}

.main-bottom-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3.2rem;
    margin-top: 8rem;
    margin-bottom: 3rem;
}

.card,
.card-back {
    width: 16rem;
    height: 16rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.2rem;
    
}

.card {
    background-color: var(--black);
    position: relative;
    transform-style: preserve-3d;
    transition: all 1.2s ease;
    /*transform: rotateY(180deg);*/
    cursor: pointer;
}

.card-front {
    pointer-events: none;
}

.card-back {
    background-color: var(--wine);
    border: 0.2rem solid var(--yellow);
    box-shadow: 0 0 0.8rem var(--orange);
    backface-visibility: hidden;
    position: absolute;
    pointer-events: none;
}

.toggle-card {
    transform: rotateY(180deg);
}


/* Modal de vencedor */
@keyframes modal {
    from {
        opacity: 0;
        transform: translate3d(0, -6rem, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.modal-container {
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, .5);
    position: fixed;        /* Fica posicionado sobre o site inteiro */
    top: 0;
    left: 0;
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-container.show {
    display: flex;    /* Exibe o modal */
}

.show .modal {
    animation: modal .3s;    /* Associa o elemento à animação do keyframes */
}

.modal {
    background: var(--black);
    border-radius: 1.6rem;
    width: 40%;
    min-width: 35rem;      /* Largura mínima de 350px quando diminuir a tela */
    padding: 4rem;
    position: relative;        /* Usado para que o botão de fechar fique absoluto a ele */
}

.modal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-wrapper p {
    color: white;
    max-width: 80%;
    text-align: center;
    line-height: 2.6rem;
}

.btn-play-again {
    padding: 1rem 7rem;
    margin-top: 5.5rem;
    background: var(--wine);
    border: 0.1rem solid var(--yellow);
    box-shadow: 0 0 0.8rem var(--orange);
    border-radius: 0.8rem; 
    text-transform: uppercase;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 1.6rem;
    color: white;
    cursor: pointer;
    transition: .4s ease;
}

.btn-play-again:hover {
    opacity: 0.85;
}

.close {
    position: absolute;
    top: -4.5rem;
    right: -4.5rem;
    background: transparent;
    cursor: pointer;
    border: none;
}


/* Media queries */
@media (max-width: 382px) {
    .main-bottom-content {
        justify-content: center;
    }
}