* {
    box-sizing: border-box;
    font-family: 'Roboto Condensed', sans-serif;
}

body {
    height: 100vh;
    margin: 10px;
    background: #211C1D;
    display: flex;
    align-items: center;
}

h1 {
    font-size: 100px;
    color: #DC8166;
    margin: 20px;
}

h2 {
    font-size: 22px;
    font-style: italic;
    color: #759DC0;
    margin: 20px;
    padding: 10px;
}

button {
    width: 60px;
    height: 60px;
    margin: 20px;
    border: 0px;
    border-radius: 100%;
    background-color: #5F5253;
    color: white;
    font-size: 16px;
}

p {
    font-size: 24px;
    font-weight: 500;
    margin: 20px;
    padding: 10px;
    color: white;
}

#match-success {
    font-size: 24px;
    color: #4D7DA8;
    font-weight: 600;
}

#results {
    font-size: 40px;
    color: #759DC0;
    font-weight: 900;
}

.board-container {
    margin: 20px;
    display: grid;
    grid-template-columns: repeat(4, auto);
    grid-gap: 10px;
    justify-content: center;
    color: white;
    font-size: 40px;
}

.tally-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
}

.card {
    position: relative;
    height: 200px;
    width: 200px;
    transform-style: preserve-3d;
    transition: 1s;
}

.cardFront,
.cardBack {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #96AFC5;
    border-radius: 5%;
    backface-visibility: hidden;
    height: 200px;
    width: 200px;
}

.cardBack {
    transform: rotateY(180deg);
}

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

.card:active {
    transform: scale(.9);
    transition: transform .2s;
}

/* credits modal */

.modal-container {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .7);
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-contents {
    width: 50%;
    height: 50%;
    background-color: #273F54;
    border-radius: 10px;
    padding: 20px;
    color: #96AFC5;
    font-size: 30px;
    font-weight: 800;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#credits-title {
    font-size: 40px;
}

a:link,
a:visited {
    color: #43729D;
    text-decoration: none;
}

/* formatting the 'x' close button */
.close {
    position: absolute;
    top: 0;
    right: 14px;
    /* original font styling wasn't an even '+' */
    font-family: 'Roboto', serif;
    font-size: 40px;
    font-style: normal;
    font-weight: 100;
    /* necessary because the character is actually a '+' */
    transform: rotate(45deg);
}

/* help modal */
.mobile-container {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .7);
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
}

.mobile-modal-contents {
    width: 80%;
    background-color: #273F54;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    
}

#play-now-button {
    width: 80px;
    height: 80px;
    margin: 20px;
    border: 0px;
    border-radius: 100%;
    background-color: #5F5253;
    color: white;
    font-size: 20px;
}

/* media queries */

/* mobile */

@media (max-width: 480px) {
    body {
        display: flex;
        flex-direction: column;
    }

    h1 {
        font-size: 60px;
    }

    p {
        font-size: 22px;
    }

    #instructions,
    #match-success,
    #results {
        display: none;
    }

    .tally-container {
        font-size: 20px;
    }

    .title-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .board-container {
        margin: 20px;
        grid-template-columns: repeat(3, auto);
        grid-gap: 4px;
        width: 100vw;
    }

    .card {
        height: 140px;
        width: 140px;
    }

    .cardBack,
    .cardFront {
        height: 140px;
        width: 140px;
    }

    .modal-container {
        display: none;
    }
}

/* tablet */

@media (min-width: 481px) and (max-width: 767px) {
    #help-button {
        display: none;
    }

    /* .mobile-container {
        display: none;
    } */
}

/* desktop */

@media (min-width: 768px) {
    #help-button {
        display: none;
    }

    .mobile-container {
        display: none;
    }

    
}
