*{
    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;
}

.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;
}
h3 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.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: 430px;
    display: flex;
    flex-direction: row;
    justify-content: space-between !important;
    
    
}

.mempic{
   height: 270px; 
   width: 350px;
   margin-top: 40px;
}
.btns {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 20px;
    margin-top: 50px;
  }

/* .strtbtn{
   margin-left: 30%;
    background-color: rgba(255, 255, 255, 0.608);
    color: black;
    border-radius: 10%;
} */

/* .pausebtn{
    background-color: rgba(255, 255, 255, 0.608);
    color: black;
    border-radius: 10%;
} */

.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;
    }
}

.game{
    width: 430px;
    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: 85px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    background: #fff;
    transition: 0.5s;
    transform: rotateY(180deg);
    /* animation: 2sec hideCard linear; */

}

.items.boxOpen{
    transform: rotateY(0deg);
}

.items::after{
    content: '';
    position: absolute;
    inset: 0;
    background:#ededed;
    transition: 0.25s;
    transform: rotateY(0deg); 
    backface-visibility: hidden;
    /* animation to show cards for 2 seconds and flipped back */
    animation: 2s hideCard linear;
}
/* keyframes for showing the cards for 2 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: 300px;
    }
    h3 {
        font-size: 1.2em;
    }
    .secondheader {
        width: 90%;
        flex-direction: column;
    }
    .container, .controls-container {
        padding: 20px;
        width: 100%;
    }
    .items {
        width: 22%;
        height: 70px;
    }
    h2 {
        font-size: 1.5em;
    }
    h1 {
        font-size: 1em;
        text-align: center;
    }
    .Reset, .startbutton, .replaybutton, .pausebutton, .resumebutton, .button, .nextbutton {
        font-size: 1.2em;
        padding: 8px 12px !important;
    }
    h1 {
        font-size: 4rem;
    }
    a {
        font-size: 1em;
    }
}

@media screen and (min-width: 451px) and (max-width: 800px) {
    .game {
        width: 90%;
        gap: 10px;
        height: 300px;
    }
    .secondheader {
        width: 90%;
    }
    h3 {
        font-size: 1.4em;
    }
    h2 {
        font-size: 1.8em;
    }
    h1 {
        font-size: 3.5em;
        text-align: center;
    }
    .container, .controls-container {
        padding: 20px;
        width: 100%;
    }
    .items {
        width: 22%;
        height: 70px;
    }
    .Reset, .startbutton, .replaybutton, .pausebutton, .resumebutton {
        font-size: 1.2em;
        padding: 10px 12px;
    }
}
@media screen and (min-width: 801px) and (max-width: 870px) {
    h2 {
        font-size: 2.4em;
    }
}