/* =========================================================
   Làng Ẩn Dật - BẢN 6 BXH SẠCH TỪ V5.5
   Chỉ TOP 10 DONATE + TOP 10 POINT
   ========================================================= */

.ranking-page{
  padding:18px;
}

.ranking-shell{
  width:min(1500px,100%);
  height:100%;
  margin:0 auto;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(135deg,rgba(16,14,22,.70),rgba(42,24,20,.50));
  box-shadow:var(--shadow);
  backdrop-filter:blur(12px);
  overflow:hidden;
  display:grid;
  grid-template-rows:auto 1fr;
}

.ranking-head{
  position:relative;
  min-height:112px;
  margin:0;
  padding:18px 28px;
  border-bottom:1px solid rgba(245,213,137,.18);
  display:grid;
  place-items:center;
}

.ranking-title-wrap{
  text-align:center;
  pointer-events:none;
}

.ranking-head h1{
  margin:0;
  color:var(--gold);
  text-transform:uppercase;
  font-size:46px;
  line-height:1;
  letter-spacing:.045em;
  font-family:serif;
  text-shadow:0 0 16px rgba(245,213,137,.25);
}

.ranking-head .close-page{
  position:absolute;
  right:26px;
  top:50%;
  transform:translateY(-50%);
}

.ranking-content{
  min-height:0;
  overflow:auto;
  padding:22px 26px 26px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
  align-items:stretch;
}

.rank-panel{
  min-height:0;
  border:1px solid rgba(245,213,137,.30);
  border-radius:20px;
  background:linear-gradient(135deg,rgba(255,255,255,.10),rgba(15,14,20,.38));
  box-shadow:0 18px 55px rgba(0,0,0,.30);
  padding:20px;
  display:grid;
  grid-template-rows:auto 1fr;
  gap:16px;
}

.rank-panel-title{
  width:min(260px,80%);
  min-height:42px;
  margin:0 auto;
  border-radius:999px;
  border:1px solid rgba(245,213,137,.48);
  background:linear-gradient(180deg,rgba(245,213,137,.28),rgba(0,0,0,.30));
  color:#fff5d8;
  font-size:20px;
  font-weight:950;
  letter-spacing:.055em;
  text-align:center;
  display:grid;
  place-items:center;
  text-transform:uppercase;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 10px 28px rgba(0,0,0,.28);
}

.rank-panel-list{
  min-height:440px;
  border:1px dashed rgba(245,213,137,.20);
  border-radius:18px;
  background:rgba(0,0,0,.18);
  padding:14px;
  display:grid;
  align-content:start;
  gap:10px;
  overflow:auto;
}

.rank-card{
  min-height:64px;
  border:1px solid rgba(198,235,255,.42);
  border-radius:18px;
  background:linear-gradient(90deg,rgba(134,211,255,.32),rgba(255,255,255,.10));
  box-shadow:inset 0 0 18px rgba(130,210,255,.20),0 8px 24px rgba(0,0,0,.24);
  padding:10px 12px;
  display:grid;
  grid-template-columns:88px 48px minmax(0,1fr) minmax(128px,170px);
  gap:12px;
  align-items:center;
}

.rank-card.rank-1{
  border-color:rgba(255,234,155,.68);
  background:linear-gradient(90deg,rgba(255,222,98,.28),rgba(255,255,255,.10));
}

.rank-card.rank-2{
  border-color:rgba(210,224,255,.58);
}

.rank-card.rank-3{
  border-color:rgba(255,180,120,.56);
}

.rank-badge{
  min-height:36px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.50);
  background:linear-gradient(180deg,rgba(255,255,255,.42),rgba(120,190,245,.32));
  color:#102033;
  display:grid;
  place-items:center;
  font-weight:950;
  font-size:13px;
  white-space:nowrap;
}

.rank-card.rank-1 .rank-badge{
  background:linear-gradient(180deg,#fff2a8,#d5a638);
  color:#1b1003;
}

.rank-avatar{
  width:48px;
  height:48px;
  border-radius:14px;
  object-fit:cover;
  border:1px solid rgba(245,213,137,.35);
  background:rgba(0,0,0,.24);
}

.rank-name{
  min-width:0;
}

.rank-name b{
  display:block;
  color:#ff5f79;
  font-size:15px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-shadow:0 0 10px rgba(255,80,120,.20);
}

.rank-name span{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.rank-value{
  min-height:38px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.40);
  background:rgba(255,255,255,.16);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:14px;
  font-weight:950;
  text-align:center;
  white-space:nowrap;
  padding:0 12px;
}

.rank-value.donate{
  color:var(--gold-2);
}

.rank-value.point{
  color:#fff;
}

.ranking-empty{
  height:100%;
  min-height:300px;
  display:grid;
  place-items:center;
  text-align:center;
  color:rgba(255,255,255,.72);
  font-weight:900;
  font-size:16px;
}

@media(max-width:1050px){
  .ranking-page{
    padding:9px;
  }

  .ranking-shell{
    border-radius:18px;
  }

  .ranking-head{
    min-height:auto;
    padding:16px 14px;
    display:grid;
    gap:12px;
  }

  .ranking-head h1{
    font-size:34px;
  }

  .ranking-head .close-page{
    position:static;
    transform:none;
    width:100%;
  }

  .ranking-content{
    grid-template-columns:1fr;
    padding:12px;
    gap:14px;
  }

  .rank-panel{
    padding:14px;
    border-radius:18px;
  }

  .rank-panel-list{
    min-height:260px;
    padding:10px;
  }
}

@media(max-width:620px){
  .ranking-head h1{
    font-size:28px;
  }

  .rank-panel-title{
    width:100%;
    font-size:16px;
  }

  .rank-card{
    grid-template-columns:72px 42px minmax(0,1fr);
    gap:9px;
    padding:10px;
  }

  .rank-avatar{
    width:42px;
    height:42px;
  }

  .rank-value{
    grid-column:1/-1;
    min-height:34px;
    justify-content:center;
  }

  .rank-name b{
    font-size:14px;
  }
}