/* Style for the leaderboard container */
#leaderboard-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

/* Style for each leaderboard section */
.leaderboard-section {
  margin-bottom: 10px;
  background-color: #4e342e;
  border-radius: 5px;
  padding: 10px;
  color: #fbe9e7;
  display: none;
  width: 100%;
  max-width: 600px;
}

/* Style for the leaderboard title */
.leaderboard-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  margin-top: 10px;
}

/* Style for the leaderboard container */
#leaderboard-by-score,
#leaderboard-by-recent {
  max-height: 60vh; /* Adjust the maximum height as needed */
  overflow-y: auto; /* Enable vertical scrolling if needed */
  padding: 20px;
  padding-top: 0;
  margin: 0;
}

/* Style for each leaderboard entry */
#leaderboard-by-score li,
#leaderboard-by-recent li {
  margin-bottom: 10px;
  padding: 10px;
  background-color: #5d4037;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #795548;
  color: #fbe9e7;
  flex-wrap: wrap;
  gap: 10px;
}

/* Style for the "View" button */
#leaderboard-by-score li button,
#leaderboard-by-recent li button {
  padding: 5px 10px;
  background-color: #e28a93;
  color: #3e2723;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bolder;
}
h1,
h2 {
  text-align: center;
  color: #fbe9e7;
}
h1 {
  font-size: 5vmax;
}
body {
  background: linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.1) 12%,
      transparent 0,
      transparent 88%,
      rgba(0, 0, 0, 0.1) 0
    ),
    linear-gradient(135deg, transparent 37%, rgba(40, 20, 10, 0.2) 0, rgba(40, 20, 10, 0.2) 63%, transparent 0),
    linear-gradient(45deg, transparent 37%, rgba(0, 0, 0, 0.1) 0, rgba(0, 0, 0, 0.1) 63%, transparent 0)
    #3e2723;
  background-size: 25px 25px;
  font-family: Arial, sans-serif;
  color: #fbe9e7;
}
.back-btn {
  font-weight: bolder;
  color: #3e2723;
  background-color: #e28a93;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em; /* Corrected font size */
  padding: 10px;
  top: 0px;
  height: max-content;
  width: calc(25%);
}
::-webkit-scrollbar {
  height: 10px;
  width: 10px;
  overflow: auto;
}
::-webkit-scrollbar-track {
  background: #3e2723;
}
::-webkit-scrollbar-thumb {
  background: #795548;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5d4037;
}

.ad-container {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-links {
  margin-top: 20px;
  color: white;
}
.footer-links a {
  color: #e28a93;
  text-decoration: none;
  margin: 0 5px;
}
.footer-links a:hover {
  text-decoration: underline;
}

/* Screen reader only utility class for SEO headings */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Tabs styling */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.tab-btn {
  background-color: #5d4037;
  color: #fbe9e7;
  border: 1px solid #795548;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
}
.tab-btn:first-child {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}
.tab-btn:last-child {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}
.tab-btn.active {
  background-color: #e28a93;
  color: #3e2723;
}

#leaderboard-container {
  display: flex;
  justify-content: center;
}

.leaderboard-section.active-tab {
  display: block;
}

.leaderboard-entry-text {
  flex: 1;
  word-break: break-word;
}

@media (max-width: 600px) {
  #leaderboard-by-score,
  #leaderboard-by-recent {
    padding: 10px;
  }

  #leaderboard-by-score li,
  #leaderboard-by-recent li {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  #leaderboard-by-score li button,
  #leaderboard-by-recent li button {
    align-self: flex-end;
  }
}
