.rank-page{
  min-height:70vh;
  padding:46px 0 80px;
}

.rank-shell{
  position:relative;
}

.rank-hero{
  position:relative;
  overflow:hidden;
  border:1px solid var(--panel-border);
  border-radius:22px;
  padding:34px;
  margin-bottom:24px;
  background:
    radial-gradient(circle at 88% 20%,rgba(79,70,229,.22),transparent 35%),
    radial-gradient(circle at 10% 10%,rgba(30,100,255,.16),transparent 32%),
    var(--panel);
}

.rank-hero:after{
  content:"";
  position:absolute;
  inset:auto -80px -130px auto;
  width:340px;
  height:340px;
  border-radius:50%;
  background:rgba(80,70,255,.08);
  filter:blur(15px);
}

.rank-kicker{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--tactical);
  margin-bottom:10px;
}

.rank-title{
  font-family:var(--font-display);
  font-size:clamp(36px,5vw,62px);
  text-transform:uppercase;
  line-height:.95;
}

.rank-subtitle{
  max-width:700px;
  margin-top:14px;
  color:var(--ink-dim);
  font-size:14px;
}

.rank-toolbar{
  display:flex;
  gap:12px;
  align-items:center;
  margin:22px 0;
}

.rank-search{
  flex:1;
  display:flex;
  gap:10px;
  padding:8px;
  background:var(--panel);
  border:1px solid var(--panel-border);
  border-radius:999px;
}

.rank-search input{
  flex:1;
  min-width:0;
  background:transparent;
  border:0;
  outline:0;
  color:var(--ink);
  padding:8px 14px;
  font-family:var(--font-body);
}

.rank-search button{
  border:0;
  border-radius:999px;
  padding:10px 20px;
  cursor:pointer;
  font-family:var(--font-mono);
  font-weight:700;
  background:var(--tactical);
  color:#fff;
}

.rank-podium{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-bottom:20px;
}

.rank-podium-card{
  position:relative;
  overflow:hidden;
  display:block;
  padding:22px;
  min-height:150px;
  background:var(--panel);
  border:1px solid var(--panel-border);
  border-radius:16px;
  color:inherit;
  text-decoration:none;
}

.rank-podium-card:first-child{
  border-color:rgba(80,100,255,.45);
  box-shadow:0 15px 55px rgba(30,70,255,.12);
}

.rank-place{
  font-family:var(--font-display);
  font-size:42px;
  color:var(--tactical);
}

.rank-player-name{
  font-family:var(--font-display);
  font-size:24px;
  text-transform:uppercase;
  line-height:1;
  margin-top:8px;
}

.rank-player-meta{
  font-family:var(--font-mono);
  color:var(--muted);
  font-size:11px;
  margin-top:7px;
}

.rank-table{
  overflow:hidden;
  border:1px solid var(--panel-border);
  border-radius:16px;
  background:var(--panel);
}

.rank-row{
  display:grid;
  grid-template-columns:65px minmax(220px,1.8fr) minmax(150px,1fr) 110px 80px 80px 105px;
  align-items:center;
  gap:12px;
  min-height:72px;
  padding:0 18px;
  border-bottom:1px solid var(--panel-border);
}

.rank-row:last-child{border-bottom:0}

.rank-row-head{
  min-height:46px;
  background:var(--bg-alt);
  color:var(--muted);
  font-family:var(--font-mono);
  text-transform:uppercase;
  font-size:10px;
  letter-spacing:.09em;
}

.rank-rankno{
  font-family:var(--font-display);
  font-size:23px;
  color:var(--ink-dim);
}

.rank-person{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.rank-avatar{
  width:42px;
  height:42px;
  border-radius:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
  background:
    linear-gradient(135deg,rgba(50,100,255,.3),rgba(100,60,220,.15)),
    var(--panel-2);
  border:1px solid var(--panel-border-hi);
  font-family:var(--font-display);
  font-size:20px;
}

.rank-name-link{
  font-weight:800;
  color:var(--ink);
  text-decoration:none;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rank-steam{
  font-family:var(--font-mono);
  font-size:10px;
  color:var(--muted);
  margin-top:3px;
}

.rank-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:700;
}

.rank-badge-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--muted);
  box-shadow:0 0 16px currentColor;
}

