/* Global styles and fonts */
@font-face {
  font-family: "Comic";
  src: url("../fonts/Satoshi-Medium.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  -webkit-text-stroke: 3px black;
  text-stroke: 3px black;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/Satoshi-Medium.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0;
  padding: 16px;
  color: #ffffe3;
  background: #0c6b3d;
  background-size: cover; /* Make sure the background image covers the entire viewport */
  font-family: "Poppins", sans-serif;
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-text {
  color: white;
  font-size: 1.2rem;
  text-align: center;
  padding: 10px 20px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 5px;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 500px; /* Adjust as needed */
  width: 100%;
  box-sizing: border-box;
}

h1 {
  font-family: "Comic";
  font-weight: normal;
  font-style: normal;
  font-size: 2.5rem;
  margin: 0; /* Ensure no default margins */
}

.navbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px; /* Add space below navbar */
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

.navbar-social a {
  margin-left: 1rem;
  display: inline-block;
}

.navbar-social img {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.navbar-social img:hover {
  transform: scale(1.2);
}

.introduction {
  font-family: "Comic";
}

canvas {
  border: 8px solid #000000;
}

.selectors-container {
  width: 100%; /* Take full width of parent container */
  margin-top: 20px; /* Adjust spacing as needed */
  background-color: #36362f;
  border: 8px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 16px; /* Increased padding for better touch targets */
  margin: 0 0.5rem;
  box-sizing: border-box;
  overflow-x: auto; /* Enable horizontal scrolling */
}

.category-container {
  display: flex;
  margin-bottom: 12px;
  gap: 10px;
  padding: 8px;
  background-color: #e6e6e6;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  white-space: nowrap; /* Ensure items stay on one line */
  overflow-x: scroll; /* Always show horizontal scrollbar */
  scrollbar-color: #888 #e6e6e6; /* Customize scrollbar colors (Firefox) */
  scrollbar-width: thin; /* Make scrollbar thinner (Firefox) */
}

/* Webkit-based browsers (Chrome, Safari) */
.category-container::-webkit-scrollbar {
  height: 12px; /* Customize scrollbar height */
}

.category-container::-webkit-scrollbar-thumb {
  background-color: #888; /* Customize scrollbar thumb color */
  border-radius: 8px; /* Customize scrollbar thumb border radius */
}

.category-container::-webkit-scrollbar-track {
  background-color: #e6e6e6; /* Customize scrollbar track color */
}

.options-container {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap; /* Prevent wrapping */
}

.option {
  width: 50px;
  height: 50px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #353535;
  transition: transform 0.2s ease-in-out;
  background: url("../images/mainmain.png") no-repeat center center; /* Set the background image */
  background-size: cover; /* Ensure the background image covers the entire element */
}

.option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.option:hover {
  transform: scale(1.1); /* Scale up on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow on hover */
}

.select-container {
  width: 100%; /* Full width for better touch targets on small screens */
  padding: 0; /* Adjust padding */
}

.select-container-head {
  display: none; /* Hide head selector */
}

.randomizeBtn,
.resetBtn,
.downloadBtn {
  width: 100%;
  font-family: "Comic", sans-serif;
  font-size: 16px;
  color: #010101;
  border: 3px solid #010101;
  border-radius: 8px;
  padding: 12px; /* Increase padding for better touch targets */
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background-color 0.2s ease-in-out, border 0.2s ease-in-out,
    0.2s ease-in-out;
}

label {
  display: none;
}

.downloadBtn {
  background-color: #fa453c;
  color: #fff;
}

.randomizeBtn:hover,
.resetBtn:hover,
.downloadBtn:hover {
  background-color: #000000;
  color: #fff;
  border: 3px solid #000000;
}

#avatarCanvas {
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  max-width: 500px;
  max-height: 500px;
  border-radius: 8px;
  border: 8px solid #000000;
  overflow: hidden;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
    margin: 0; /* Ensure no default margins */
  }
  .select-container {
    padding: 0 4px; /* Restore padding */
  }

  #avatarCanvas {
    width: 100%; /* Fixed size for larger screens */
    height: auto;
  }

  .navbar-logo img {
    height: 50px; /* Restore original size */
  }

  .selectors-container {
    max-width: 368px;
  }
}
