@font-face {
    font-family: Poppins;
     src: url("assets/fonts/Poppins-Light.ttf");
   }

@font-face {
    font-family: Poppins;
     src: url("assets/fonts/Poppins-Medium.ttf");
   }

:root {
    --body-color: linear-gradient(to top, #d299c2 0%, #fef9d7 100%);
    --field-color: rgb(247, 249, 249, 0.4);
    --field-view: rgb(247, 249, 249);
    --text-color: rgb(0, 0, 0);
    --font-standard: 20px;
    --font-large: 18px;
}

* {
    box-sizing: border-box;
  }

*::before, *::after {
    box-sizing: inherit;
}

html {
    scroll-behavior: smooth; 
    overflow-x:  hidden;
}

body {
    min-height: 100vh;
    margin: 0; 
    padding: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;


    background-image: var(--body-color);

    font-family: 'Poppins', 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: var(--font-standard);
    line-height: 1.2;
    color: var(--text-color);
}

img {
    height: auto;
    max-width: 100%;
}

header {
    min-height: 10px;
}
main {
    margin: 0 auto;
    display: block;   
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
}

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

.title {
    text-transform: capitalize;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
} 

.results-list {
    height: 550px;
    width: 600px;
    background-color: var(--field-view);
    box-shadow: 0 6px 12px rgb(0, 0, 0, 0.2);
    border-radius: 20px;
    z-index: 999;
    position: absolute;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    transition: 0.5s ease-in;
}

.hidden-result {
    display: none;
}

.finish {
    height: 300px;
    width: 600px;
    background-color: var(--field-view);
    box-shadow: 0 6px 12px rgb(0, 0, 0, 0.2);
    border-radius: 20px;
    z-index: 999;
    position: absolute;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.hidden {
    display: none;
}

.finish-text {
    font-size: 28px;
    font-weight: 800;
    text-transform: capitalize;
}

.states {
    display: flex;
    justify-content: space-around;
    align-items: center;

    width: 450px;
    height: 50px;
    padding: 10px;
    background-color: var(--field-color);
    border-radius: 10px;
    margin:0 0 20px 0;
}

.flips {
    display: flex;
    align-items: center;
    background: var(--field-color);
    padding: 5px 20px;
    border-radius: 5px;
    box-shadow: 0 3px 6px rgb(0, 0, 0, 0.1);
}

.flips p{
    margin: 0;
}

.flips span {
margin-left: 10px;
}

.btn {
    cursor: pointer;
    font: inherit;
    background: var(--field-color);
    box-shadow: 0 3px 6px rgb(0, 0, 0, 0.1);
    padding: 5px 20px;
    border-radius: 5px;
    border: none;
    transition: transform 0.3s ease-in;
}
.btn:hover {
    color: rgb(0, 0, 0, 0.8);
    background: var(--field-view);
}

.btn-refresh {
    padding: 20px;
}

.play-field {
    height: 450px;
    width: 450px;
    padding: 10px;
    background-color: var(--field-color);
    border-radius: 10px;
}

.cards {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

.cards .card {
    position: relative;
    height: calc(25% - 10px);
    width: calc(25% - 10px);
    cursor: pointer;
}

.card .view{
    position: absolute;
    display: flex;
    align-self: center;
    justify-content: center;
    transition: transform 0.3s linear;
    user-select: none;
    pointer-events: none;
}

.view {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    box-shadow: 0 3px 6px rgb(0, 0, 0, 0.1);
    backface-visibility: hidden;
    transition: 00.3s ease-in;
}

.front-view {
    background-color: rgb(247, 249, 249, 0.5);
    transition: 00.3s ease-in;
}

.card:hover .front-view{
    transition: 00.3s ease-in;
    background-color: var(--field-view);
    opacity: 80%;
}  

.back-view {
    background-color: var(--field-view);
} 

.card img {
    display: flex;
}

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

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

.card.flip .back-view {
    transform: rotateY(0);
}

.back-img {
    opacity: 85%;
    max-width: 45px;
    /* transform: rotateY(-180deg); */
}

/* footer start */
.footer-container {
    max-width: 700px;
    min-height: 10px;

    display:flex;
    justify-content: space-between;
    align-items: center;

    font-size: var(--font-large);
    line-height: 20px;
    transition: 0.5s;
}

.footer-content{
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-text {
    padding-left: 20px;
}

.footer-link{
    text-decoration: none;
    color: var(--text-color);
    padding: 20px;
}

.footer-link::after, .footer-link:hover{
    opacity: 70%;
}
 /* footer finish */

 /* media queries */
 @media only screen and (max-width: 650px) {
    .container {
        max-width: 450px;
    }
    .footer-container {
        flex-direction: column;
    }
    .finish {
        width: 400px;
    }
    .results-list {
        width: 400px;
    }
  }

  @media only screen and (max-width: 480px) {
    .container {
        padding: 5px;
    }
    .footer-container {
        font-size: 14px;
    }
      body {
          font-size: 14px;
      }
    .finish {
        width: 300px;
    }
    .results-list {
        width: 290px;
    }
    .states {
        width: 290px;
    }
    .play-field {
        width: 300px;
        height: 300px;
        padding: 5px;
    }
    .cards .card {
        height: calc(25% - 5px);
        width: calc(25% - 5px);
    }
    .results-list {
        height: 380px;
    }
  }