/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body{
  transition: background-color 0.5s ease-in-out; /* Add a transition for the background-color property */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #6563FF;
}
.wrapper{
  padding: 25px;
  border-radius: 10px;
  background: #F8F8F8;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.cards, .card, .view{
  display: flex;
  align-items: center;
  justify-content: center;
}
.cards{
  height: 400px;
  width: 400px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.cards .card{
  cursor: pointer;
  list-style: none;
  user-select: none;
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  height: calc(100% / 4 - 10px);
  width: calc(100% / 4 - 10px);
}
.card.shake{
  animation: shake 0.35s ease-in-out;
}
@keyframes shake {
  0%, 100%{
    transform: translateX(0);
  }
  20%{
    transform: translateX(-13px);
  }
  40%{
    transform: translateX(13px);
  }
  60%{
    transform: translateX(-8px);
  }
  80%{
    transform: translateX(8px);
  }
}
.card .view{
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 7px;
  background: #fff;
  pointer-events: none;
  backface-visibility: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.25s linear;
}
.card .front-view img{
  width: 19px;
}
.card .back-view img{
  max-width: 45px;
}
.card .back-view{
  transform: rotateY(-180deg);
}
.card.flip .back-view{
  transform: rotateY(0);
}
.card.flip .front-view{
  transform: rotateY(180deg);
}

@media screen and (max-width: 700px) {
  .cards{
    height: 350px;
    width: 350px;
  }
  .card .front-view img{
    width: 17px;
  }
  .card .back-view img{
    max-width: 40px;
  }
}

@media screen and (max-width: 530px) {
  .cards{
    height: 300px;
    width: 300px;
  }
  .card .front-view img{
    width: 15px;
  }
  .card .back-view img{
    max-width: 35px;
  }
}
/* Timer and Flip Counter Styles */
.game-info {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-weight: bold;
}
  
.timer, .flip-counter {
    text-align: center;
    flex: 1;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* Reset Button Styles */
#reset-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #6563FF;
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  #reset-button:hover {
    background-color: #5755E3;
  }
  
  /* Style the game mode selection container */
.game-mode {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  /* Style the radio buttons and labels */
.game-mode label {
    font-size: 18px;
    margin-right: 20px;
}
  
  /* Style the selected radio button's label */
.game-mode input:checked + label {
    font-weight: bold;
    color: #6563FF; /* Match the game's primary color */
}

/* Style for the "Preview" button */
#preview-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #6563FF;
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  /* Hover effect for the "Preview" button */
  #preview-button:hover {
    background-color: #4c4aff; /* Darker shade of the button color on hover */
  }
  
  /* Disable style for the "Preview" button */
  #preview-button:disabled {
    background-color: #ccc; /* Grey out the button when disabled */
    cursor: not-allowed;
  }

/* Style for the button container */
.button-container {
    display: flex; /* Use flexbox for horizontal alignment */
    justify-content: space-between; /* Add space between the buttons */
    align-items: center; /* Center vertically within the container */
  }
  
  /* Style for individual buttons (optional) */
  .button-container button {
    padding: 10px 20px;
    background-color: #6563FF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
  }
  
  /* Hover effect for buttons (optional) */
  .button-container button:hover {
    background-color: #4c4aff;
  }

/* Cool Clouds in the background */
body {
    background: #00b4ff;
    color: #333;
    font: 100% Arial, Sans Serif;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }
  
  #background-wrap {
      bottom: 0;
    left: 0;
    padding-top: 50px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: -1;
  }
  
  /* KEYFRAMES */
  
  @-webkit-keyframes animateCloud {
      0% {
          margin-left: -1000px;
      }
      100% {
          margin-left: 100%;
      }
  }
  
  @-moz-keyframes animateCloud {
      0% {
          margin-left: -1000px;
      }
      100% {
          margin-left: 100%;
      }
  }
  
  @keyframes animateCloud {
      0% {
          margin-left: -1000px;
      }
      100% {
          margin-left: 100%;
      }
  }
  
  /* ANIMATIONS */
  
  .x1 {
    -webkit-animation: animateCloud 35s linear infinite;
    -moz-animation: animateCloud 35s linear infinite;
    animation: animateCloud 35s linear infinite;
    
    -webkit-transform: scale(0.65);
    -moz-transform: scale(0.65);
    transform: scale(0.65);
  }
  
  .x2 {
    -webkit-animation: animateCloud 20s linear infinite;
    -moz-animation: animateCloud 20s linear infinite;
    animation: animateCloud 20s linear infinite;
    
    -webkit-transform: scale(0.3);
    -moz-transform: scale(0.3);
    transform: scale(0.3);
  }
  
  .x3 {
    -webkit-animation: animateCloud 30s linear infinite;
    -moz-animation: animateCloud 30s linear infinite;
    animation: animateCloud 30s linear infinite;
    
    -webkit-transform: scale(0.5);
    -moz-transform: scale(0.5);
    transform: scale(0.5);
  }
  
  .x4 {
    -webkit-animation: animateCloud 18s linear infinite;
    -moz-animation: animateCloud 18s linear infinite;
    animation: animateCloud 18s linear infinite;
    
    -webkit-transform: scale(0.4);
    -moz-transform: scale(0.4);
    transform: scale(0.4);
  }
  
  .x5 {
    -webkit-animation: animateCloud 25s linear infinite;
    -moz-animation: animateCloud 25s linear infinite;
    animation: animateCloud 25s linear infinite;
    
    -webkit-transform: scale(0.55);
    -moz-transform: scale(0.55);
    transform: scale(0.55);
  }
  
  /* OBJECTS */
  
  .cloud {
    background: #fff;
    background: -moz-linear-gradient(top,  #fff 5%, #f1f1f1 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(5%,#fff), color-stop(100%,#f1f1f1));
    background: -webkit-linear-gradient(top,  #fff 5%,#f1f1f1 100%);
    background: -o-linear-gradient(top,  #fff 5%,#f1f1f1 100%);
    background: -ms-linear-gradient(top,  #fff 5%,#f1f1f1 100%);
    background: linear-gradient(top,  #fff 5%,#f1f1f1 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f1f1f1',GradientType=0 );
    
    -webkit-border-radius: 100px;
    -moz-border-radius: 100px;
    border-radius: 100px;
    
    -webkit-box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
  
    height: 120px;
    position: relative;
    width: 350px;
  }
  
  .cloud:after, .cloud:before {
      background: #fff;
    content: '';
    position: absolute;
    z-indeX: -1;
  }
  
  .cloud:after {
    -webkit-border-radius: 100px;
    -moz-border-radius: 100px;
    border-radius: 100px;
  
    height: 100px;
    left: 50px;
    top: -50px;
    width: 100px;
  }
  
  .cloud:before {
    -webkit-border-radius: 200px;
    -moz-border-radius: 200px;
    border-radius: 200px;
  
    width: 180px;
    height: 180px;
    right: 50px;
    top: -90px;
  }