body {
  font-family: DM Serif Display, DM Serif Display;
}

.leaderboard-section {
  display: flex;
  justify-content: center;
  padding: 40px 0 80px;
}

.leaderboard-box {
  width: 1200px;
  height: 907px;
  min-height: 907px;
  background: url("../images/leaderboard_bg.png") no-repeat center center;
  background-size: 100% 100%;
  padding: 36px 48px;
  box-sizing: border-box;
  border-radius: 6px;
  color: #f1dcc7;
  font-family: "DM Serif Display", serif;
  position: relative;
  display: flex;
  flex-direction: column;
}

.leaderboard-header-title {
  height: 100px;
  text-align: center;
  line-height: 95px;
  font-size: 36px;
  color: #100d0f;
  flex-shrink: 0;
}

.leaderboard-top-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  white-space: nowrap;
  flex-shrink: 0;
}

.leaderboard-badge {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 36px;
  background: linear-gradient(270deg, #d6cd6d 0%, #fff9cf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 14px;
}

.leaderboard-badge > img {
  width: 48px;
  height: 48px;
}

.leaderboard-badge .badge-value {
  font-weight: 700;
  margin-left: 8px;
}

.leaderboard-inner {
  background: rgba(0, 0, 0, 0.45);
  padding: 28px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
  margin-top: 0;
}

.leaderboard-title {
  text-align: center;
  font-size: 28px;
  letter-spacing: 2px;
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 36px;
  background: linear-gradient(270deg, #d6cd6d 0%, #fff9cf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.leaderboard-sub {
  text-align: center;
  margin: 0 0 18px;
  font-size: 18px;
  background: linear-gradient(270deg, #8a6a38 0%, #dfc897 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.leaderboard-table-wrap {
  flex: 1;
  min-height: 360px;
  overflow-y: auto;
  padding-right: 8px;
  /* background: url(../images/rank_bg.png) no-repeat center center;
  background-size: 100% 100%; */
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #e6d9b2;
}
.leaderboard-table thead th {
  padding: 12px 16px;
  border-bottom: 1px solid #272726;
  font-size: 28px;
  text-align: center;
  background: linear-gradient(270deg, #d6cd6d 0%, #fff9cf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.leaderboard-table tbody td {
  padding: 18px 16px;
  border-bottom: 1px dashed #272726;
  font-size: 20px;
  text-align: center;
  background: linear-gradient(270deg, #8a6a38 0%, #dfc897 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.leaderboard-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 18px;
}
.my-rank-title {
  font-size: 32px;
  background: linear-gradient(270deg, #d6cd6d 0%, #fff9cf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.my-rank-value {
  font-size: 24px;
  text-align: left;
  font-style: normal;
  text-transform: none;
  background: linear-gradient(270deg, #8a6a38 0%, #dfc897 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.my-completions {
  font-size: 24px;
  background: linear-gradient(270deg, #8a6a38 0%, #dfc897 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Scrollbar styles inside leaderboard (reuse .activity-list pattern) */
.leaderboard-table-wrap::-webkit-scrollbar {
  width: 10px;
}
.leaderboard-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.leaderboard-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(0deg, #8a6a38 0%, #dfc897 100%), #d9d9d9;
  border-radius: 8px;
}
.leaderboard-table-wrap {
  scrollbar-width: thin;
  scrollbar-color: #dfc897 transparent;
}

/* Responsive adjustments */
@media (max-width: 800px) {
  .leaderboard-section {
    margin-top: 100px;
  }

  .leaderboard-box {
    width: calc(100% - 40px);
    padding: 20px;
  }

  .leaderboard-header-title {
    height: 60px;
    line-height: 80px;
    font-size: 24px;
  }

  .leaderboard-top-row {
    gap: 12px;
  }

  .leaderboard-badge {
    font-size: 18px;
    padding: 10px 14px;
    justify-content: center;
  }

  .leaderboard-badge > img {
    width: 32px;
    height: 32px;
  }

  .leaderboard-inner {
    padding: 18px;
  }

  .leaderboard-title {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .leaderboard-sub {
    font-size: 14px;
  }

  .leaderboard-table-wrap {
    max-height: 300px;
  }

  .leaderboard-table thead th {
    font-size: 16px;
    padding: 10px 8px;
  }

  .leaderboard-table tbody td {
    font-size: 14px;
    padding: 12px 8px;
  }

  .leaderboard-footer {
    gap: 12px;
  }

  .my-rank-title {
    font-size: 20px;
  }

  .my-rank-value {
    font-size: 16px;
  }

  .my-completions {
    font-size: 16px;
  }
}

/* Mobile responsive - 480px and below */
@media (max-width: 480px) {
  .leaderboard-section {
    padding: 20px 10px 40px;
    margin-top: 20px;
  }

  .leaderboard-box {
    width: calc(100% - 20px);
    height: 574px;
    min-height: 574px;
    padding: 16px;
  }

  .leaderboard-header-title {
    height: 80px;
    line-height: 80px;
    font-size: 18px;
  }

  .leaderboard-top-row {
    gap: 0;
    margin-bottom: 12px;
  }

  .leaderboard-badge {
    font-size: 10px;
    padding: 8px 12px;
    gap: 8px;
    justify-content: center;
    width: 100%;
  }

  .leaderboard-badge > img {
    width: 24px;
    height: 24px;
  }

  .leaderboard-badge .badge-value {
    margin-left: 4px;
  }

  .leaderboard-inner {
    padding: 12px;
  }

  .leaderboard-title {
    font-size: 16px;
    letter-spacing: 0.5px;
    margin: 0 0 6px;
  }

  .leaderboard-sub {
    font-size: 11px;
    margin: 0 0 12px;
  }

  .leaderboard-table-wrap {
    height: 250px;
    min-height: 250px;
    padding-right: 4px;
  }

  .leaderboard-table thead th {
    font-size: 14px;
    padding: 8px 4px;
  }

  .leaderboard-table tbody td {
    font-size: 12px;
    padding: 10px 4px;
  }

  /* Hide some columns on very small screens for better readability */
  /* .leaderboard-table thead th:nth-child(2),
  .leaderboard-table tbody td:nth-child(2) {
    display: none;
  } */

  .leaderboard-footer {
    gap: 10px;
    margin-top: 0;
    margin-bottom: 10px;
  }

  .my-rank-title {
    font-size: 16px;
  }

  .my-rank-value {
    font-size: 14px;
  }

  .my-completions {
    font-size: 14px;
  }

  /* Scrollbar adjustments for mobile */
  .leaderboard-table-wrap::-webkit-scrollbar {
    width: 6px;
  }
}
