@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,300;1,600&display=swap');

/* Game Page Styles */

body {
  text-align: center;
  margin: 0 auto;
  background-color: white;
  height: 100vh;
  width: 100%;
}

header {
  text-align: center;
  padding-top: 5px;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 900;
  border-bottom: 2px solid black;
  background: url("../images/pattern2.webp");  
  background-size: contain;
}

h1 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 200%;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
}

h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 200%;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
}

h3 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 150%;
}

p {
  font-size: 125%;
  padding: 25px;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 600;
}

a {
  color: black;
  text-decoration: none;
}

i {
  color: #000000;
}

/* Modal Styles */

.modal {
  z-index: 1000;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-image: url("../images/pattern2.webp");
  background-size: cover;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  border: 2px solid black;
}

/* Game Board Styles */

.game-board {
  padding-top: 20px;
  display: grid;
  justify-content: center;
  grid-gap: 10px;
  grid-template-columns: repeat(8, 110px);
  grid-template-rows: repeat(2, calc(110px / 2 * 3));
}

.card {
  height: calc(110px / 2 * 3);
  width: 110px;
  border-radius: 10px;
  background-color: white;
  position: relative;
  transform-style: preserve-3d;
  transition: all 0.5s ease-in-out;
  cursor: pointer;
}

.front-card {
  width: 100%;
  height: 100%;
}

.card.flipped {
  transform: rotateY(180deg);
}

.front, .back {
  backface-visibility: hidden;
  position: absolute;
  border-radius: 10px;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.card .front {
display: flex;
justify-content: center;
align-items: center;
}

.card .back {
background-image: url("../images/deck_of_cards/red.webp");
background-position: center center;
background-size: cover;
backface-visibility: hidden;
}

.card .front {
transform: rotateY(180deg);
}

.division {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.division div {
  width: 32vw;
}

/* Button Styles */

button {
  text-align: center;
  margin: 0 auto;
  font-weight: bold;
  width: 100px;
  height: 25px;
  margin: 10px;
  border: none;
  cursor: pointer;
  background-image: url("../images/pattern2.webp");
  border: 2px solid black;
  border-radius: 10px;
}

.modal-button {
  background-image: none;
  background-color: white;
}

/* media queries for tablet screens */

@media only screen and (max-width: 990px) {
  .game-board {
    display: grid;
    justify-content: center;
    grid-gap: 16px;
    grid-template-columns: repeat(6, 100px);
    grid-template-rows: repeat(2, calc(100px / 2 * 3));
  }
  
  .card {
    height: calc(100px / 2 * 3);
    width: 100px;
    border-radius: 10px;
    background-color: white;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.5s ease-in-out;
  }

  p {
    font-size: 120%;
  }

  button {
    width: 75px;
    font-size: 12px;
  }
}


/* media queries for smallest size screens */

@media only screen and (max-width: 700px) {
    .game-board {
      display: grid;
      justify-content: center;
      grid-gap: 16px;
      grid-template-columns: repeat(4, 50px);
      grid-template-rows: repeat(3, calc(50px / 2 * 3));
    }

    .card {
      height: calc(50px / 2 * 3);
      width: 50px;
      border-radius: 10px;
      background-color: white;
      position: relative;
      transform-style: preserve-3d;
      transition: all 0.5s ease-in-out;
    }

    .division {
      display: inline;
      flex-wrap: wrap;
      align-items: center;
    }
    
    .division div {
      width: 100vw;
    }

    .division div p {
      padding: 0px;
    }

    p {
      font-size: 100%;
    }

    button {
      padding: 5px;
      width: 60px;
      font-size: 8px;
    }
}