@import url("https://fonts.googleapis.com/css?family=Racing+Sans+One:100,200,300,400,500,600,700&display=swap");

/*------Font and Background Image Styling-*/
/*------See ReadME for source of some body styling-*/
body {
    margin: 0;
    color: #fff;
    font-family: 'Racing Sans One', sans-serif;
    background: url("../images/background-image.jpg") no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

/*------Mouse Cursor Styling-*/
#start,
#game-hard,
#game-easy,
#how-to-play,
#contact,
#on,
#off,
.btn-contact {
    cursor: pointer;
}

/*------Title Text Styling-*/
.title {
    text-align: center;
    font-size: 3.125rem;
    font-weight: normal;
}

/*------Audio Toggle Styling-*/
.audio-toggle {
    text-align: center;
    font-size: 1.25rem;
}

.audio-status {
    text-decoration: underline;
    font-weight: 900;
    font-size: 1.5rem;
}

/*------Hard Mode Toggle Styling-*/
.difficulty {
    font-size: 2.2rem;
}

.game-mode {
    text-decoration: underline;
    font-weight: 900;
    font-size: 2.5rem;
}

/*------Game Information Styling-*/
.info-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
}

.game-info {
    font-size: 1.5625rem;
}

.score {
    text-align: center;
}

/*------ Screen Size Message-*/
.screen-size {
    display: none;
    font-size: 1.25rem;
    text-align: center;
}

/*------Game Container Styling-*/
.game-container {
    display: grid;
    grid-template-columns: repeat(4, auto);
    grid-gap: 1.25rem;
    justify-content: center;
    margin: 1.25rem;
    perspective: 31.25rem;
}

/*------Card Styling-*/
.card {
    position: relative;
    height: 6.875rem;
    width: 13.75rem;
    background-color: #fff;
    border: 0.125rem solid #000;
    border-radius: 0.5rem;
}

.manufacturer {
    position: absolute;
    color: #000000;
    padding-top: 5rem;
    font-size: 1.25rem;
}

.card-back:hover {
    height: 6.875rem;
    width: 13.75rem;
    border-radius: 0.5rem;
    background: linear-gradient(-45deg, #b2a9e5 15%, #2b94e5 100%);
}

.f1-logo {
    position: absolute;
    height: 6.875rem;
    width: 13.75rem;
}

.card-back:hover .f1-logo {
    transform: scale(1.2);
    transition: 100ms ease-in-out;
}

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

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

.card.visible .card-front {
    transform: rotateY(0);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    backface-visibility: hidden;
    transition: transform 500ms ease-in-out;
}

.f1-car {
    padding-top: 1.25rem;
    height: 3.8125rem;
    width: auto;
}

.card.matched .card-front {
    animation: match 1500ms forwards;
}


/*------Overlay Styling-*/
.overlay-text {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.overlay-text-small div {
    font-size: 2.5rem;
    text-align: center;
}

.overlay-text.visible {
    display: flex;
    flex-direction: column;
    animation: on-load 500ms forwards;
}

#saved-scores,
#instructions,
#contact-form {
    display: none;
    text-align: center;
    font-size: 1.625rem;
}

/*------Contact Form-*/
.form {
    font-size: 1.625rem;
}

.btn-contact {
    font-size: 1.25rem;
    font-family: 'Racing Sans One', sans-serif;
}

/*-----Contact Form Response Messages-*/
#success,
#failed {
    display: none;
}

#success.visible,
#failed.visible {
    display: flex;
    text-align: center;
    font-size: 1.625rem;
}

/*------Footer Styling-*/
.footer-text {
    text-align: center;
    color: #000000;
}

/*------Overlay Animation-*/
@keyframes on-load {
    from {
        background-color: rgba(0, 0, 0, 0);
        font-size: 0rem;
    }

    to {
        background-color: rgba(0, 0, 0, .8);
        font-size: 4.6875rem;
    }
}

/*------Card Match Animation-*/
@keyframes match {
    from {
        background-color: rgba(255, 255, 255);
        border-radius: 50%;
    }

    to {
        background-color: rgb(22, 163, 83);
        border-radius: 0.5rem;
    }
}

/*------ Screen Size Message-*/
@media (max-width: 1000px) and (orientation: portrait) {
    .screen-size {
        display: flex;
    }
}

/*------Game and Info Container Mobile-*/
@media (max-width: 500px) {
    .game-container {
        grid-template-columns: repeat(1, auto);
    }

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

@media (min-width: 501px) {
    .game-container {
        grid-template-columns: repeat(2, auto);
    }

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

@media (min-width: 800px) {
    .game-container {
        grid-template-columns: repeat(3, auto);
    }

    .info-container {
        flex-direction: row;
        align-items: center;
    }
}

@media (min-width: 1000px) {
    .game-container {
        grid-template-columns: repeat(4, auto);
    }

    .info-container {
        flex-direction: row;
        align-items: center;
    }
}

/*------Overlay Mobile-*/
@media (max-width: 675px) {
    .overlay-text {
        text-align: center;
    }
}

@media (max-height: 710px) {
    .scroll {
        overflow-y: scroll
    }
}