/* 비회원 랭킹 UI */
.neo-rank-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-bottom)) 0.75rem 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.neo-rank-overlay[hidden] {
  display: none !important;
}

.neo-rank-card {
  position: relative;
  width: min(26rem, 100%);
  max-height: min(88dvh, 40rem);
  overflow: auto;
  padding: 1.25rem 1.15rem 1rem;
  border-radius: 1.1rem 1.1rem 0.85rem 0.85rem;
  background: #121a2b;
  border: 1px solid rgba(94, 234, 212, 0.28);
  color: #e8eef7;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
}

.neo-rank-close {
  position: absolute;
  right: 0.55rem;
  top: 0.45rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  min-width: 2.5rem;
  min-height: 2.5rem;
}

.neo-rank-title {
  margin: 0 1.5rem 0.35rem 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #5eead4;
}

.neo-rank-score {
  margin: 0 0 0.85rem;
  color: #94a3b8;
}

.neo-rank-score strong {
  color: #fbbf24;
  font-size: 1.25rem;
}

.neo-rank-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 650;
}

.neo-rank-input {
  width: 100%;
  min-height: 2.85rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid #2a364a;
  background: #0b1220;
  color: #e8eef7;
  font-size: 16px;
}

.neo-rank-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.neo-rank-btn {
  width: 100%;
  min-height: 2.9rem;
  border: 0;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  color: #0b1220;
  background: linear-gradient(135deg, #5eead4, #2dd4bf);
}

.neo-rank-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.neo-rank-msg {
  min-height: 1.25rem;
  margin: 0.55rem 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.neo-rank-board-wrap {
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(42, 54, 74, 0.9);
}

.neo-rank-board-title,
.neo-rank-game-block h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.neo-rank-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.neo-rank-board li {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.75);
  font-size: 0.9rem;
}

.neo-rank-r {
  color: #fbbf24;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.neo-rank-n {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neo-rank-s {
  color: #5eead4;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.neo-rank-empty,
.neo-rank-loading {
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

.neo-rank-link {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  text-decoration: underline;
  cursor: pointer;
  min-height: 2.5rem;
}

.neo-rank-game-block {
  margin-bottom: 1rem;
}

@media (min-width: 721px) {
  .neo-rank-overlay {
    align-items: center;
  }
  .neo-rank-card {
    border-radius: 1.1rem;
  }
}
