*,
*::after,
*::before {
  box-sizing: border-box;
  font-family: "Noto Sans", sans-serif;
}

:root {
  --table-clr: #006400;
  --border-clr: #bc6c25;
  --background-clr: #242423;
  --background-clr-alt: #333533;
  --scorecard-clr: #cfdbd5;
  --button-bg-clr: #0a6bff;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(
    -45deg,
    var(--background-clr) 53%,
    var(--background-clr-alt) 53%
  );
  position: relative;
}

.help-button {
  width: 35px;
  height: 35px;
  padding: 0;
  margin: 0;
  position: absolute;
  top: 0;
  right: 20px;
  background: var(--background-clr);
  border: none;
}

.help-icon {
  height: 35px;
  width: 35px;
}

.game {
  display: flex;
  flex-direction: column;
  max-width: fit-content;
  min-width: fit-content;
  justify-content: space-around;
  gap: 2rem;
  margin: 2rem auto;
  perspective: 1000px;
}

.top-text {
  margin: auto;
  display: flex;
  align-items: center;
  position: relative;
  font-size: 1.2rem;
  color: #fff;
}

img {
  height: 15rem;
}

.card {
  position: relative;
  height: 15rem;
  width: 10rem;
}

.card.turned .card-back {
  transform: rotateY(-180deg);
}

.card.turned .card-front {
  transform: rotateY(0);
}

.card-face {
  position: absolute;
  height: inherit;
  transition: transform 500ms ease-in-out;
  backface-visibility: hidden;
  border-radius: 1rem;
  box-shadow: 1px 1px 4px 2px black;
  transform-style: preserve-3d;
}

.card-back {
  transform: rotateY(0);
}

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

.table,
.hand {
  border: 0.5rem solid var(--border-clr);
  max-width: fit-content;
  min-width: fit-content;
  gap: 2rem;
  padding: 2rem;
  display: flex;
  background-color: var(--table-clr);
}

.table {
  border-bottom: none;
  border-radius: 1rem 1rem 0 0;
}

.player {
  display: flex;
  max-width: fit-content;
  min-width: 100%;
}

.hand {
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 1rem;
}

.hand > img {
  height: fit-content;
  width: fit-content;
}

.stats {
  background-color: var(--table-clr);
  border: 0.5rem solid var(--border-clr);
  flex: auto;
  border-top: none;
  border-left: none;
  border-radius: 0 0 1rem 0;
  padding: 1rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-evenly;
}

.buttons-row {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.counter {
  padding: 0;
  background: linear-gradient(
    -45deg,
    var(--scorecard-clr) 50%,
    var(--button-bg-clr) 50%
  );
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  border: 1px solid black;
  width: 10rem;
  height: 10rem;
  border-radius: 1rem;
}

.stats-text-title {
  display: flex;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--background-clr-alt);
  padding-left: 1rem;
  position: relative;
  font-size: 1.2rem;
  width: 100%;
}

.stats-text-value {
  display: flex;
  font-size: 1.5rem;
  font-weight: 600;

  justify-content: end;
  padding-right: 1rem;
  position: relative;
  font-size: 1.2rem;
  width: 100%;
}

.button {
  background-color: var(--button-bg-clr);
  border-radius: 4px;
  border: 0;
  box-shadow: rgba(1, 60, 136, 0.5) 0 -1px 3px 0 inset,
    rgba(0, 44, 97, 0.1) 0 3px 6px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inherit;
  font-family: "Space Grotesk", -apple-system, system-ui, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem;
  padding: 16px 20px;
  position: relative;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  /* vertical-align: baseline; */
  transition: all 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
  width: 15rem;
}

.button:hover:enabled {
  background-color: #065dd8;
  transform: translateY(-2px);
}

.button:active:enabled {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.5;
}

.winning-card {
  transition: scale 300ms ease-in-out;
  box-shadow: 1px 1px 4px 2px gold;
  scale: 1.07;
}

/* MODAL STYLING */

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.3); /* Black w/ opacity */
}

.show {
  display: flex;
}

/* Modal Content/Box */
.modal-content {
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: center;
  background-color: var(--scorecard-clr);
  border: 7px solid var(--background-clr);
  width: fit-content;
  height: fit-content;
  border-radius: 0.5rem;
  box-shadow: rgba(0, 0, 0, 0.75) 0px 22px 70px 4px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.instructions {
  width: 50rem;
}

ol {
  padding-left: 1rem;
}

li {
  margin-bottom: 1rem;
}

.poker-hands-image {
  width: 50rem;
  height: auto;
  margin: 0;
  padding: 0;
}

/* The Close Button */
.close {
  /* Position it in the top right corner outside of the modal */
  position: absolute;
  right: 1rem;
  top: 0.5rem;
  color: var(--background-clr);
  font-size: 35px;
  font-weight: bold;
}

/* Close button on hover */
.close:hover,
.close:focus {
  color: red;
  transform: scale(1.1);
  cursor: pointer;
}

.modal-heading {
  margin: 0.3rem;
  padding: 0;
}

/* Add Zoom Animation */
.animate {
  -webkit-animation: animatezoom 0.6s;
  animation: animatezoom 0.6s;
}

@-webkit-keyframes animatezoom {
  from {
    -webkit-transform: scale(0);
  }
  to {
    -webkit-transform: scale(1);
  }
}

@keyframes animatezoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
