 * {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
}

body {
    height: 100vh;
    color: #393336;
    background: rgb(240,236,242);
    background: radial-gradient(circle, rgba(240,236,242,1) 0%, rgba(127, 210, 244) 93%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Indie Flower', cursive, Arial, Helvetica, sans-serif;
}

.text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 70%;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

.game {
    display: grid;
    grid-template-columns: repeat(4, 10rem);
    grid-template-rows: repeat(4, 10rem);
    grid-gap: 2rem;
    perspective: 800px;
    padding-top: 20px;
    margin-bottom: 2rem;
}

.card {
    position: relative;
    transform-style: preserve-3d;
    transition: all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: rgb(0, 0, 0, 0.5) 0px 5px 15px;
    cursor: pointer;
}

.face, .back {
    width: 100%;
    height: 100%;
    position: absolute;
    pointer-events: none;
}

.back {
    background: rgba(249, 206, 190);
    backface-visibility: hidden;
    
}

.toggleCard {
    transform: rotateY(180deg);  
}

.stars-1,
.stars-2 {
    position: fixed;
    height: 150px;
}

.stars-1 {
    top: 1rem;
    left: 1rem;
    transform: rotate(15deg);
}

.stars-2 {
    bottom: 1rem;
    right: 1rem;
    transform: rotate(-15deg);
}

.button {
    display: inline-block;
    font-family: 'Indie Flower', cursive, Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
    background-color: transparent;
    padding: 1rem 1.5rem;
    border: solid 1px;
    border-radius: 4rem;
    color: black;
    cursor: pointer;
    transition: background .3s, color .3s;
  }
  
  .button:hover {
    background-color: white;
  }

  .csillaghome {
    text-decoration: none;
    display: inline-block;
    background-color: transparent;
    font-size: 1.5rem;
    padding: 1rem 1.5rem;
    border: solid 1px;
    border-radius: 4rem;
    color: black;
    cursor: pointer;
    transition: background .3s, color .3s;
  }

  .csillaghome:hover {
    background-color: white;
  }

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 100px;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: auto;
    height: 80vh;
    width: 80%;
    background-image: url("img/youwin.jpg");
    background-position: center;
    background-size: cover;
    border: 5px solid #eda8c8;
    border-radius: 20px;
    box-shadow: rgb(0, 0, 0, 0.5) 0px 20px 30px;
    text-align: center;
}

.close {
    color: #aaaaaa;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 4rem;
    font-weight: bold;
    padding: 10px 30px 0 0;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.modal-content p {
    font-size: 9rem;
    color: black;
    padding-top: 5rem;
    text-shadow: 4px 4px 10px #676165;
}

/*====================== RESPONSIVE STYLE ================================*/
@media  screen and (max-width: 1370px) {.stars-1,
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}


@media  screen and (max-width: 1024px) {
    .game {
        grid-template-columns: repeat(4, 6rem);
        grid-template-rows: repeat(4, 6rem);
        grid-gap: 1rem;
    }
    .text {
        flex-direction: column;
    }
    
    .modal-content p {
        font-size: 5rem;
    }
    .button {
        font-size: 1rem;
        padding: .5rem .7rem;
        border-radius: 2rem;
        margin-bottom: 10px;
      }
      .csillaghome {
        font-size: 1rem;
        padding: .5rem .7rem;
        border-radius: 4rem;
        margin-bottom: 10px;
      }
      h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

@media  screen and (max-width: 580px) {
    .modal-content p {
        font-size: 3rem;
    }
    .stars-1,
.stars-2 {
    position: fixed;
    height: 80px;
}
}

@media screen and (max-width: 480px) {
    .game {
        grid-template-columns: repeat(4, 5rem);
        grid-template-rows: repeat(4, 5rem);
        grid-gap: 0.5rem;
        perspective: 800px;
        padding-top: 10px;
        margin-bottom: 1rem;
    }
    
}

@media  screen and (max-width: 350px) {
    .game {
        grid-template-columns: repeat(2, 5rem);
        grid-template-rows: repeat(8, 5rem);
        grid-gap: 0.5rem;
        perspective: 800px;
        padding-top: 10px;
        margin-bottom: 1rem;
    }
    
}