* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;

  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding: 20px;

  background: #041442;
  color: white;
}

/* ==========================================
   PANTALLAS
========================================== */

.screen {
  position: relative;

  width: 100%;
  max-width: 390px;
  min-height: 844px;

  padding: 42px 24px 24px;

  overflow: hidden;

  background: radial-gradient(
    circle at top,
    #0b47b7 0%,
    #041442 42%,
    #081126 100%
  );

  color: white;

  border-radius: 28px;

  display: none;
}

.screen.active {
  display: block;
}

/* Como esta página tiene solo el ranking,
   lo mostramos aunque no tenga la clase active */
#screen-ranking {
  display: block;
}

.hidden {
  display: none !important;
}

/* ==========================================
   BOTÓN PRINCIPAL
========================================== */

.primary-btn {
  width: 100%;
  height: 58px;

  margin-top: 10px;

  border: none;
  border-radius: 999px;

  background: #0279fe;
  color: white;

  font-size: 18px;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 8px 22px rgba(2, 121, 254, 0.28);
}

/* ==========================================
   PANTALLA AZUL
========================================== */

.blue-screen {
  padding-bottom: 24px;

  overflow-y: auto;

  background: linear-gradient(
    180deg,
    #0279fe 0%,
    #041442 100%
  );

  text-align: center;
}

.blue-screen h2 {
  margin-top: 30px;

  color: white;

  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.blue-screen > p {
  margin-top: 14px;

  color: rgba(255, 255, 255, 0.9);

  font-size: 16px;
  line-height: 1.4;
}

/* ==========================================
   BARRA SUPERIOR
========================================== */

.top-bar {
  position: relative;

  width: 100%;
  height: 56px;

  margin-bottom: 18px;

  display: flex;
  justify-content: center;
  align-items: center;
}

.app-logo {
  display: block;

  width: 80px;
  height: auto;

  object-fit: contain;
  object-position: left center;
}

.login-logo {
  margin: 10px auto 22px;
}

.top-bar .app-logo {
  position: absolute;

  top: 50%;
  left: 50%;

  margin: 0;

  transform: translate(-50%, -50%);
}

/* ==========================================
   FLECHA VOLVER
========================================== */

.back-arrow {
  position: absolute;

  top: 24px;
  left: 24px;

  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.14);

  cursor: pointer;

  z-index: 999;
}

.back-arrow::before {
  content: "";

  width: 12px;
  height: 12px;

  margin-left: 4px;

  border-left: 4px solid white;
  border-bottom: 4px solid white;

  transform: rotate(45deg);
}

.top-bar .back-arrow {
  top: 50%;
  left: 0;

  transform: translateY(-50%);
}

/* ==========================================
   BOTÓN COMPARTIR
========================================== */

.top-bar .share-native-btn {
  position: absolute;

  top: 50%;
  right: 0;

  transform: translateY(-50%);
}

.share-card {
  position: relative;
}

.share-w-icon {
  position: absolute;

  right: 22px;
  bottom: 26px;

  width: 62px;
  height: auto;

  z-index: 5;
}

/* ==========================================
   RANKING
========================================== */

#screen-ranking h2 {
  margin-top: 30px;

  color: white;

  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

#screen-ranking > p {
  margin-top: 14px;

  color: rgba(255, 255, 255, 0.9);

  font-size: 16px;
  line-height: 1.4;
}

.ranking-list {
  margin-top: 50px;

  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ranking-row {
  position: relative;

  width: 100%;
  min-height: 74px;

  padding: 18px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(255, 255, 255, 0.14);

  border-radius: 16px;
}

.you-ranking {
  margin-top: 8px;

  background: #0279fe;

  border: 2px solid rgba(255, 255, 255, 0.25);

  box-shadow: 0 0 25px rgba(2, 121, 254, 0.45);

  transform: scale(1.03);
}

.you-ranking::before {
  content: "TU POSICIÓN";

  position: absolute;

  top: -11px;
  left: 16px;

  padding: 4px 10px;

  background: white;
  color: #0279fe;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ranking-left {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 10px;
}

.ranking-position {
  flex-shrink: 0;

  color: white;

  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.ranking-name {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;

  color: white;
}

.ranking-name span {
  display: block;

  max-width: 190px;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  font-size: 16px;
  font-weight: 700;
}

.ranking-name small {
  color: rgba(255, 255, 255, 0.85);

  font-size: 11px;
  font-weight: 500;
}

.ranking-row strong {
  flex-shrink: 0;

  margin-left: 12px;

  color: white;

  font-size: 22px;
  font-weight: 700;
}

/* ==========================================
   ESTADOS DEL RANKING
========================================== */

.ranking-loading,
.ranking-empty,
.ranking-error {
  width: 100%;

  margin-top: 20px;

  color: rgba(255, 255, 255, 0.85);

  text-align: center;

  font-size: 14px;
}

.ranking-error {
  color: white;
}