
.leaderboard-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 20px;
}

.leaderboard-section h2 {
    text-align: center;
    font-size: 34px;
    margin-bottom: 25px;
    color: #38bdf8;
}


.team-search {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 35px;
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

.team-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #020617;
}

.team-search input::placeholder {
    color: #94a3b8;
}


.leaderboard {
    background: rgba(255, 255, 255, 0.2); /* Semi-transparent */
    backdrop-filter: blur(10px); /* Blur effect */
    border-radius: 15px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Ensures nothing overflows */
    width: 85%; /* Container width */
    margin-left: 8%;
    margin-bottom: 2%;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    padding: 14px 20px;
    border-bottom: 1px solid #0f172a;
    transition: background 0.2s ease, transform 0.15s ease;
}

/* HEADER */
.leaderboard-row.header {
    font-weight: bold;
    color: #94a3b8;
    background: #020617;
}

/* HOVER */
.leaderboard-row:not(.header):hover {
    background: #0f172a;
    transform: scale(1.01);
}


.not-found {
    text-align: center;
    padding: 25px;
    font-size: 18px;
    color: #f87171;
    font-weight: 600;
}

.leaderboard-toggle {
  position: relative;
  display: flex;
  width: 220px;
  background: #1e1e1e;
  border-radius: 50px;
  padding: 4px;
  cursor: pointer;
  user-select: none;
  margin: 20px auto; 
}

.leaderboard-toggle button {
  flex: 1;
  background: none;
  border: none;
  color: white;
  padding: 8px 0;
  z-index: 2;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

.leaderboard-toggle button.active {
  color: black;
}

.toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, #0066ff, #00b3ff);
  border-radius: 50px;
  transition: transform 0.3s ease;
  z-index: 1;
}

.leaderboard-toggle.total-active .toggle-slider {
  transform: translateX(100%);
}
 

@media (max-width: 600px) {
    .leaderboard-row {
        grid-template-columns: 1fr 2fr 1fr;
        font-size: 14px;
    }

    .team-search {
        flex-direction: column;
    }

    .team-search button {
        width: 100%;
    }
}