.rank-tone-silver .rank-badge-dot{background:#b8c1cc}
.rank-tone-gold .rank-badge-dot{background:#e4b84f}
.rank-tone-green .rank-badge-dot{background:#59c78d}
.rank-tone-blue .rank-badge-dot{background:#5796ff}
.rank-tone-purple .rank-badge-dot{background:#9a70ff}
.rank-tone-red .rank-badge-dot{background:#ff5e6c}

.rank-metric{
  font-family:var(--font-mono);
  font-size:13px;
  font-weight:700;
}

.rank-pagination{
  display:flex;
  justify-content:center;
  gap:7px;
  margin-top:22px;
  flex-wrap:wrap;
}

.rank-pagination a{
  min-width:38px;
  height:38px;
  display:flex;
  justify-content:center;
  align-items:center;
  border-radius:9px;
  border:1px solid var(--panel-border);
  background:var(--panel);
  color:var(--ink-dim);
  font-family:var(--font-mono);
  font-size:12px;
  text-decoration:none;
}

.rank-pagination a.active{
  background:var(--tactical);
  border-color:var(--tactical);
  color:#fff;
}

.player-profile-hero{
  display:grid;
  grid-template-columns:1fr auto;
  gap:26px;
  align-items:center;
}

.player-identity{
  display:flex;
  align-items:center;
  gap:22px;
}

.player-big-avatar{
  width:104px;
  height:104px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:22px;
  background:
    linear-gradient(135deg,rgba(50,100,255,.35),rgba(100,60,220,.2)),
    var(--panel-2);
  border:1px solid rgba(80,110,255,.45);
  font-family:var(--font-display);
  font-size:48px;
  color:#fff;
}

.player-big-name{
  font-family:var(--font-display);
  font-size:clamp(38px,5vw,58px);
  text-transform:uppercase;
  line-height:.95;
}

.player-big-sub{
  font-family:var(--font-mono);
  color:var(--muted);
  font-size:11px;
  margin-top:10px;
}

.player-head-stats{
  display:grid;
  grid-template-columns:repeat(3,110px);
  gap:14px;
}

.player-head-stat{
  text-align:right;
}

.player-head-stat .label,
.stat-card .label{
  font-family:var(--font-mono);
  font-size:9px;
  color:var(--muted);
  letter-spacing:.13em;
  text-transform:uppercase;
}

.player-head-stat .value{
  font-family:var(--font-display);
  font-size:30px;
  margin-top:6px;
}

.player-stat-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:13px;
  margin:18px 0;
}

.stat-card{
  min-height:112px;
  padding:20px;
  border-radius:14px;
  background:var(--panel);
  border:1px solid var(--panel-border);
}

.stat-card .value{
  font-family:var(--font-display);
  font-size:31px;
  margin-top:8px;
}

.player-lower{
  display:grid;
  grid-template-columns:1.25fr .8fr;
  gap:18px;
}

.profile-panel{
  padding:24px;
  border:1px solid var(--panel-border);
  border-radius:16px;
  background:var(--panel);
}

.profile-panel-title{
  font-family:var(--font-display);
  font-size:22px;
  text-transform:uppercase;
  margin-bottom:18px;
}

.combat-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.combat-item{
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:13px 15px;
  background:var(--panel-2);
  border:1px solid var(--panel-border);
  border-radius:10px;
  font-size:12px;
}

.combat-item span:first-child{
  color:var(--muted);
}

.combat-item strong{
  font-family:var(--font-mono);
}

.rank-emblem-wrap{
  min-height:280px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.rank-emblem{
  width:118px;
  height:118px;
  border-radius:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--font-display);
  font-size:38px;
  border:1px solid rgba(90,110,255,.55);
  background:
    radial-gradient(circle at 50% 25%,rgba(100,120,255,.32),transparent 60%),
    var(--panel-2);
  box-shadow:0 18px 60px rgba(60,70,255,.16);
}

.rank-emblem-name{
  font-family:var(--font-display);
  text-transform:uppercase;
  font-size:25px;
  margin-top:18px;
}

.rank-emblem-points{
  color:var(--tactical);
  font-family:var(--font-mono);
  font-weight:700;
  margin-top:7px;
}

.rank-empty{
  padding:50px 25px;
  text-align:center;
  border:1px solid var(--panel-border);
  background:var(--panel);
  border-radius:16px;
  color:var(--muted);
}

@media(max-width:980px){
  .rank-row{
    grid-template-columns:55px minmax(180px,1.5fr) minmax(130px,1fr) 90px 70px;
  }

  .rank-row > :nth-child(6),
  .rank-row > :nth-child(7){
    display:none;
  }

  .player-profile-hero{
    grid-template-columns:1fr;
  }

  .player-head-stats{
    grid-template-columns:repeat(3,1fr);
  }

  .player-head-stat{text-align:left}
}

@media(max-width:720px){
  .rank-page{padding-top:26px}
  .rank-hero{padding:24px}
  .rank-podium{grid-template-columns:1fr}
  .rank-toolbar{display:block}
  .rank-row{
    grid-template-columns:46px minmax(0,1fr) 90px;
    padding:0 12px;
  }

  .rank-row > :nth-child(3),
  .rank-row > :nth-child(5),
  .rank-row > :nth-child(6),
  .rank-row > :nth-child(7){
    display:none;
  }

  .player-identity{
    align-items:flex-start;
    flex-direction:column;
  }

  .player-big-avatar{
    width:82px;
    height:82px;
  }

  .player-head-stats{
    grid-template-columns:1fr 1fr;
  }

  .player-stat-grid{
    grid-template-columns:1fr 1fr;
  }

  .player-lower{
    grid-template-columns:1fr;
  }

  .combat-list{
    grid-template-columns:1fr;
  }
}

/* CS2 competitive rank artwork */
.rank-emblem{
  width:220px;
  height:112px;
  border-radius:18px;
  padding:10px 16px;
}

.cs2-rank-icon{
  display:block;
  width:100%;
  height:100%;
  max-width:195px;
  max-height:90px;
  object-fit:contain;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

@media(max-width:720px){
  .rank-emblem{
    width:190px;
    height:100px;
  }
}

/* Competitive rank icon inside leaderboard */
.rank-list-icon{
  width:42px;
  height:28px;
  object-fit:contain;
  flex:none;
  filter:drop-shadow(0 5px 10px rgba(0,0,0,.35));
}

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

.rank-badge span:last-child{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Extra Velocity polish */
.player-profile-hero{
  box-shadow:
    0 25px 80px rgba(0,0,0,.18),
    inset 0 1px rgba(255,255,255,.025);
}

.player-big-avatar{
  position:relative;
  overflow:hidden;
  box-shadow:
    0 18px 45px rgba(30,60,200,.18),
    inset 0 0 35px rgba(100,100,255,.08);
}

.player-big-avatar:after{
  content:"";
  position:absolute;
  width:70px;
  height:2px;
  bottom:0;
  background:var(--tactical);
  box-shadow:0 0 18px var(--tactical);
}

.stat-card{
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.stat-card:hover{
  transform:translateY(-2px);
  border-color:var(--panel-border-hi);
  background:var(--panel-2);
}

.rank-emblem{
  border-color:rgba(100,120,255,.38);
  background:
    radial-gradient(circle at 50% 45%,rgba(80,100,255,.14),transparent 55%),
    var(--panel-2);
}

.rank-emblem-name{
  letter-spacing:.025em;
}

.rank-emblem-points{
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--panel-border-hi);
  background:var(--panel-2);
}

.combat-item{
  transition:border-color .15s ease;
}

.combat-item:hover{
  border-color:var(--panel-border-hi);
}

/* =========================================================
   VELOCITY PLAYER PROFILE V2
   ========================================================= */

.player-profile-hero{
  position:relative;
  isolation:isolate;
  min-height:190px;
}

.steam-player-avatar{
  text-decoration:none;
}

.steam-player-avatar img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
}

.steam-player-avatar:before{
  content:"";
  position:absolute;
  inset:-1px;
  z-index:2;
  pointer-events:none;
  border-radius:inherit;
  border:1px solid rgba(105,130,255,.65);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.025) inset,
    0 16px 50px rgba(45,75,255,.22);
}

.steam-avatar-dot{
  position:absolute;
  z-index:4;
  right:-3px;
  bottom:-3px;
  width:19px;
  height:19px;
  border-radius:50%;
  background:#55d77a;
  border:4px solid var(--panel);
  box-shadow:0 0 18px rgba(85,215,122,.55);
}

.player-profile-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.steam-profile-btn{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 13px;
  border-radius:999px;
  text-decoration:none;
  font-family:var(--font-mono);
  font-size:10px;
  font-weight:700;
  letter-spacing:.08em;
  color:var(--ink);
  border:1px solid var(--panel-border-hi);
  background:rgba(255,255,255,.035);
  transition:.18s ease;
}

.steam-profile-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(90,120,255,.65);
  background:rgba(80,100,255,.09);
}

.player-last-seen{
  font-family:var(--font-mono);
  font-size:9px;
  letter-spacing:.08em;
  color:var(--muted);
}

.player-head-stat{
  position:relative;
  padding:12px;
  border-radius:12px;
  transition:.18s ease;
}

.player-head-stat:hover{
  background:rgba(255,255,255,.025);
}

.player-head-stat .value{
  text-shadow:0 9px 30px rgba(70,90,255,.14);
}

/* stat card accent */
.stat-card{
  position:relative;
  overflow:hidden;
}

.stat-card:before{
  content:"";
  position:absolute;
  width:70px;
  height:70px;
  top:-45px;
  right:-35px;
  border-radius:50%;
  background:var(--tactical);
  opacity:.10;
  filter:blur(5px);
}

.stat-card .value{
  position:relative;
  z-index:2;
}

/* competitive panel */
.rank-emblem-wrap{
  overflow:hidden;
  position:relative;
}

.rank-emblem-wrap:before{
  content:"";
  position:absolute;
  width:300px;
  height:300px;
  left:50%;
  top:20px;
  transform:translateX(-50%);
  border-radius:50%;
  background:rgba(75,80,255,.09);
  filter:blur(45px);
  pointer-events:none;
}

.rank-emblem,
.rank-emblem-name,
.rank-emblem-points,
.rank-progress-wrap{
  position:relative;
  z-index:2;
}

.rank-progress-wrap{
  width:100%;
  max-width:330px;
  margin-top:24px;
}

.rank-progress-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:15px;
  font-family:var(--font-mono);
  font-size:9px;
  color:var(--muted);
  letter-spacing:.07em;
}

.rank-progress-top strong{
  color:var(--ink);
  font-size:9px;
  text-align:right;
}

.rank-progress-track{
  position:relative;
  height:6px;
  margin-top:9px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid var(--panel-border);
}

.rank-progress-track span{
  position:absolute;
  inset:0 auto 0 0;
  border-radius:999px;
  background:linear-gradient(
    90deg,
    var(--tactical),
    #856bff
  );
  box-shadow:0 0 18px rgba(90,100,255,.5);
}

.rank-progress-bottom{
  margin-top:8px;
  text-align:right;
  font-family:var(--font-mono);
  font-size:8.5px;
  color:var(--muted);
  letter-spacing:.06em;
}

.profile-panel{
  position:relative;
  overflow:hidden;
}

.combat-item strong{
  color:var(--ink);
}

.combat-item:hover strong{
  color:var(--tactical);
}

@media(max-width:720px){
  .player-profile-actions{
    margin-top:13px;
  }

  .steam-player-avatar{
    width:94px;
    height:94px;
  }

  .rank-progress-wrap{
    max-width:280px;
  }
}


/* =========================================================
   VELOCITY FINAL PROFILE POLISH
   ========================================================= */

.player-name-line{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.player-name-rank-icon{
  width:66px;
  height:38px;
  object-fit:contain;
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.4));
}

.player-status{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:30px;
  padding:0 11px;
  border-radius:999px;
  border:1px solid var(--panel-border-hi);
  background:rgba(255,255,255,.025);
  font-family:var(--font-mono);
  font-size:9px;
  letter-spacing:.07em;
  color:var(--muted);
}

.player-status i{
  display:block;
  width:7px;
  height:7px;
  border-radius:50%;
}

.player-status.is-online{
  color:#72e895;
  border-color:rgba(70,220,115,.25);
  background:rgba(70,220,115,.055);
}

.player-status.is-online i{
  background:#59dc7c;
  box-shadow:0 0 13px rgba(80,225,120,.8);
}

.player-status.is-offline i{
  background:var(--muted);
}


/* Stat icons */

.stat-label{
  display:flex;
  align-items:center;
  gap:8px;
}

.k4-stat-svg{
  width:16px;
  height:16px;
  flex:none;
  color:var(--tactical);
  filter:drop-shadow(0 0 8px rgba(80,100,255,.22));
}

.stat-card .k4-stat-svg{
  width:18px;
  height:18px;
}

.combat-label{
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--muted);
}

.combat-label .k4-stat-svg{
  width:15px;
  height:15px;
}


/* Progress percentage */

.rank-progress-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.rank-progress-bottom strong{
  color:var(--tactical);
  font-size:10px;
}


/* TOP 3 */

.rank-podium{
  align-items:stretch;
}

.rank-podium-card{
  min-height:220px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:26px 20px 22px;
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.rank-podium-card:hover{
  transform:translateY(-4px);
  border-color:var(--panel-border-hi);
}

.rank-podium-card:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.75;
}

.podium-place-1{
  border-color:rgba(226,185,70,.35);
  box-shadow:0 20px 60px rgba(190,140,30,.08);
}

.podium-place-1:before{
  background:
    radial-gradient(circle at 50% 0%,rgba(226,185,70,.13),transparent 48%);
}

.podium-place-2{
  border-color:rgba(190,205,225,.25);
}

.podium-place-2:before{
  background:
    radial-gradient(circle at 50% 0%,rgba(190,205,225,.09),transparent 48%);
}

.podium-place-3{
  border-color:rgba(205,125,72,.25);
}

.podium-place-3:before{
  background:
    radial-gradient(circle at 50% 0%,rgba(205,125,72,.09),transparent 48%);
}

.podium-medal{
  position:absolute;
  top:13px;
  left:14px;
  width:34px;
  height:34px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--panel-border-hi);
  background:var(--panel-2);
  font-family:var(--font-display);
  font-size:19px;
  z-index:3;
}

