*{
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body{
  margin:0;
  height: 100%;
  background: #161A22;
}

nav{
  margin: 1.24rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav img{
  width: 50px;
  margin-left: 1rem;
}

nav button{
  font-family: "Nunito", sans-serif;
  font-weight: 300;
  color: white;
  background-color: #242b33;
  border-style: solid;
  border-width: 1px;
  border-color: #38434e;
  border-radius: .3rem;
  height: 2.2rem;
  width: 6rem;
  margin-right: 1rem;
}

nav button:hover{
  cursor: pointer;
  background-color: #3e5167;
  box-shadow: 3px 3px 5px 3px #0000001e;
  transition: .1s ease;
}

nav button:active{
  background-color: rgba(255, 255, 255, 0.302);
  animation: flash .3s ease;
}

section{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  margin-top: 4rem;
  color: white;
  font-weight: 600;
  font-size: 1.8rem;
}

.score-wrapper{
  font-family: "Nunito", sans-serif;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  color: #1adbfb;
  font-size: .9rem;
}

.score-wrapper p{
  margin: 0;
}

.reset-btn-wrapper{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
}

.reset-btn{
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  color: white;
  background-color: #222831;
  border-style: solid;
  border-width: 1px;
  border-color: #38434e;
  border-radius: .3rem;
  height: 2.4rem;
  width: 5rem;
}

.reset-btn:hover{
  cursor: pointer;
  background-color: #3e5167;
  box-shadow: 3px 3px 5px 3px #0000001e;
  transition: .1s ease;
}

.reset-btn:active{
  background-color: rgba(255, 255, 255, 0.302);
  animation: flash .3s ease;
}

.card-game-grid{
  margin: 0;
  margin-top: 2rem;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.card-back{
  background-image: url('card-logo.svg');
  background-size: cover;
  background-color: #222831;
  border-style: solid;
  border-width: 1px;
  border-color: #38434e;
  height: 64px;
  width: 64px;
  border-radius: .4rem;
  transform: rotateY(180deg);
  background: #222831 url('card-logo.svg') center/cover no-repeat;
}

.card-front{
  border-style: solid;
  border-width: 1px;
  border-color: #38434e;
  border-radius: .4rem;
  width: 64px;
  height: 64px;
  background-size: cover;
  background-position: center;
}

.card-design {
  width: 64px;
  height: 64px;
  perspective: 1000px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform: rotateY(180deg);
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card-front, .card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: .4rem;
}

.card-inner.flipped {
  transform: rotateY(0deg);
}

.card-design:hover{
  cursor: pointer;
}

/* Light mode */

body.light-mode{
  background: #ffffff;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(247, 252, 255, 1) 50%, rgba(255, 255, 255, 1) 100%);
}

body.light-mode nav button{
  background-color: white;
  border-color: #e0e8f5;
  color: #1f283a;
  font-weight: 700;
}

body.light-mode nav button:hover{
   box-shadow: 3px 3px 5px 3px #5177a90f;
}

body.light-mode h1{
  color: #425376;
}

body.light-mode .score-wrapper{
  color:#52abda;
}

body.light-mode .reset-btn{
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  color: #1f283a;
  background-color: white;
  border-style: solid;
  border-width: 1px;
  border-color: #e0e8f5;
}

body.light-mode .reset-btn:hover{
  box-shadow: 3px 3px 5px 3px #5177a90f;
  transition: .1s ease;
}

body.light-mode .card-design{
  background-color: white;
  border-color: #e0e8f5;
}

/* Screen size adjustments */

@media (max-width: 600px) {
  .card-game-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }

}
