@font-face {
  font-family: "Oswald";
  src: url("fonts/Oswald-VariableFont_wght.ttf") format("truetype");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-cont: #301d24;
  --bg-card: #fffff5;
  --bg-button: #556f66;
  --clr-font: #fffff5;
  --clr-message: #cbbb09;
}

body {
  font-family: "Oswald", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-image: url(images/Black_Jack_background_image.png);
  background-size: cover;
}

.game-container {
  background-color: var(--bg-cont);
  border-radius: 10px;
  padding: 20px;
  color: var(--clr-font);
  text-align: center;
}

h1 {
  margin-top: 0;
  color: var(--clr-message);
}

#dealer-hand,
#player-hand {
  margin-bottom: 1rem;
}

#dealer-cards,
#player-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  width: 5rem;
  height: 7.5rem;
  background-color: var(--bg-card);
  border-radius: 10px;
  margin: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5);
  border: 1px solid transparent;
  position: relative;
  color: black; /* Default color */
}

.card.spades,
.card.clubs {
  color: black;
}

.card.hearts,
.card.diamonds {
  color: red;
}

button {
  background-color: var(--bg-button);
  color: var(--clr-font);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  margin: 0.2rem 0.4rem;
  cursor: pointer;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5);
  border: 1px solid transparent;
  border-radius: 10px;
}

#message {
  color: var(--clr-message);
  margin-top: 1rem;
  font-weight: bold;
  font-size: 1.5rem;
  animation: fade 2s 5 ease-in-out; /* Infinite to allow it to pulse 5 times */
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.socials-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
  width: 100%;
}

#social-container {
  position: fixed;
  bottom: 5.3rem;
  right: 7.6rem;
  display: flex;
  align-items: center;
  z-index: 2;
}

#click-hint {
  font-size: 0.9rem;
  color: red;
  margin-left: 0.5rem;
  white-space: nowrap;
}

.socials-menu {
  opacity: 0;
  transition: opacity 0.5s;
}

.active > .socials-menu {
  opacity: 1;
}

#share-button {
  position: fixed;
  bottom: 4.6rem;
  right: 4.6rem;
  width: 3rem;
  height: 3rem;
  z-index: 2;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.4s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

#share-button img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
}

.active #share-button img {
  transform: scale(1.03);
}

.social {
  position: fixed;
  list-style: none;
  bottom: 5rem;
  right: 5rem;
  display: grid;
  cursor: pointer;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  outline: 2px solid white;
  outline-offset: 3px;
  transition: all 0.5s ease-in-out;
}

.social img {
  width: 2rem; /* Adjust size as needed */
  height: 2rem; /* Adjust size as needed */
  display: block;
}

.active .social:nth-child(1) {
  transform: translate(-30px, -45px);
}

.active .social:nth-child(2) {
  transform: translate(-50px, 12px);
}

.active .social:nth-child(3) {
  transform: translate(30px, -45px);
}

.active .social:nth-child(4) {
  transform: translate(50px, 12px);
}

.active .social:nth-child(5) {
  transform: translateY(50px);
}

@media (max-width: 680px) {
  #social-container {
    position: static; /* Make sure it's within the flow of the document */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0; /* Adjust the spacing as needed */
    width: 100%;
  }

  #click-hint {
    margin: 0 0 0.5rem 0; /* Space between text and image */
    text-align: center;
  }

  #share-button {
    position: static;
    margin: 0.5rem auto; /* Center the button initially */
    transition: all 0.4s ease-in-out;
  }

  .social {
    position: static; /* Make sure it's within the flow of the document */
    margin: 0.7rem; /* Adjust margin as needed */
    display: inline-block; /* Display inline to align them properly */
    justify-content: center;
    align-items: center;
    width: 1.5rem;
    height: 1.5rem;
  }

  .socials-menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Wrap the items to the next line if needed */
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .social img {
    width: 1.5rem; /* Adjust size as needed */
    height: 1.5rem; /* Adjust size as needed */
    display: block;
  }

  .active .social:nth-child(1),
  .active .social:nth-child(2),
  .active .social:nth-child(3),
  .active .social:nth-child(4),
  .active .social:nth-child(5) {
    transform: none; /* Reset transform for mobile */
  }

  .icon-button,
  .task-item input[type="checkbox"],
  .task-item button {
    transform: none; /* Reset transforms on hover */
    box-shadow: none; /* Reset shadows on hover */
  }
}
