.leaderboard-body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.leaderboard-page {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow-y: auto;
}

.leaderboard-page::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vh;
  height: 100vw;
  transform: translate(-50%, -50%) rotate(270deg);
  background-image: url("/assets/home-bg-1d1663fc.jpg");
  background-size: 100% 100%;
  background-position: center;
  z-index: -1;
}

.leaderboard-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.leaderboard-title {
  font-family: 'Georgia', serif;
  font-size: 2.2rem;
  color: #f0e6d2;
  text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.7);
  text-align: center;
  margin: 0 0 4px;
}

.leaderboard-sort {
  text-align: center;
  margin-bottom: 20px;
}

.leaderboard-sort-link {
  font-family: 'Georgia', serif;
  font-size: 1rem;
  color: #a89878;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.leaderboard-sort-link:hover {
  color: #c4b89a;
  background: rgba(255, 255, 255, 0.06);
}

.leaderboard-sort-link--active {
  color: #f0e6d2;
  font-weight: 700;
  background: rgba(212, 160, 23, 0.2);
}

.leaderboard-sort-sep {
  color: #6b5d4a;
  margin: 0 4px;
  user-select: none;
}

.welcome-banner {
  background: linear-gradient(135deg, rgba(34, 120, 69, 0.85), rgba(22, 80, 45, 0.9));
  border: 1px solid rgba(240, 230, 210, 0.3);
  border-radius: 12px;
  padding: 18px 24px;
  margin-bottom: 24px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.welcome-banner p {
  font-family: 'Georgia', serif;
  font-size: 1.05rem;
  color: #f0e6d2;
  margin: 0;
  line-height: 1.5;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.leaderboard-subtitle {
  font-family: 'Georgia', serif;
  font-size: 1rem;
  color: #c4b89a;
  text-align: center;
  margin: 0 0 28px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* --- Table --- */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.leaderboard-table thead tr {
  background: none;
}

.leaderboard-table th {
  font-family: 'Georgia', serif;
  font-size: 0.85rem;
  color: #a89878;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 12px;
  text-align: left;
  border: none;
}

.leaderboard-table th.col-rank {
  width: 50px;
  text-align: center;
}

.leaderboard-table th.col-hours {
  text-align: right;
  width: 100px;
}

.leaderboard-table th.col-approved-hours {
  text-align: right;
  width: 110px;
}

.leaderboard-table th.col-current-chips,
.leaderboard-table th.col-total-chips {
  text-align: right;
  width: 108px;
}

.leaderboard-table tbody tr {
  background: rgba(30, 20, 10, 0.6);
  border-radius: 8px;
  transition: background 0.15s;
}

.leaderboard-table tbody tr:hover {
  background: rgba(50, 35, 15, 0.75);
}

.leaderboard-table tbody tr.highlight-row {
  background: rgba(139, 105, 20, 0.35);
  box-shadow: inset 0 0 0 2px rgba(212, 160, 23, 0.4);
}

.leaderboard-table tbody tr.top-3 {
  background: rgba(40, 28, 10, 0.75);
}

.leaderboard-table td {
  padding: 12px;
  border: none;
  color: #f0e6d2;
  font-family: 'Georgia', serif;
}

.leaderboard-table td:first-child {
  border-radius: 8px 0 0 8px;
}

.leaderboard-table td:last-child {
  border-radius: 0 8px 8px 0;
}

.col-rank {
  text-align: center;
}

.rank-medal {
  font-size: 1.5rem;
}

.rank-number {
  font-size: 1.1rem;
  color: #a89878;
  font-weight: 700;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 105, 20, 0.5);
}

.player-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f0e6d2;
}

.you-badge {
  background: #d4a017;
  color: #1a1a2e;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.col-hours {
  text-align: right;
}

.hours-count {
  font-size: 1.05rem;
  font-weight: 600;
  color: #c4b89a;
}

.col-approved-hours {
  text-align: right;
}

.approved-hours-count {
  font-size: 1.05rem;
  font-weight: 600;
  color: #a8c4a0;
}

.col-current-chips,
.col-total-chips {
  text-align: right;
}

.chip-count {
  font-size: 1.15rem;
  font-weight: 700;
  color: #d4a017;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.chip-count--total {
  color: #e8c766;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.page-link {
  color: #d4a017;
  text-decoration: none;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 2px solid rgba(139, 105, 20, 0.5);
  border-radius: 6px;
  background: rgba(30, 20, 10, 0.6);
  transition: background 0.2s, border-color 0.2s;
}

.page-link:hover {
  background: rgba(139, 105, 20, 0.3);
  border-color: #d4a017;
  color: #fff;
}

.page-info {
  color: #a89878;
  font-family: 'Georgia', serif;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #a89878;
  font-family: 'Georgia', serif;
  font-size: 1.1rem;
}

@keyframes lbBounceUp {
  0%, 100% { transform: translate(-50%, -100%); }
  50%       { transform: translate(-50%, calc(-100% - 10px)); }
}

@keyframes lbBounceDown {
  0%, 100% { transform: translate(-50%, 0); }
  50%       { transform: translate(-50%, 10px); }
}

.lb-bounce-up {
  transform: translate(-50%, -100%);
  animation: lbBounceUp 1.5s ease-in-out infinite;
}

.lb-bounce-down {
  transform: translate(-50%, 0);
  animation: lbBounceDown 1.5s ease-in-out infinite;
}

.lb-tutorial-text {
  display: inline-block;
  background: linear-gradient(135deg, #d4a017 0%, #8b6914 100%);
  color: #fff;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 320px;
  line-height: 1.45;
  margin: 0;
}

.lb-tutorial-btn {
  display: block;
  margin: 8px auto 0;
  background: #d4a017;
  border: none;
  color: #fff;
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 22px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: background 0.15s;
}

.lb-tutorial-btn:hover {
  background: #b8870f;
}

.lb-tutorial-arrow {
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #8b6914;
  margin: 0 auto;
}

.hf-modal {
  background: #1e1409;
  border: 2px solid #8b6914;
  border-radius: 14px;
  padding: 36px 40px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
  text-align: center;
  font-family: 'Georgia', serif;
}

.hf-title {
  font-size: 1.6rem;
  color: #d4a017;
  margin: 0 0 18px;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
}

.hf-body {
  font-size: 1rem;
  color: #f0e6d2;
  line-height: 1.65;
  margin: 0 0 28px;
}

.hf-agree-btn {
  background: linear-gradient(135deg, #d4a017 0%, #8b6914 100%);
  border: none;
  color: #fff;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  transition: opacity 0.15s;
}

.hf-agree-btn:hover {
  opacity: 0.88;
}
