* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: auto;
  font-family: Arial, sans-serif;
  background-color: black;
  color: white;
  display: flex;
  flex-direction: column;

}

/* Header */
header {
  background-color: black;
  color: white;
  text-align: center;
  padding: 20px 0;
  font-size: 22px;
}

/* Footer */
footer {
  background-color: black;
  color: white;
  text-align: center;
  padding: 20px 15px;
  font-size: 16px;
  width: 100%;
  line-height: 1.6;
}

.footer-text {
  margin: 0;
  font-size: 1rem;
  word-wrap: break-word;
}



/* Navbar Styles */
.navbar {
  background-color: black;
  font-family: Arial, Helvetica, sans-serif;
  padding: 0 15px 10px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.navdiv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
    position: relative;
}

.navbar ul {
  list-style: none;
 
  margin: 0;
  padding: 0;
}

.navbar ul li {
  margin: 0 30px;
}

.navbar ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  padding: 15px 12px;
  display: inline-block;
  position: relative;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.navbar ul li a:hover {
  background-color: lightgray;
  color: #333; 
  border-radius: 5px; 
}

.navbar ul li a:hover:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 3px;
  background-color: lightgray;
}

.logo a {
  color: white;
  font-size: 30px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-weight: bold;
  font-size: 1.6rem;
  color: white;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* Leaderboard container */
.leaderboard-container {
  text-align: center;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  align-items: center; 
}

/* Title & Subtitle */
.leaderboard-title {
  font-size: 50px;
  margin-bottom: 10px;
  font-weight: bold;
}

.leaderboard-subtitle {
  font-size: 24px;
  margin-bottom: 30px;
  font-weight: bold;
  color: white;
}

/* Table Styling */
.leaderboard-table {
  margin: 0 auto; /* Center the table horizontally */
  width: 90%;     /* or use a fixed width like 800px if preferred */
  border-collapse: collapse;
  font-size: 20px;

  
  max-width: 800px;
  width: 100%;
  margin: 0 auto;



}

.leaderboard-table th {
  background-color: white;
  color: black;
  font-size: 22px;
  padding: 15px;
  border: 2px solid #ddd;
}

.leaderboard-table td {
  background-color: white;
  color: black;
  padding: 15px;
  text-align: center;
  border: 2px solid #ddd;
}

.leaderboard-table tbody tr:nth-child(even) td {
  background-color: #f9f9f9;
}

.leaderboard-table tbody tr:hover td {
  background-color: #e6f7ff;
}

/* Medals */
.leaderboard-table tbody tr:nth-child(1) td:first-child {
  font-weight: bold;
  color: gold;
}
.leaderboard-table tbody tr:nth-child(2) td:first-child {
  font-weight: bold;
  color: silver;
}
.leaderboard-table tbody tr:nth-child(3) td:first-child {
  font-weight: bold;
  color: #cd7f32;
}
.back-home-button {
    display: inline-block;
    margin: 30px 0 10px 40px;
     padding:  10px 20px;
    background-color: black;
    color: white;
    border: 2px solid white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  max-width: fit-content;      /* Prevents full width */
  width: auto;                 /* Ensures it's only as wide as its content */
  text-align: center; 
  }
  
  .back-home-button:hover {
    background-color: white;
    color: black;
    transform: scale(1.05);
  }
/* Responsive */
@media (max-width: 768px) {
  .leaderboard-title {
    font-size: 36px;
  }
    .menu-toggle {
    display: block;
  }

  .leaderboard-subtitle {
    font-size: 18px;
  }

  .leaderboard-table {
    font-size: 16px;
  }

  .navbar ul {
    flex-direction: column;
    align-items: center;
  }

  .navbar li {
    margin: 10px 0;
  }

  .navdiv {
    align-items: center;
    flex-direction: row;
  justify-content: space-between;
  }

.nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: black;
    flex-direction: column;
    width: 100%;
    padding: 10px 0;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid white;
  }
  .leaderboard-container {
  overflow-x: auto;
}

.leaderboard-table {
  min-width: 600px;
  width: 100%;
}

}