/* ============================================================
   RANKING.CSS — Naruto Players 2.0
   ============================================================ */

/* Layout */
.rnk-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.rnk-header { margin-bottom: 20px; }

.rnk-titulo {
  font-family: "Teko", "Bangers", cursive;
  font-size: 1.8rem; font-weight: 700;
  color: #20212A; letter-spacing: 1px; margin: 0 0 4px;
}

.rnk-subtitulo {
  font-family: "Inter", sans-serif;
  font-size: .82rem; color: #666873; margin: 0;
}

/* Abas */
.rnk-abas {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}

.rnk-aba {
  padding: 8px 20px; border-radius: 8px;
  border: 1px solid rgba(0,0,0,.1);
  background: rgba(0,0,0,.04);
  color: #666873; cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: .85rem; font-weight: 700;
  transition: all .15s;
}
.rnk-aba:hover  { border-color: #FA832E; color: #FA832E; }
.rnk-aba.active { background: rgba(250,131,46,.15); border-color: #FA832E; color: #20212A; }

/* Reset info */
.rnk-reset-info {
  background: rgba(75,146,247,.08);
  border: 1px solid rgba(75,146,247,.2);
  border-radius: 8px; padding: 8px 14px; margin-bottom: 12px;
  font-size: .78rem; color: #4B92F7;
  font-family: "Inter", sans-serif;
}

/* Filtros vila */
.rnk-vila-filtros {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.rnk-vila-btn {
  padding: 5px 12px; border-radius: 6px;
  border: 1px solid rgba(0,0,0,.1);
  background: transparent; color: #666873;
  cursor: pointer; font-size: .75rem; font-weight: 700;
  font-family: "Inter", sans-serif; transition: all .15s;
}
.rnk-vila-btn:hover  { border-color: #FA832E; color: #FA832E; }
.rnk-vila-btn.active { background: #FA832E; border-color: #FA832E; color: #fff; }

/* Vila info */
.rnk-vila-info-card {
  background: rgba(250,131,46,.06);
  border: 1px solid rgba(250,131,46,.2);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;
  font-family: "Inter", sans-serif; font-size: .82rem; color: #666873;
}

/* Busca */
.rnk-busca {
  width: 100%; background: #F4F2ED;
  border: 1px solid rgba(0,0,0,.08); border-radius: 8px;
  padding: 9px 14px; color: #20212A; margin-bottom: 12px;
  font-family: "Inter", sans-serif; font-size: .85rem;
  outline: none; box-sizing: border-box;
}
.rnk-busca:focus { border-color: #FA832E; }
.rnk-busca::placeholder { color: #666873; }

/* Tabela */
.rnk-tabela-wrap {
  background: #F4F2ED;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px; overflow: hidden;
}
.rnk-tabela {
  width: 100%; border-collapse: collapse;
}
.rnk-tabela thead tr { background: rgba(0,0,0,.2); }
.rnk-tabela thead th {
  padding: 10px 14px; text-align: left;
  font-family: "Inter", sans-serif;
  font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; color: #666873;
}
.rnk-tabela tbody tr {
  border-top: 1px solid rgba(0,0,0,.04);
  transition: background .15s; cursor: pointer;
}
.rnk-tabela tbody tr:hover { background: rgba(0,0,0,.03); }
.rnk-tabela tbody tr.rnk-eu {
  background: rgba(250,131,46,.06);
  border-left: 3px solid #FA832E;
}
.rnk-tabela td { padding: 11px 14px; vertical-align: middle; }

/* Posição */
.rnk-pos {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Teko", cursive; font-size: 1rem; font-weight: 700;
  margin: 0 auto; background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.1); color: #666873;
}
.rnk-pos.gold   { background: rgba(245,159,10,.2); border-color: #F59F0A; color: #F59F0A; }
.rnk-pos.silver { background: rgba(148,163,184,.2); border-color: #94a3b8; color: #94a3b8; }
.rnk-pos.bronze { background: rgba(180,83,9,.2); border-color: #b45309; color: #b45309; }

/* Ninja cell */
.rnk-ninja-cell {
  display: flex; align-items: center; gap: 10px;
}
.rnk-avatar {
  width: 36px; height: 36px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
}
.rnk-avatar-emoji {
  width: 36px; height: 36px; border-radius: 8px;
  background: #EDE9DE; display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}

/* ── FOTO + MOLDURA (avatar de linha e modal de perfil) ───────
   Mesmo sistema de calibração por graduação usado em status.css:
   a moldura (PNG com buraco transparente no meio) cobre 100% do
   wrap; a foto por baixo é posicionada em % dentro do buraco,
   ajustada por graduação via a classe .moldura-<slug> aplicada
   dinamicamente pelo JS (ranking.js). Sem classe = calibração
   padrão da ANBU. */
.rnk-frame { position: relative; overflow: hidden; flex-shrink: 0; }
.rnk-frame-moldura {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  object-fit: contain; z-index: 3; pointer-events: none;
}
.rnk-frame-foto, .rnk-frame-emoji {
  position: absolute; left: 15.7%; top: 16.0%; width: 67.1%; height: 67.1%;
  overflow: hidden; z-index: 1;
}
.rnk-frame-foto { object-fit: cover; object-position: center center; }
.rnk-frame-emoji { display: flex; align-items: center; justify-content: center; background: #FFFFFF; }

.moldura-estudante .rnk-frame-foto, .moldura-estudante .rnk-frame-emoji { left:20.2%; top:20.2%; width:58.9%; height:58.9%; }
.moldura-genin     .rnk-frame-foto, .moldura-genin     .rnk-frame-emoji { left:20.2%; top:20.7%; width:58.9%; height:60.0%; }
.moldura-chunin    .rnk-frame-foto, .moldura-chunin    .rnk-frame-emoji { left:17.6%; top:16.6%; width:64.1%; height:66.7%; }
.moldura-jonin     .rnk-frame-foto, .moldura-jonin     .rnk-frame-emoji { left:15.6%; top:15.6%; width:68.3%; height:68.6%; }
.moldura-anbu      .rnk-frame-foto, .moldura-anbu      .rnk-frame-emoji { left:15.7%; top:16.0%; width:67.1%; height:67.1%; }
.moldura-sannin    .rnk-frame-foto, .moldura-sannin    .rnk-frame-emoji { left:17.6%; top:13.7%; width:64.4%; height:69.7%; }
.moldura-akatsuki  .rnk-frame-foto, .moldura-akatsuki  .rnk-frame-emoji { left:15.3%; top:14.7%; width:68.9%; height:69.9%; }
.moldura-kage      .rnk-frame-foto, .moldura-kage      .rnk-frame-emoji { left:17.9%; top:19.0%; width:63.5%; height:66.0%; }
.moldura-jinchuuriki .rnk-frame-foto, .moldura-jinchuuriki .rnk-frame-emoji { left:15.1%; top:16.9%; width:69.0%; height:65.9%; }
.moldura-seis-caminhos .rnk-frame-foto, .moldura-seis-caminhos .rnk-frame-emoji { left:17.5%; top:15.0%; width:65.4%; height:68.9%; }
.moldura-otsutsuki .rnk-frame-foto, .moldura-otsutsuki .rnk-frame-emoji { left:20.4%; top:19.5%; width:60.9%; height:63.2%; }

/* Avatar pequeno da lista de ranking */
.rnk-frame.sm { width: 56px; height: 56px; border-radius: 8px; }

/* Avatar grande do modal de perfil — igual ao .st2-personagem-img-wrap */
.rnk-frame.lg {
  width: calc(100% + 44px);
  height: 300px;
  margin: -22px -22px 6px;
  background: radial-gradient(ellipse at 50% 30%, #F4F2ED, #E8E4D7 75%);
  border-radius: 0;
}
.rnk-ninja-nome {
  font-family: "Inter", sans-serif;
  font-size: .82rem; font-weight: 700; color: #20212A;
}
.rnk-ninja-nome.eu { color: #FA832E; }
.rnk-ninja-sub {
  font-size: .68rem; color: #666873;
}
.rnk-tag-eu {
  display: inline-block; background: #FA832E; color: #fff;
  font-size: .6rem; font-weight: 800; padding: 1px 6px;
  border-radius: 4px; margin-left: 6px; vertical-align: middle;
}

/* Valores */
.rnk-poder {
  font-family: "Teko", cursive;
  font-size: 1.1rem; font-weight: 600; color: #20212A;
}
.rnk-vd { font-family: "Inter", sans-serif; font-size: .8rem; }
.rnk-vd .vit { color: #2ecc71; font-weight: 800; }
.rnk-vd .sep { color: #666873; }
.rnk-vd .der { color: #e74c3c; font-weight: 800; }
.rnk-liga-badge {
  font-family: "Teko", cursive; font-size: .9rem; font-weight: 600;
  border: 1px solid; border-radius: 6px; padding: 2px 10px;
}
.rnk-empty {
  text-align: center; padding: 30px;
  color: #666873; font-size: .85rem; font-family: "Inter", sans-serif;
}

/* Paginação */
.rnk-paginacao {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; flex-wrap: wrap; gap: 8px;
  font-family: "Inter", sans-serif; font-size: .78rem; color: #666873;
}
.rnk-pag-btns { display: flex; gap: 8px; }
.rnk-pag-btn {
  padding: 7px 16px; border-radius: 7px;
  border: 1px solid rgba(0,0,0,.08);
  background: #F4F2ED; color: #666873;
  font-family: "Inter", sans-serif; font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.rnk-pag-btn:hover:not(:disabled) { border-color: #FA832E; color: #FA832E; }
.rnk-pag-btn:disabled { opacity: .3; cursor: not-allowed; }

/* ── MODAL PERFIL ─────────────────────────────────────────── */
.rnk-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.8); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.rnk-modal-card {
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px; width: 100%; max-width: 420px;
  max-height: 90vh; overflow-y: auto; padding: 22px;
  position: relative;
}
.rnk-modal-fechar {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: #666873;
  font-size: 1.1rem; cursor: pointer; transition: color .15s;
}
.rnk-modal-fechar:hover { color: #20212A; }

.rnk-modal-topo {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 14px;
}
.rnk-modal-info-block { text-align: left; width: 100%; margin: 2px 0 2px; }
.rnk-modal-info-row { font-size: .8rem; line-height: 1.6; }
.rnk-modal-info-row .lbl { font-weight: 700; color: #666873; margin-right: 4px; }
.rnk-modal-info-row .val { font-weight: 800; color: #20212A; }
.rnk-modal-rank {
  display: inline-block; border-radius: 6px; padding: 2px 10px; border: 1px solid;
  font-family: "Teko", cursive; font-size: .85rem; font-weight: 700; letter-spacing: .3px;
}
.rnk-modal-grad.val {
  display: inline-block; border-radius: 6px; padding: 1px 8px; border: 1px solid;
  font-size: .74rem; font-weight: 800;
}

.rnk-modal-liga {
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px;
}
.rnk-modal-liga-info {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.rnk-modal-liga-img  { width: 32px; height: 32px; object-fit: contain; }
.rnk-modal-liga-nome { font-family: "Teko", cursive; font-size: 1rem; font-weight: 600; flex: 1; }
.rnk-modal-liga-pdl  { font-size: .75rem; color: #666873; }
.rnk-modal-liga-bar-bg {
  height: 5px; background: rgba(0,0,0,.07); border-radius: 99px; overflow: hidden;
}
.rnk-modal-liga-bar { height: 100%; border-radius: 99px; transition: width .4s; }

.rnk-modal-bars { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.rnk-modal-bar-row { display: flex; align-items: center; gap: 8px; }
.rnk-modal-bar-label {
  font-size: .72rem; font-weight: 700; color: #666873;
  width: 72px; flex-shrink: 0; font-family: "Inter", sans-serif;
}
.rnk-modal-bar-bg {
  flex: 1; height: 6px; background: rgba(0,0,0,.07);
  border-radius: 99px; overflow: hidden;
}
.rnk-modal-bar-fill { height: 100%; border-radius: 99px; transition: width .4s; }
.rnk-modal-bar-val {
  font-size: .68rem; color: #666873; width: 90px;
  text-align: right; flex-shrink: 0; font-family: "Inter", sans-serif;
}

.rnk-modal-poder-box {
  position: relative;
  container-type: inline-size;
  line-height: 0;
  margin-bottom: 12px;
}
.rnk-modal-poder-img { display: block; width: 100%; height: auto; }
.rnk-modal-poder-num {
  position: absolute;
  left: 72.8%; top: 52.5%;
  transform: translate(-50%, -50%);
  width: 27%;
  text-align: center;
  line-height: 1;
  font-size: 16px;
  font-size: 6.2cqw;
  font-weight: 800;
  color: #ffd76a;
  text-shadow: 0 0 6px rgba(0,0,0,.85), 0 0 3px rgba(0,0,0,.9), 0 1px 1px #000;
  white-space: nowrap;
}

.rnk-modal-attrs { margin-bottom: 12px; }
.rnk-modal-attr-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.04);
  font-family: "Inter", sans-serif;
}
.rnk-modal-attr-row:last-child { border-bottom: none; }
.rnk-modal-attr-row span:first-child { font-size: .75rem; color: #666873; }
.rnk-modal-attr-row span:last-child {
  font-family: "Teko", cursive; font-size: .95rem; font-weight: 600; color: #20212A;
}

.rnk-modal-pvp {
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-around; gap: 8px;
}
.rnk-modal-pvp-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rnk-modal-pvp-val {
  font-family: "Teko", cursive; font-size: 1.3rem; font-weight: 600; color: #20212A;
}
.rnk-modal-pvp-val.vit { color: #2ecc71; }
.rnk-modal-pvp-val.der { color: #e74c3c; }
.rnk-modal-pvp-label {
  font-size: .6rem; color: #666873;
  text-transform: uppercase; letter-spacing: .5px;
  font-family: "Inter", sans-serif;
}
.rnk-modal-pvp-sep { width: 1px; height: 32px; background: rgba(0,0,0,.07); }

.btn-pm-atacar {
  background: #e74c3c; color: #fff; border: none;
  border-radius: 10px; padding: 10px 24px; cursor: pointer;
  font-family: "Teko", cursive; font-size: 1rem;
  font-weight: 600; letter-spacing: 1px; transition: background .15s;
}
.btn-pm-atacar:hover { background: #c0392b; }
