*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

:root{
  --green:#2E7D5B;
  --green-light:#4CAF7A;
  --gold:#D4AF37;
  --silver:#A7A7A7;
  --bronze:#CD7F32;
  --bg:#F5F8F7;
  --card:#FFFFFF;
  --text:#1F2A2E;
  --muted:#6B7280;
  --border:#E5E7EB;
  --red:#EF4444;
}

body{
  font-family:'Inter',sans-serif;
  background:var(--bg);
  color:var(--text);
}

.leaderboard-page{
  max-width:1400px;
  margin:auto;
  padding:40px;
}

.leaderboard-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:40px;
}

.eyebrow{
  color:var(--green);
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:1px;
  margin-bottom:8px;
}

.leaderboard-header h1{
  font-size:52px;
  margin-bottom:8px;
}

.leaderboard-header span{
  color:var(--muted);
}

.back-btn{
  text-decoration:none;
  background:var(--green);
  color:#fff;
  padding:14px 22px;
  border-radius:14px;
  font-weight:700;
}

.leaderboard-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
  margin-bottom:45px;
}

.stat-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:24px;
  padding:28px;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
}

.stat-card h2{
  color:var(--green);
  font-size:42px;
  margin-bottom:10px;
}

.stat-card p{
  color:var(--muted);
}

.top-three{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:25px;
  align-items:end;
  margin-bottom:45px;
}

.rank-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:28px;
  padding:30px;
  text-align:center;
  box-shadow:0 15px 40px rgba(0,0,0,.06);
  transition:.3s;
}

.rank-card:hover{
  transform:translateY(-6px);
}

.rank-card.first{
  padding-top:55px;
  border:2px solid var(--gold);
}

.rank-card.second{
  border:2px solid var(--silver);
}

.rank-card.third{
  border:2px solid var(--bronze);
}

.medal{
  font-size:42px;
  margin-bottom:12px;
}

.avatar{
  width:82px;
  height:82px;
  border-radius:50%;
  margin:0 auto 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--green),var(--green-light));
  color:#fff;
  font-size:34px;
  font-weight:800;
}

.rank-card h3{
  font-size:26px;
  margin-bottom:8px;
}

.rank-card p{
  color:var(--muted);
  margin-bottom:12px;
}

.rank-card span{
  display:inline-block;
  background:#EAF6EF;
  color:var(--green);
  padding:8px 14px;
  border-radius:999px;
  font-weight:700;
  font-size:13px;
}

.filter-section{
  display:flex;
  gap:20px;
  margin-bottom:30px;
}

.filter-section input{
  flex:1;
  height:58px;
  border:1px solid var(--border);
  border-radius:16px;
  padding:0 20px;
  font-size:15px;
}

.filter-buttons{
  display:flex;
  gap:10px;
}

.filter-btn{
  border:none;
  background:#fff;
  border:1px solid var(--border);
  padding:12px 18px;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
}

.filter-btn.active{
  background:var(--green);
  color:#fff;
}

.leaderboard-table{
  background:#fff;
  border:1px solid var(--border);
  border-radius:28px;
  overflow:hidden;
  box-shadow:0 15px 40px rgba(0,0,0,.05);
}

.table-row{
  display:grid;
  grid-template-columns:.6fr 2fr 1fr 1fr 1fr;
  padding:20px 24px;
  border-bottom:1px solid var(--border);
  align-items:center;
}

.table-row:last-child{
  border-bottom:none;
}

.table-head{
  background:var(--green);
  color:#fff;
  font-weight:800;
}

.highlight{
  background:#EAF6EF;
  font-weight:800;
}

.up{
  color:var(--green);
  font-weight:800;
}

.down{
  color:var(--red);
  font-weight:800;
}

@media(max-width:1100px){
  .leaderboard-stats,
  .top-three{
    grid-template-columns:repeat(2,1fr);
  }

  .filter-section{
    flex-direction:column;
  }
}

@media(max-width:768px){
  .leaderboard-page{
    padding:20px;
  }

  .leaderboard-header{
    flex-direction:column;
    align-items:flex-start;
    gap:20px;
  }

  .leaderboard-header h1{
    font-size:40px;
  }

  .leaderboard-stats,
  .top-three{
    grid-template-columns:1fr;
  }

  .filter-buttons{
    overflow:auto;
  }

  .table-row{
    grid-template-columns:1fr;
    gap:8px;
  }
}