@font-face {
  font-family: "Mansalva";
  src: url("fonts/Mansalva-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Lato";
  src: url("fonts/Lato-Regular.ttf") format("truetype");
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

:root {
  --bg: #2b2b42;
  --clr: #f2b717;
  --bg-mod: #513449;
}

body {
  background: rgb(242, 183, 23);
  background: linear-gradient(
    62deg,
    rgba(242, 183, 23, 1) 31%,
    rgba(43, 43, 66, 0.99781162464986) 93%
  );
  background-size: cover; /* Ensure the gradient covers the entire viewport */
  background-repeat: no-repeat; /* Prevent the gradient from repeating */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: "Lato", sans-serif;
  text-align: center;
}

#runaway-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: "Mansalva", cursive;
  transform: translate(-50%, -50%);
  height: 4rem;
  width: 12rem;
  font-size: 1.5rem;
  border-radius: 10px;
  border: none;
  box-shadow: 1px 1px 5px black;
  background-color: #006400;
  color: var(--clr);
}

#runaway-btn:hover {
  background-color: red;
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: var(--bg-mod);
  color: var(--clr);
  margin: 15% auto;
  padding: 1.2rem;
  border: 1px solid var(--bg);
  border-radius: 10px;
  width: 80%;
  max-width: 25rem;
  text-align: center;
  display: flex;               /* Use flexbox */
  flex-direction: column;      /* Arrange children vertically */
  justify-content: center;     /* Center content vertically */
  align-items: center;         /* Center content horizontally */
  gap: 1rem;    
}

.blurred {
  filter: blur(5px);
}

#message {
  font-family: "Mansalva", cursive;
  font-size: 2rem;
}

.start-game {
  width: 8rem;
  height: 3rem;
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr);
  cursor: pointer;
  margin: 1.5rem;
  text-align: center;
  border: none;
  background-size: 300% 100%;
  border-radius: 1rem;
  -moz-transition: all 0.4s ease-in-out;
  -o-transition: all 0.4s ease-in-out;
  -webkit-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
}

.start-game:hover {
  background-position: 100% 0;
  -moz-transition: all 0.4s ease-in-out;
  -o-transition: all 0.4s ease-in-out;
  -webkit-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
}

.start-game:focus {
  outline: none;
}

.start-game.hov {
  background-image: linear-gradient(
    to right,
    #0ba360,
    #3cba92,
    #30dd8a,
    #2bb673
  );
  box-shadow: 0 4px 15px 0 rgba(23, 168, 108, 0.75);
}

.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);
}

/* Responsive Styles */
@media (max-width: 680px) {
  #runaway-btn {
    width: 40%;
    height: 3rem;
    font-size: 1rem;
    top: 50%; /* Ensure the button starts in the center */
    left: 50%;
    transform: translate(-50%, -50%); /* Center the button */
  }

  .modal-content {
    width: 90%;
    margin: 20% auto;
    padding: 1rem;
  }

  .start-game {
    width: 6.5rem;
    height: 2.5rem;
    font-size: 0.9rem;
  }

  #message {
    font-size: 1.25rem;
  }
}

@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 */
  }
}

@media (max-width: 400px) {
  #runaway-btn {
    width: 30%;
    height: 3rem;
    font-size: 0.8rem;
    top: 50%; /* Ensure the button starts in the center */
    left: 50%;
    transform: translate(-50%, -50%); /* Center the button */
  }

  .modal-content {
    width: 90%;
    margin: 20% auto;
    padding: 1rem;
  }

  .start-game {
    width: 5.5rem;
    height: 2rem;
    font-size: 0.8rem;
  }

  #message {
    font-size: 1rem;
  }
}
