/* danilopez25.es — Arcade leaderboard */

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  overflow-x: hidden;
  background: #05040b;
}

.container-fluid {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.ranking-page {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  padding: 118px 20px 110px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.ranking-overlay {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 50% 7%, rgba(123, 92, 255, .19), transparent 34%),
    rgba(4, 3, 10, .7);
}

.ranking-panel {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  background: rgba(8, 7, 16, .78);
  box-shadow: 0 36px 110px rgba(0, 0, 0, .52);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.ranking-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 187, 92, .72), transparent);
}

.ranking-toolbar {
  display: flex;
  width: 100%;
  margin-bottom: 8px;
  justify-content: flex-start;
}

.ranking-back {
  display: inline-flex;
  min-height: 36px;
  padding: 8px 13px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(181, 108, 255, .34);
  border-radius: 999px;
  background: rgba(123, 92, 255, .1);
  color: #d9ccff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.ranking-back:hover {
  transform: translateX(-2px);
  border-color: rgba(181, 108, 255, .62);
  background: rgba(123, 92, 255, .2);
  color: #fff;
  text-decoration: none;
}

.ranking-head {
  max-width: 760px;
  margin: 0 auto 38px;
  color: #fff;
  text-align: center;
}

.ranking-eyebrow {
  display: inline-flex;
  margin: 5px 0 15px;
  align-items: center;
  gap: 7px;
  color: #e9c45f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

.ranking-head h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .025em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(181, 108, 255, .44), 0 0 44px rgba(123, 92, 255, .26);
}

.ranking-head p {
  margin: 15px 0 0;
  color: rgba(255, 255, 255, .68);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.55;
}

.ranking-tabs {
  display: flex;
  width: 100%;
  margin-bottom: 20px;
  padding: 6px;
  gap: 6px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
  scrollbar-width: thin;
  scrollbar-color: rgba(181, 108, 255, .5) transparent;
}

.ranking-tab {
  display: inline-flex;
  min-width: max-content;
  min-height: 46px;
  padding: 8px 14px;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.ranking-tab:hover {
  color: #fff;
  background: rgba(123, 92, 255, .1);
}

.ranking-tab.is-active {
  border-color: rgba(181, 108, 255, .42);
  background: linear-gradient(135deg, rgba(123, 92, 255, .28), rgba(181, 108, 255, .16));
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.ranking-tab-icon,
.ranking-game-icon {
  display: grid;
  place-items: center;
  color: #c9b2ff;
}

.ranking-tab-icon { width: 24px; height: 24px; }
.ranking-tab-icon svg { width: 22px; height: 22px; }

.ranking-board {
  min-height: 430px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(181, 108, 255, .2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0, rgba(123, 92, 255, .1), transparent 42%),
    linear-gradient(145deg, rgba(24, 21, 37, .95), rgba(12, 11, 21, .94));
  box-shadow: 0 22px 58px rgba(0, 0, 0, .3);
}

.ranking-board[hidden] { display: none; }

.ranking-game-head {
  display: flex;
  margin-bottom: 30px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: #fff;
}

.ranking-game-icon {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(181, 108, 255, .32);
  border-radius: 14px;
  background: rgba(123, 92, 255, .12);
}

.ranking-game-icon svg { width: 29px; height: 29px; }

.ranking-game-head span {
  color: #b98aff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
}

.ranking-game-head h2 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 23px;
  font-weight: 850;
}

.ranking-podium {
  display: grid;
  max-width: 720px;
  min-height: 215px;
  margin: 0 auto 26px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.podium-place {
  position: relative;
  display: flex;
  min-width: 0;
  height: 168px;
  padding: 23px 14px 0;
  align-items: center;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px 16px 8px 8px;
  background: rgba(255, 255, 255, .045);
  color: #fff;
}

.podium-place--1 {
  height: 210px;
  border-color: rgba(240, 200, 95, .48);
  background: linear-gradient(180deg, rgba(240, 200, 95, .15), rgba(255, 255, 255, .04));
  box-shadow: 0 0 30px rgba(240, 200, 95, .1);
}

.podium-place--2 { border-color: rgba(190, 201, 215, .34); }
.podium-place--3 { height: 145px; border-color: rgba(190, 123, 73, .34); }

.podium-medal { font-size: 28px; line-height: 1; }

.podium-place strong {
  width: 100%;
  margin-top: 11px;
  overflow: hidden;
  font-size: 14px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-score {
  margin-top: 5px;
  color: #c889ff;
  font-size: 18px;
  font-weight: 900;
}

.podium-step {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  color: rgba(255, 255, 255, .12);
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.ranking-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  min-height: 46px;
  padding: 9px 14px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 13.5px;
}

.ranking-list li:nth-child(odd) { background: rgba(255, 255, 255, .045); }
.ranking-position { color: rgba(255, 255, 255, .4); font-weight: 850; text-align: center; }
.ranking-player { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-score { color: #c889ff; font-weight: 900; }

.ranking-empty {
  display: flex;
  min-height: 290px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: rgba(255, 255, 255, .52);
  text-align: center;
}

.ranking-empty i { color: rgba(181, 108, 255, .5); font-size: 38px; }
.ranking-empty p { margin: 0; }

.ranking-back:focus-visible,
.ranking-tab:focus-visible {
  outline: 2px solid #c190ff;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .ranking-page {
    padding: 94px 14px 90px;
    background-attachment: scroll;
  }

  .ranking-panel { padding: 30px 18px; border-radius: 19px; }
  .ranking-toolbar { margin-bottom: 18px; }
  .ranking-head { margin-bottom: 32px; }
  .ranking-tab { padding: 8px 11px; }
}

@media (max-width: 520px) {
  .ranking-page { padding-right: 10px; padding-left: 10px; }
  .ranking-panel { padding: 27px 12px; }
  .ranking-board { min-height: 0; padding: 20px 12px; }
  .ranking-game-head { margin-bottom: 24px; }
  .ranking-podium { min-height: 185px; gap: 6px; }
  .podium-place { height: 145px; padding-right: 8px; padding-left: 8px; }
  .podium-place--1 { height: 180px; }
  .podium-place--3 { height: 125px; }
  .podium-medal { font-size: 23px; }
  .podium-place strong { font-size: 12px; }
  .podium-score { font-size: 15px; }
  .ranking-list li { padding-right: 10px; padding-left: 8px; grid-template-columns: 34px minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ranking-back,
  .ranking-tab { transition: none; }
  .ranking-back:hover { transform: none; }
}