.podium-place-1 .podium-medal{
  color:#e4bc4f;
}

.podium-place-2 .podium-medal{
  color:#c7d0dd;
}

.podium-place-3 .podium-medal{
  color:#ce8456;
}

.podium-steam-avatar{
  position:relative;
  z-index:2;
  width:72px;
  height:72px;
  margin-bottom:14px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:18px;
  border:1px solid var(--panel-border-hi);
  background:var(--panel-2);
  font-family:var(--font-display);
  font-size:31px;
  box-shadow:0 13px 35px rgba(0,0,0,.18);
}

.podium-steam-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.podium-player-main{
  position:relative;
  z-index:2;
}

.podium-player-main .rank-place{
  font-size:20px;
  margin-bottom:5px;
}

.podium-rank-icon{
  position:relative;
  z-index:2;
  width:88px;
  height:46px;
  margin-top:14px;
  object-fit:contain;
  filter:drop-shadow(0 9px 16px rgba(0,0,0,.4));
}

.podium-rank-name{
  position:relative;
  z-index:2;
  margin-top:5px;
  max-width:95%;
  font-family:var(--font-mono);
  font-size:9px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.05em;
}


/* nicer profile depth */

.player-profile-hero:before{
  content:"";
  position:absolute;
  width:420px;
  height:260px;
  right:-80px;
  top:-80px;
  border-radius:50%;
  background:rgba(75,80,255,.06);
  filter:blur(50px);
  pointer-events:none;
}

