:root{
    --bg-1: #050505;
    --bg-2: #0d0d0f;
    --muted: #9b9b9f;
    --accent: #bdbdbf;
    --white: #ffffff;
    --outline-gray: rgba(160,160,170,0.25);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

html,body{
    height:100%;
    margin:0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: radial-gradient(1200px 700px at 50% 85%, rgba(40,40,45,0.25), transparent 15%), linear-gradient(180deg,var(--bg-1), var(--bg-2));
    color: var(--white);
    display: flex;
    flex-direction: column;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    background-color: #111111;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--white);
}


.topbar{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: rgba(255,255,255,0.03);
    border-radius: 999px;
    padding: 8px 14px;
    margin: 24px auto 16px auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
    backdrop-filter: blur(6px);
    position: relative;
    max-width: 880px;
    width: calc(100% - 32px);
}

.wrap{
    max-width:880px;
    margin: 0 auto;
    padding:20px 16px 60px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.headline{
    font-family:"Poppins", "Inter", system-ui;
    font-weight:800;
    line-height:0.95;
    margin:0 auto 18px;
    color:var(--white);
    letter-spacing:-1px;
    max-width:780px;
    font-size: clamp(36px, 10vw, 100px);
}

.sub{
    margin:0 auto 28px;
    max-width:680px;
    font-size: clamp(12px, 3vw, 18px);
    color:var(--muted);
    line-height:1.6;
    font-weight:300;
    letter-spacing:0.2px;
}

.button-style{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-top:20px;
    padding:10px 20px;
    color:var(--white);
    font-family:"Poppins","Inter";
    font-size:16px;
    font-weight:600;
    border-radius:6px;
    text-decoration:none;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(160,160,170,0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.45);
    transition: transform .12s ease, box-shadow .12s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.button-style:hover{
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.55);
}

.button-style:focus{
    outline:none;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.03), 0 6px 16px rgba(0,0,0,0.5);
}

a, button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width:420px){
    .headline{ font-size: clamp(32px, 11vw, 64px); }
    .button-style{ padding:10px 16px; font-size:14px; }
}

.leaderboard-container {
  padding: 20px;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
  animation: slideUp 0.8s ease-out 0.3s both;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  animation: slideUp 0.8s ease-out 0.5s both;
}

.nav-button {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(160,160,170,0.25);
  color: var(--accent);
  padding: 10px 20px;
  border-radius: 6px;
  font-family: "Poppins", "Inter", system-ui;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav-button:hover:not(:disabled) {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#page-info {
  color: var(--accent);
  font-family: "Poppins", "Inter", system-ui;
  font-weight: 600;
  font-size: 16px;
  min-width: 80px;
  text-align: center;
}

h1 {
  font-family: "Poppins", "Inter", system-ui;
  font-weight: 800;
  font-size: clamp(32px, 8vw, 48px);
  margin-bottom: 40px;
  background: linear-gradient(180deg, var(--white) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

#leaderboard {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--outline-gray);
}

#leaderboard thead {
  background: rgba(255,255,255,0.05);
}

#leaderboard th {
  padding: 16px 24px;
  text-align: center;
  font-family: "Poppins", "Inter", system-ui;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0.6px;
  position: relative;
}

#leaderboard th:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 1px;
  background: var(--outline-gray);
}

#leaderboard td {
  padding: 16px 24px;
  font-size: 15px;
  border-top: 1px solid var(--outline-gray);
  color: var(--white);
  position: relative;
}

#leaderboard td:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 1px;
  background: var(--outline-gray);
}

#leaderboard tbody tr {
  transition: background-color 0.2s ease;
  animation: fadeInRow 0.6s ease-out both;
}

#leaderboard tbody tr:nth-child(1) { animation-delay: 0.5s; }
#leaderboard tbody tr:nth-child(2) { animation-delay: 0.6s; }
#leaderboard tbody tr:nth-child(3) { animation-delay: 0.7s; }
#leaderboard tbody tr:nth-child(4) { animation-delay: 0.8s; }
#leaderboard tbody tr:nth-child(5) { animation-delay: 0.9s; }
#leaderboard tbody tr:nth-child(n+6) { animation-delay: 1s; }

#leaderboard tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

#leaderboard tbody tr td:first-child {
  font-family: "Poppins", "Inter", system-ui;
  font-weight: 600;
  max-width: 48ch;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: clamp(12px, 1.2vw, 14px);
  line-height: 1.05;
  text-align: center;
  color: var(--accent);
}

#leaderboard tbody tr td:nth-child(2),
#leaderboard tbody tr td:nth-child(3) {
  font-family: "Poppins", "Inter", system-ui;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  white-space: nowrap;
  min-width: 6ch;
  max-width: 12ch;
}

@media (max-width: 800px) {
  .leaderboard-container {
    padding: 10px;
  }
  
  #leaderboard {
    font-size: 14px;
  }

  #leaderboard th {
    padding: 12px 8px;
    font-size: 12px;
  }

  #leaderboard td {
    padding: 10px 8px;
    font-size: 13px;
  }

  #leaderboard tbody tr td:first-child {
    font-size: clamp(11px, 2.8vw, 13px);
  }

  #leaderboard tbody tr td:nth-child(2),
  #leaderboard tbody tr td:nth-child(3) {
    font-size: 13px;
  }
}

@media (max-width: 400px) {
  #leaderboard th, #leaderboard td {
    padding: 8px 6px;
  }

  #leaderboard tbody tr td:first-child {
    font-size: clamp(10px, 3.5vw, 12px);
  }
}