.leaderboard {
  min-height: calc(100vh - 324px);
}

.leaderboard-title {
  text-align: center;
  font-size: 200px;
  margin: 50px 0 0; /* add top margin to make space */
  color: #e2e5eb;
  position: relative;
  z-index: 0;
}

.top-three-cards {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 20px;
  margin-top: -100px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.place-1 {
    order: 2;
}

.place-2 {
    order: 1;
}

.place-3 {
    order: 3;
}

.place-1 .medal {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.6), rgba(255, 223, 70, 0.4));
  backdrop-filter: blur(6px);
  height: 130px;
}

.place-2 .medal {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.6), rgba(211, 211, 211, 0.4));
  backdrop-filter: blur(6px);
  height: 115px;
}

.place-3 .medal {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.6), rgba(210, 140, 70, 0.4));
  backdrop-filter: blur(6px);
  height: 100px;
}

.leaderboard-card {
    background-color: #fff;
    width: 200px;
    border: solid 2px white;
    border-radius: 4px;
}

.leader-tag {
  font-size: 14px;
  padding: 3px;
  border-radius: 2px;
}

.leaderboard-card .medal {
    padding-right: 15px;
    background-color: rebeccapurple;

    display: flex;
    justify-content: end;
    align-items: end;

    color: white;
    font-size: 50px;
    font-weight: bolder;
    border-radius: 4px;
}

.leaderboard-card .username {
  margin: 10px 10px;
}

.leaderboard-card .completed {
  color: #555;
  font-size: 0.9em;
  margin: 10px;
}

.empty-message {
  text-align: center;
  font-style: italic;
  font-size: 1.1em;
  color: #888;
  padding: 20px;
}

.leaderboard-container {
  padding: 0 10%;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}   

.leaderboard-table th {
    text-align: left;
    background-color: #e2e5eb;
    padding: 10px;
}

.leaderboard-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* PHONE CARDS */

.phone-top-three-cards {
  padding: 0 5%;
  width: 100%;
  margin-top: -30px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-leaderboard-card {
    
    width: 100%;
    border: solid 1px white;
    border-radius: 4px;

    display: flex;
    gap: 10px;
    padding: 0 5px;
}

.phone-leaderboard-card .medal {
    padding: 0 10px;

    display: flex;
    justify-content: end;
    align-items: end;

    color: white;
    font-size: 50px;
    font-weight: bolder;
    border-radius: 4px;
}

.phone-leaderboard-card .txt {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-content: center;
}

.phone-leaderboard-card .txt .username {
  color: white;
}

.phone-leaderboard-card .txt .completed {
  color: #dadada;
}

.phone-top-three-cards .phone-place-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.6), rgba(255, 223, 70, 0.4));
  background-color: rebeccapurple;
  backdrop-filter: blur(5px);
}

.phone-top-three-cards .phone-place-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.6), rgba(211, 211, 211, 0.4));
  background-color: rebeccapurple;
}

.phone-top-three-cards .phone-place-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.6), rgba(210, 140, 70, 0.4));
  background-color: rebeccapurple;
}

@media screen and (min-width: 900px) {
    .phone-top-three-cards {
      display: none;
    }
}

@media screen and (max-width: 900px) {
  .leaderboard-title {
    font-size: 20vw;
    margin-top: 20px;
    z-index: -1;
  }
  .top-three-cards {
    display: none;
  }
  .leaderboard-container {
    padding: 0 5%;
  }
}