.profile-panel-title{
  letter-spacing:.025em;
}

.player-stat-grid .stat-card:nth-child(1) .value,
.player-stat-grid .stat-card:nth-child(4) .value{
  color:var(--ink);
}

@media(max-width:720px){

  .player-name-rank-icon{
    width:55px;
    height:32px;
  }

  .rank-podium-card{
    min-height:200px;
  }

  .podium-steam-avatar{
    width:64px;
    height:64px;
  }
}

/* Small Steam avatars in leaderboard */
.rank-avatar-steam{
  position:relative;
  overflow:hidden;
}

.rank-avatar-steam > span{
  position:relative;
  z-index:1;
}

.rank-avatar-steam img{
  position:absolute;
  inset:0;
  z-index:2;
  width:100%;
  height:100%;
  object-fit:cover;
}

.rank-avatar-steam:after{
  content:"";
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  border-radius:inherit;
  box-shadow:inset 0 0 0 1px rgba(120,140,255,.14);
}

.rank-row:hover .rank-avatar-steam{
  border-color:rgba(90,115,255,.5);
  box-shadow:0 8px 24px rgba(40,60,180,.15);
}

.rank-row:not(.rank-row-head){
  transition:
    background .16s ease,
    transform .16s ease,
    border-color .16s ease;
}

.rank-row:not(.rank-row-head):hover{
  background:rgba(80,95,255,.035);
}

.rank-row:not(.rank-row-head):hover .rank-name-link{
  color:var(--tactical);
}

.rank-name-link{
  transition:color .15s ease;
}
