:root {
  --btn-width-mobile: 2.5rem;
}
* {
  margin: 0;
  padding: 0;
}

html,
body {
  margin: 1rem;
}

.hidden {
  display: none !important;
}

.startMessage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.4); /* Black background with 50% opacity */
  color: white; /* White text color */
  padding: 30px; /* Adjust padding as needed */
  font-size: 30px; /* Adjust the font size as needed */
  z-index: 1;
}

#section_container,
html,
body {
  height: calc(100% - 2rem);
}

#section_container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cards_section {
  position: relative;
  flex: 3;
}

.buttons_section {
  flex: 2;
}

.background_element {
  margin: 1rem;
  border-radius: 1rem;
  height: 100%;
  background: #d9d9d9;
  box-shadow: -15px 15px 27px 2px rgba(0, 0, 0, 0.45);
}

.correct_answer {
  outline: 4px solid limegreen;
}

.card_container {
  height: calc(50%);
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  justify-content: center;
}

.card_container_1 {
  height: 50%;
  display: flex;
  flex-wrap: nowrap;
  align-items: start;
  justify-content: center;
}

.card {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  height: 85%;
  width: auto;
  margin: 1rem;
  background: #b2adad;
  filter: drop-shadow(-4px 4px 4px rgba(0, 0, 0, 0.44));
}

/*
.card {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  height: 22.3rem;
  width: 15rem;
  margin: 1rem;
  background: #b2adad;
  filter: drop-shadow(-4px 4px 4px rgba(0, 0, 0, 0.44));
}
*/

.card img {
  /*width: 14rem;*/
  width: 90%;
  height: 90%;
  filter: drop-shadow(-2px 2px 2px rgba(0, 0, 0, 0.31));
}

.pair :first-child {
  width: 21.2rem;
}

.next :nth-child(2) {
  width: 21.2rem;
}

.six_card :first-child {
  width: 12.55rem;
}

.buttons_container {
  padding: 0.5rem 0rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0.5rem;
  border-radius: 0.5rem;
  width: 27rem;

  background: #b2adad;
  filter: drop-shadow(-4px 4px 4px rgba(0, 0, 0, 0.44));
}

.redify-in {
  background-color: red !important;
  transition: background-color 0.5s ease;
}

@keyframes shakeAnimation {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

.shake {
  animation: shakeAnimation 0.5s ease; /* Adjust the duration and timing function for the shake effect */
}

.redify-out {
  transition: background-color 0.5s ease;
}

.buttons_container btn {
  display: flex;
  background: white;
  border-radius: 0.5rem;
  margin: 0.2rem;
  padding: 1rem 2rem;
  width: 4rem;
  height: 2vh;
  filter: drop-shadow(-2px 2px 2px rgba(0, 0, 0, 0.31));
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  font-weight: bold;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.buttons_container btn:active {
  transform: translateY(2px);
}

.button_section_container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: inherit;
}

.results_section_container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: inherit;
}

.break {
  flex-basis: 100%;
  height: 0;
}

.selected {
  outline: 4px solid rgb(235, 0, 0);
}

.two_wide {
  width: 8rem !important;
}

@media only screen and (max-width: 1100px) {
  #section_container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }
  .cards_section {
    position: relative;
    flex: 3;
    width: 100%;
  }
  .buttons_section {
    flex: 2;
    width: 100%;
  }

  .card {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    width: 25%;
    height: 85%;
    background: #b2adad;
    filter: drop-shadow(-4px 4px 4px rgba(0, 0, 0, 0.44));
  }

  .buttons_container {
    padding: 0.5rem 0rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1rem;
    border-radius: 0.5rem;
    width: 85%;

    background: #b2adad;
    filter: drop-shadow(-4px 4px 4px rgba(0, 0, 0, 0.44));
  }

  .buttons_container btn {
    display: flex;
    background: white;
    border-radius: 0.5rem;
    margin: 0.3rem;
    padding: 1rem 2rem;
    width: var(--btn-width-mobile);
    height: 2vh;
    filter: drop-shadow(-2px 2px 2px rgba(0, 0, 0, 0.31));
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
  }

  .break {
    flex-basis: 0%;
    height: 0;
  }

  .pair :first-child {
    width: 9.8rem;
  }

  .next :nth-child(2) {
    width: 21.2rem;
  }

  .six_card :first-child {
    width: var(--btn-width-mobile);
  }

  .playButton {
    width: 5rem !important;
  }

  .anteButton {
    width: 5rem !important;
  }
}
