/* ============================================================
   RitPlay · Ranking Skin — pódio top 3 + barra "sua posição".
   Paleta coral/pêssego, mesma identidade do Ex1 e da Home.
   ============================================================ */

/* ---------- Pódio ---------- */

.rk-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 10px;
  padding: 18px 14px 0;
  max-width: 560px;
  margin: 0 auto;
}

.rk-podium-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 0;
  text-align: center;
  animation: rkRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rk-podium-slot--2 { animation-delay: 0.08s; }
.rk-podium-slot--1 { animation-delay: 0.16s; }
.rk-podium-slot--3 { animation-delay: 0.24s; }

@keyframes rkRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.rk-crown {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-8deg);
  font-size: 22px;
  animation: rkCrownBob 2.6s ease-in-out infinite;
  z-index: 2;
}

@keyframes rkCrownBob {
  0%, 100% { transform: translateX(-50%) rotate(-8deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(-4deg) translateY(-3px); }
}

.rk-podium-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ffb347;
  box-shadow: 0 6px 16px rgba(217, 138, 31, 0.3);
  background: #fff;
  display: grid;
  place-items: center;
}

.rk-podium-slot--1 .rk-podium-avatar {
  width: 72px;
  height: 72px;
  border-color: #ffd23d;
  box-shadow: 0 0 0 4px rgba(255, 210, 61, 0.25), 0 8px 22px rgba(217, 138, 31, 0.4);
}

.rk-podium-slot--3 .rk-podium-avatar { border-color: #d99c6b; }

.rk-podium-avatar > * { width: 100%; height: 100%; object-fit: cover; }

.rk-podium-medal { font-size: 18px; margin-top: -16px; z-index: 2; }

.rk-podium-name {
  font-size: 12px;
  font-weight: 800;
  color: #2a201d;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rk-podium-metric {
  font-size: 11.5px;
  font-weight: 800;
  color: #ff523d;
}

.rk-podium-base {
  width: 100%;
  margin-top: 6px;
  border-radius: 12px 12px 0 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(90, 30, 16, 0.4);
}

.rk-podium-slot--1 .rk-podium-base {
  height: 64px;
  font-size: 21px;
  background: linear-gradient(180deg, #ffd23d, #f0a32f);
  box-shadow: 0 -4px 18px rgba(255, 210, 61, 0.4);
}

.rk-podium-slot--2 .rk-podium-base {
  height: 44px;
  font-size: 16px;
  background: linear-gradient(180deg, #cfcdc9, #a8a5a0);
}

.rk-podium-slot--3 .rk-podium-base {
  height: 32px;
  font-size: 14px;
  background: linear-gradient(180deg, #e0a878, #c0805a);
}

.rk-podium-slot.is-me .rk-podium-name { color: #ff523d; }

/* Rows do top 3 ficam compactas (pódio já mostra o destaque) */
.rk-row-in-podium { display: none !important; }

/* ---------- Barra fixa "sua posição" ---------- */

.rk-mybar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--shell-nav-height, 64px) + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 2147483100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 18px;
  background: linear-gradient(120deg, #2a201d, #3d2b24);
  border: 1.5px solid rgba(255, 179, 71, 0.45);
  box-shadow: 0 12px 32px rgba(40, 18, 12, 0.45);
  color: #fff7f5;
  max-width: 540px;
  margin: 0 auto;
  animation: rkBarIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

@keyframes rkBarIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.rk-mybar-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #ffb347;
  flex-shrink: 0;
  background: #fff;
  display: grid;
  place-items: center;
}

.rk-mybar-avatar > * { width: 100%; height: 100%; object-fit: cover; }

.rk-mybar-ghost { font-size: 30px; flex-shrink: 0; }

.rk-mybar-copy { min-width: 0; flex: 1; }

.rk-mybar-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffd9a8;
}

.rk-mybar-copy span {
  display: block;
  font-size: 11.5px;
  color: rgba(255, 247, 245, 0.75);
  margin-top: 1px;
}

.rk-mybar-rank {
  font-size: 22px;
  font-weight: 900;
  color: #ffb347;
  flex-shrink: 0;
}

.rk-mybar--cta {
  cursor: pointer;
  border-color: rgba(255, 82, 61, 0.6);
}

.rk-mybar--cta:active { transform: scale(0.98); }

/* ---------- Polimento dos cards de resumo ---------- */

#ranking-cloud-modal .ranking-summary-card,
#ranking-cloud-modal [class*="ranking-stat"] {
  overflow: hidden;
}

/* Dá respiro no fim da lista para a barra fixa não cobrir a última row */
#ranking-cloud-list {
  padding-bottom: 96px !important;
}
