*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: monospace;
  
}
@font-face{
  font-family: 'heading font';
  src: url(./font/ProtestGuerrilla-Regular.ttf);
}


body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(135deg,#03001e,#7303c0,#ec38bc);
}

.container{
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background: rgb(208, 62, 237);
  padding: 20px 60px;
  border-style: solid;
  border-color: white;
}
.controls-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: start;
  width: 430px;
  height: 430px;
  color: white;
}
h3 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hidden {
  display: none !important;
  visibility: hidden;
}


h2{
 font-size: 3.5em;
 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 font-weight:bold;
 text-transform: uppercase;
 letter-spacing: 0.1em;
 text-align: center;
}
.btns {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 20px;
  margin-top: 20px;
}

.Reset, .startbutton, .replaybutton, .pausebutton, .resumebutton, .button{
  padding: 10px 15px;
  color:white;
  background: transparent;
  background-color: #930489;
  border-style: ridge;
  border-radius: 15px;
  font-size: 1.6em;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700px;
  cursor: pointer;
  
}
.disabled {
  pointer-events: none;
}
.secondheader {
  width: 620px;
  display: flex;
  flex-direction: row;
  justify-content: space-between !important;
  
  
}

.mempic{
 height: 270px; 
 width: 350px;
 margin-top: 40px;
}

.Reset:focus, .startbutton:focus, .button:focus{
  color: #fff;
  background: #267c65;
}

#time, #moves-count, #result, #wrongmoves-count {
  color: white;
  text-align: center !important;
}
#result, #resulttime {
  font-size: 2rem;
}
h1 {
  font-size: 6rem;
  animation: blink 3s infinite;
}
@keyframes blink {
  50% {
      opacity: 0.1;
  }
}
.replaybutton {
margin-top: 50px;
}

.game{
  width: 650px;
  height: 370px;
  display: flex;
  flex-wrap: wrap;
  gap:8px;
  transform-style: preserve-3d;
  perspective: 500px;
}

.shake {
  animation: shake 0.6s 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);
  }
}


.items{
  position: relative;
  width: 100px;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3em;
  background: #fff;
  transition: 0.5s;
  transform: rotateY(180deg);

}

.items.boxOpen{
  transform: rotateY(0deg);
}

.items::after{
  content: '';
  position: absolute;
  inset: 0;
  background:#ededed;
  transition: 0.25s;
  transform: rotate(0deg);
  backface-visibility: hidden;
   /* animation to show cards for 4 seconds and flipped back */
  animation: 4s hideCard linear;
}
/* keyframes for showing the cards for 4 seconds and flipped back */
@keyframes hideCard {
  0% {
      transform: rotateY(0);
  }
  100% {
      transform: rotateY(180deg);
  }
}

.boxOpen:after,.boxMatch:after{
  transform: rotateY(180deg);
}

@media screen and (max-width: 451px) {
  .game {
      width: 90%;
      gap: 8px;
      height: 400px;
  }
  h3 {
      font-size: 1.2em;
  }
  .secondheader {
      width: 90%;
      flex-direction: column;
  }
  .container, .controls-container {
      padding: 20px;
      width: 100%;
  }
  .items {
      width: 22%;
      height: 60px;
      font-size: 2em;
  }
  h2 {
      font-size: 1.5em;
  }
  h1 {
      font-size: 1em;
      text-align: center;
  }
  .Reset, .startbutton, .replaybutton, .pausebutton, .resumebutton, .button, .nextbutton {
      font-size: 1em;
      padding: 10px 10px !important;
  }
  h1 {
      font-size: 4rem;
  }
  a {
      font-size: 1em;
  }
}

@media screen and (min-width: 451px) and (max-width: 650px) {
  .game {
      width: 90%;
      gap: 8px;
      height: 400px;
  }
  .secondheader {
      width: 90%;
  }
  h3 {
    font-size: 1.3em;
  }
  h2 {
      font-size: 1.5em;
  }
  h1 {
      font-size: 3.5em;
      text-align: center;
  }
  a {
    font-size: 0.8em;
}
  .container, .controls-container {
      padding: 20px;
      width: 100%;
  }
  .items {
      width: 22%;
      height: 65px;
      font-size: 2.5em;
  }
  .Reset, .startbutton, .replaybutton, .pausebutton, .resumebutton {
      font-size: 1.2em;
      padding: 12px 10px;
  }
}
@media screen and (min-width: 651px) and (max-width: 800px) {
  .game {
      width: 90%;
      gap: 5px;
      height: 300px;
  }
  .secondheader {
      width: 90%;
  }
  h2 {
      font-size: 1.8em;
  }
  h1 {
      font-size: 3.5em;
      text-align: center;
  }
  a {
    font-size: 0.8em;
}
  .container, .controls-container {
      padding: 20px;
      width: 100%;
  }
  .items {
      width: 15%;
      height: 70px;
  }
  .Reset, .startbutton, .replaybutton, .pausebutton, .resumebutton {
      font-size: 1.2em;
      padding: 15px 12px;
  }

}
@media screen and (min-width: 801px) and (max-width: 870px) {
  .game {
      width: 90%;
      gap: 5px;
      height: 300px;
  }
  .secondheader {
      width: 90%;
  }
  h2 {
      font-size: 2.4em;
  }
  h1 {
      font-size: 4.5em;
      text-align: center;
  }
  a {
    font-size: 0.8em;
}
  .container, .controls-container {
      padding: 20px;
      width: 100%;
  }
  .items {
      width: 15%;
      height: 70px;
  }
  .Reset, .startbutton, .replaybutton, .pausebutton, .resumebutton {
      font-size: 1.2em;
      padding: 15px 12px;
  }

}