@import url("https://fonts.cdnfonts.com/css/satoshi");
html,
body {
  overflow-x: hidden;
  font-family: "Satoshi", sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to right, #6b7280, #374151);
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(5px);
  position: relative;
  z-index: 100;
}
p {
  margin: 0px;
}
.logo img {
  height: 50px;
}

.menu-toggle {
  display: block;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #e5e7eb;
  transition: transform 0.3s ease;
  z-index: 1001;
  width: 30px;
  height: 30px;
  position: relative;
}
.menu-toggle div {
  width: 30px;
  height: 4px;
  background-color: #e5e7eb;
  margin: 5px 0;
  transition: 0.3s;
}
.menu-toggle.active div:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active div:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active div:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
  z-index: 1000;
  transition: right 0.4s ease-in-out;
}

.nav-links.active {
  width: 100%;
  right: 0;
}
.nav-links li {
  font-size: 24px;
}
.nav-links a {
  text-decoration: none;
  color: #e5e7eb;
  font-weight: bold;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: #facc15;
}

@media (min-width: 768px) {
  .menu-toggle {
    visibility: hidden;
  }
  .nav-links {
    position: relative;
    display: flex;
    flex-direction: row;
  }
  .leaderboard-table {
    width: 95% !important;
    margin: 0px 20px !important;
  }
  .leaderboard {
    width: 90% !important;
  }
  .button-container {
    gap: 80px !important;
  }
  .button-container button {
    font-size: 20px !important;
    padding: 10px 20px !important;
  }
  .leaderboard-table th {
    font-size: 18px !important;
  }
  .leaderboard-table td {
    font-size: 18px !important;
  }
  .header {
    font-size: 32px !important;
  }
}

@media (max-width: 769px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100dvh;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}

.header {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes borderAnimation {
  0% {
    border-color: #fa828e;
  }
  25% {
    border-color: #ffc889;
  }
  50% {
    border-color: #ffff8b;
  }
  75% {
    border-color: #8fffa8;
  }
  90% {
    border-color: #96d0fc;
  }
  100% {
    border-color: #fa828e;
  }
}

.button-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.button-container button {
  align-items: center;
  background-image: linear-gradient(144deg, #0391ad, #fc4747);
  border: 2px rgb(185, 185, 185) solid;
  border-radius: 8px;
  color: white;
  display: flex;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  padding: 8px 16px;
  touch-action: manipulation;
  cursor: pointer;
}

.button-container button:active,
.button-container button:hover {
  opacity: 0.8;
}

.leaderboard {
  width: 97%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border: 2px solid #000000;
  background-color: rgba(22, 22, 22, 0.404);
  border-radius: 8px;
  animation: borderAnimation 1.5s infinite linear;
  max-height: calc(100dvh - 250px);
  height: 100%;
  margin: auto;
  margin-top: 10dvh;
}

/* Table Container */
.table-container {
  display: flex;
  justify-content: center;
  margin: 20px 0px;
  width: 98%;
  max-height: calc(100dvh - 300px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Leaderboard Table */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  overflow-y: scroll;
}

/* Sticky Header */
.leaderboard-table thead {
  background-color: #2a3132;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: bold;
}

/* Table Cells */
.leaderboard-table th,
.leaderboard-table td {
  font-size: 12px;
  padding: 10px 5px;
  text-align: center;
  transition: background-color 0.3s ease;
  font-weight: 600;
  color: white;
}

.leaderboard-table td {
  font-weight: 600;
  color: black;
}

/* Alternating Row Colors */
.leaderboard-table tbody tr:nth-child(odd) {
  background-color: #a1d6e2;
}

.leaderboard-table tbody tr:nth-child(even) {
  background-color: #1995ad;
}

.leaderboard-table tbody tr:nth-child(1) td:nth-child(1) {
  background-color: #ffd700 !important; /* Gold */
}

.leaderboard-table tbody tr:nth-child(2) td:nth-child(1) {
  background-color: #c0c0c0 !important; /* Silver */
}

.leaderboard-table tbody tr:nth-child(3) td:nth-child(1) {
  background-color: #cd7f32 !important; /* Bronze */
}

/* Hover Effect */
.leaderboard-table tbody tr:hover {
  background-color: #ff6161;
}

footer {
  text-align: center;
  padding: 10px;
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(5px);
  margin-top: auto;
}

/* Global scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}
