.rating-layout {
  width: var(--container);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) 0 44px;
}

.rating-hero {
  max-width: 850px;
  margin-bottom: 28px;
}

.rating-hero__eyebrow {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #4f3a00;
  font-weight: 900;
  background: rgba(255, 183, 3, 0.34);
}

.rating-hero h1 {
  margin: 0;
  font-family: "Baloo 2", Arial, sans-serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.96;
}

.rating-hero p:last-child {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--color-muted);
  font-size: clamp(1.04rem, 1.7vw, 1.24rem);
  font-weight: 800;
  line-height: 1.6;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
}

.podium-card,
.my-rank,
.leaderboard {
  border: 1px solid rgba(36, 33, 48, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.podium-card {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 260px;
  padding: 42px 16px 18px;
  text-align: center;
}

.podium-card.place-1 {
  min-height: 310px;
  order: 2;
}

.podium-card.place-2 {
  order: 1;
}

.podium-card.place-3 {
  order: 3;
}

.crown {
  position: absolute;
  top: 14px;
  display: grid;
  width: 58px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  font-family: "Baloo 2", Arial, sans-serif;
  font-weight: 800;
  clip-path: polygon(0 100%, 0 38%, 22% 58%, 35% 0, 50% 55%, 65% 0, 78% 58%, 100% 38%, 100% 100%);
}

.crown.gold {
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
}

.crown.silver {
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
}

.crown.bronze {
  background: linear-gradient(135deg, #f4a261, #a15c28);
}

.podium-avatar,
.rank-avatar {
  width: 86px;
  height: 86px;
  border: 5px solid #ffffff;
  border-radius: 50%;
  background: #f7efff;
  object-fit: cover;
  box-shadow: 0 16px 30px rgba(36, 33, 48, 0.14);
}

.podium-card h2 {
  margin: 12px 0 4px;
  font-family: "Baloo 2", Arial, sans-serif;
  font-size: 1.65rem;
  line-height: 1;
}

.podium-card p {
  margin: 0;
  color: var(--color-muted);
  font-weight: 900;
}

.podium-card strong {
  margin-top: 10px;
  font-family: "Baloo 2", Arial, sans-serif;
  font-size: 2.1rem;
  color: var(--color-primary-dark);
}

.my-rank {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
}

.my-rank[hidden] {
  display: none;
}

.my-rank p {
  margin: 0 0 4px;
  color: var(--color-muted);
  font-weight: 900;
}

.my-rank strong,
.my-rank > span {
  font-family: "Baloo 2", Arial, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.my-rank__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
}

.my-rank__profile img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
}

.leaderboard {
  overflow: hidden;
}

.leaderboard__head,
.leaderboard-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.leaderboard__head {
  color: var(--color-muted);
  font-weight: 900;
  background: rgba(124, 77, 255, 0.08);
}

.leaderboard-row {
  border-top: 1px solid rgba(36, 33, 48, 0.08);
  font-weight: 900;
}

.leaderboard-row.is-me {
  background: rgba(255, 183, 3, 0.16);
}

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

.rank-player span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-points {
  color: var(--color-primary-dark);
  font-family: "Baloo 2", Arial, sans-serif;
  font-size: 1.4rem;
  text-align: right;
}

@media (max-width: 760px) {
  .podium {
    grid-template-columns: 1fr;
  }

  .podium-card,
  .podium-card.place-1 {
    min-height: auto;
    order: initial;
  }

  .my-rank {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .my-rank__profile {
    justify-content: center;
  }

  .leaderboard__head,
  .leaderboard-row {
    grid-template-columns: 52px minmax(0, 1fr) 80px;
    padding: 12px;
  }
}
