:root{
  --bg: #0b1020;
  --card: #121a33;
  --card2:#0f1630;
  --border:#23305a;
  --text:#e6e9ff;
  --muted:#a6afd6;
  --gold:#f6c453;
  --green:#4ade80;
  --red:#fb7185;
  --blue:#60a5fa;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 0%, #18224a 0%, var(--bg) 55%) fixed;
  color:var(--text);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
  position:sticky;
  top:0;
  background: rgba(11,16,32,.65);
  z-index:10;
}

.brand{ display:flex; gap:12px; align-items:center; }
.logo{
  width:44px; height:44px;
  display:grid; place-items:center;
  background: linear-gradient(180deg, rgba(246,196,83,.25), rgba(246,196,83,.05));
  border:1px solid rgba(246,196,83,.25);
  border-radius:12px;
  box-shadow: var(--shadow);
  font-size:22px;
}
.title{ font-weight:800; letter-spacing:.2px; }
.subtitle{ color:var(--muted); font-size:13px; margin-top:2px; }

.right{ display:flex; gap:10px; align-items:center; }
.pill{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(18,26,51,.55);
  color:var(--muted);
  font-size:13px;
}

.container{
  padding:18px;
  max-width:1100px;
  margin:0 auto;
}

.grid{
  display:grid;
  gap:14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card{
  background: linear-gradient(180deg, rgba(18,26,51,.85), rgba(15,22,48,.75));
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  box-shadow: var(--shadow);
  padding:14px;
  overflow:hidden;
  position:relative;
}

.card::after{
  content:"";
  position:absolute;
  inset:-120px -160px auto auto;
  width:240px;
  height:240px;
  background: radial-gradient(circle at 30% 30%, rgba(96,165,250,.22), transparent 60%);
  transform: rotate(18deg);
  pointer-events:none;
}

.card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.card h3{
  margin:0;
  font-size:16px;
  font-weight:800;
  line-height:1.2;
}
.key{
  color:var(--muted);
  font-size:12px;
  margin-top:4px;
}

.badge{
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color:var(--muted);
  white-space:nowrap;
}
.badge.kills{ border-color: rgba(96,165,250,.35); color: var(--blue); }
.badge.deposit{ border-color: rgba(74,222,128,.30); color: var(--green); }
.badge.contribution{ border-color: rgba(74,222,128,.30); color: var(--green); }
.badge.raid{ border-color: rgba(251,113,133,.30); color: var(--red); }

.meta{
  display:flex;
  gap:10px;
  color:var(--muted);
  font-size:13px;
  margin:10px 0 8px;
  flex-wrap:wrap;
}

.progress{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.06);
  overflow:hidden;
}
.bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(246,196,83,.95), rgba(74,222,128,.90));
  border-radius:999px;
  transition: width .35s ease;
}

.smallrow{
  display:flex;
  justify-content:space-between;
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
}
.big{
  color:var(--text);
  font-weight:700;
}

.empty{
  margin-top:40px;
  padding:26px;
  text-align:center;
  color:var(--muted);
  border:1px dashed rgba(255,255,255,.16);
  border-radius:16px;
  background: rgba(18,26,51,.35);
}
.empty-title{ color:var(--text); font-weight:800; }
.empty-sub{ margin-top:6px; }

.footer{
  display:flex;
  justify-content:center;
  gap:10px;
  color:rgba(255,255,255,.45);
  font-size:12px;
  padding:18px;
}
.dot{ opacity:.55; }

/* =========================
   LEADERBOARD (Top 20)
   ========================= */

.lb{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.lb-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 8px;
}

.lb-title{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 13px;
}

.lb-sub{
  color: var(--muted);
  font-size: 12px;
  opacity: .85;
}

.lb-loading,
.lb-empty{
  color: var(--muted);
  font-size: 13px;
  padding: 6px 2px;
}

.lb-body{
  display:flex;
  flex-direction:column;
  gap: 6px;
}

/* řádek v leaderboardu */
.lb-row{
  display:grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items:center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}

.lb-rank{
  font-weight: 800;
  color: rgba(255,255,255,.82);
}

.lb-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight: 700;
  color: rgba(255,255,255,.90);
}

.lb-val{
  font-weight: 800;
  color: var(--text);
}

.lb-unit{
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

/* malý “badge” vpravo dole (optional) */
.lb-tag{
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  opacity: .95;
}

/* ===== zvýraznění dle odměn ===== */

/* Top reward (top3/top10…) */
.lb-row.topReward{
  background: linear-gradient(180deg, rgba(246,196,83,.18), rgba(246,196,83,.06));
  border-color: rgba(246,196,83,.22);
}

/* Standard reward (globální reward pro všechny contributoře) */
.lb-row.stdReward{
  background: linear-gradient(180deg, rgba(74,222,128,.15), rgba(74,222,128,.05));
  border-color: rgba(74,222,128,.20);
}

/* Bez odměny */
.lb-row.noReward{
  opacity: .78;
}

/* mobilní zhuštění */
@media (max-width: 420px){
  .lb-row{
    grid-template-columns: 38px 1fr;
  }
  .lb-val{
    grid-column: 1 / -1;
    justify-self:end;
  }
}

.lb-body{
  max-height: 320px;     /* uprav dle chuti */
  overflow:auto;
  padding-right: 4px;
}
.lb-body::-webkit-scrollbar{
  width: 8px;
}
.lb-body::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.10);
  border-radius: 999px;
}
.lb-body::-webkit-scrollbar-track{
  background: transparent;
}