@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

:root {
    --modal: #141E46;
}

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

body {
    font-family: 'Roboto', sans-serif;
    width: 100%;
    height: 100vh;
    background-color: #fff173;
}

.modal-container,
.results-container {
    position: absolute;
    width: 100%;
    min-height: 100vh;
    /* display: flex; */
    display: none;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
    background-color: #fff173;
    padding: 20px;
    z-index: 1;
}

.modal,
.results-modal {
    display: none;
    position: relative;
    background-color: var(--modal);
    /* display: flex; */
    flex-direction: column;
    color: white;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    gap: 10px;
    padding: 20px;
    border-radius: 10px;
    z-index: 1;
    flex-shrink: 0;
}

.modal,
.modal-container {
    display: flex;
    /* display: none; */
}

.close-modal,
.close-result {
    align-self: flex-end;
    margin-right: 20px;
}

.result-button {
    display: none;
}

.results {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
}

.results-modal h1 {
    margin: 20px auto;
    ;
}

.description {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.button {
    color: white;
    padding: 10px 20px;
    margin-bottom: 10px;
    background-color: #0d6efd;
    border-radius: 5px;
    outline: none;
    border: none;
    cursor: pointer;

    &:hover {
        transform: scale(1.1);
    }
}

.lose-conditions,
.win-conditions,
.game-rules {
    margin-bottom: 10px;
}

li {
    margin: 10px;
}

/* CSS for the Main LayOut */
.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px
}

.card-container {
    width: 40%;
    aspect-ratio: 1/1;
    display: flex;
    flex-wrap: wrap;
    gap: 1px
}

.card {
    flex: 1 0 24%;
    height: 25%;
    box-sizing: border-box;
    background-color: transparent;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;

    &:hover {
        transform: translateY(-5px);
    }
}

.message-bar,
.info-bar {
    margin: 10px auto;
    font-size: 20px;
    font-weight: bold;
}

/* CSS for the card */
.inner-card {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 10px;
}

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

.front-card,
.back-card {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-size: cover;
}

.front-card {
    color: black;
    border-radius: 10px;
    background-image: url("images/pokeball.png");
    background-color: #8576FF;
    background-position: center;
}

.back-card {
    background-color: dodgerblue;
    color: white;
    transform: rotateY(180deg);
    border-radius: 10px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}


.info-bar {
    display: flex;
    width: 50%;
    justify-content: space-evenly;
}

.removed {
    opacity: 0.2;
}

@media only screen and (max-width:767px){
    .modal,.results-modal{
        width: 100%;
        height: 100%;
        border-radius: 0%;
    }
    .modal-container,.results-container{
        background-color: #141E46;
    }

    .main-container h1{
        text-align: center;
        font-size: 25px;
    }
    .info-bar{
        display: flex;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        font-size: 15px;
        margin: 0 auto;
    }

    .card-container{
        width: 100%;
        padding: 5px;
        aspect-ratio: 1/1;
    }

    .button-bar{
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .message-bar{
        font-size: 15px;
        margin: 0 auto;
    }

}