* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

:root {
  --bg: #4c7766;
  --bg-grid: #f1dec6;
  --clr: #f3b105;
  --clr-line: #000;
  font-size: 16px; /* You can adjust this for different screen sizes */
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--bg);
  padding: 1rem;
}

#typewriter {
  text-align: center;
  color: var(--clr);
  font-family: "Mansalva", cursive;
  font-size: 4rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

h2 {
  text-align: center;
  color: var(--clr);
  font-family: "Lato", sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0);
  transition: transform 1.2s ease-in, opacity 1.2s ease-in;
}

/* Flexbox for difficulty level */
.difficulty-level {
  margin: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.difficulty-level label {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  text-align: center;
  color: var(--clr);
  font-family: "Lato", sans-serif;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

input[type="radio"] {
  margin-right: 0.5rem;
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--clr);
  border-radius: 50%;
  background-color: white;
  cursor: pointer;
  position: relative;
}

input[type="radio"]:checked {
  background-color: var(--bg-grid);
}

input[type="radio"]::before {
  content: '';
  display: block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background-color: var(--clr);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s ease-in-out;
}

input[type="radio"]:checked::before {
  transform: translate(-50%, -50%) scale(1);
}

/* Sudoku grid container */
.sudoku-container {
  display: inline-block;
}

#sudoku-grid {
  width: 100%;
  border-collapse: collapse;
  border: 4px solid black;
  margin-top: 20px;
}

#sudoku-grid td {
  width: 3.2rem; /* Ensure the grid adapts */
  height: 3.2rem;
  text-align: center;
  border: 1px solid var(--clr-line);
  padding: 0;
}

input {
  background: var(--bg-grid);
  width: 100%;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
  box-sizing: border-box;
}

input:focus {
  outline: none;
  background-color: var(--clr);
}

#sudoku-grid tr:nth-child(3),
#sudoku-grid tr:nth-child(6) {
  border-bottom: 4px solid black;
}

#sudoku-grid td:nth-child(3),
#sudoku-grid td:nth-child(6) {
  border-right: 4px solid black;
}

button {
  background: transparent;
  border: 3px solid var(--clr);
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.49);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 20px;
  padding: 10px 20px;
  width: 8rem;
  transition: background 0.6s ease;
}

button:hover {
  color: black;
  background: #f3b105;
}

.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;
}

/* Hide the socials-menu by default */
.socials-menu {
  opacity: 0;
  pointer-events: none; /* Disable interaction when hidden */
  transition: opacity 0.5s ease-in-out;
}

.socials-wrapper.active .socials-menu {
  opacity: 1;
  pointer-events: auto; /* Enable interaction when visible */
}

.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;
  height: 2rem;
  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);
}


#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);
}



/* Media Queries for responsive design */
@media (max-width: 920px) {
  #typewriter {
    font-size: 2.5rem; /* Scale down title for smaller screens */
  }

  h2 {
    font-size: 1.5rem; /* Adjust subtitle size */
  }

  .difficulty-level label {
    font-size: 1rem; /* Make difficulty text smaller */
  }

  button {
    width: 30%; /* Make buttons take full width */
    font-size: 0.9rem;
  }

  #sudoku-grid td {
    width: 40px; /* Adjust cell size for smaller screens */
    height: 40px;
  }
  
  
  #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: 768px) {
  #typewriter {
    font-size: 2rem; /* Scale down title for smaller screens */
  }

  h2 {
    font-size: 1.2rem; /* Adjust subtitle size */
  }

  .difficulty-level label {
    font-size: 1rem; /* Make difficulty text smaller */
  }

  button {
    width: 30%; /* Make buttons take full width */
    font-size: 0.9rem;
  }

  #sudoku-grid td {
    width: 40px; /* Adjust cell size for smaller screens */
    height: 40px;
  }
  #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: 480px) {
  #typewriter {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1rem;
  }

  .difficulty-level label {
    font-size: 0.9rem;
  }

  button {
    width: 30%;
    padding: 8px;
    font-size: 0.8rem;
  }

  #sudoku-grid td {
    width: 30px;
    height: 30px;
  }

  #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: 300px) {
  #typewriter {
    font-size: 1rem;
  }

  h2 {
    font-size: .6rem;
  }

  .difficulty-level label {
    font-size: 0.6rem;
  }

  button {
    width: 30%;
    padding: 8px;
    font-size: 0.5rem;
  }

  #sudoku-grid td {
    width: 25px;
    height: 25px;
  }

  #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 */
  }

}
