/* ==========================================
   Leaderboard State Selector
   Matte Black + Red Laser Theme
========================================== */

.leaderboard-state-menu {
  width: 100%;
  max-width: 420px;
  margin: 24px 0;
  padding: 18px;
  background: rgba(8, 8, 8, 0.96);
  border: 1px solid rgba(255, 0, 0, 0.25);
  border-radius: 18px;
  box-shadow:
    0 0 12px rgba(255, 0, 0, 0.12),
    inset 0 0 20px rgba(255, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.leaderboard-state-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 250%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 0, 0, 0.95),
    transparent
  );
  animation: leaderboardLaserScan 5s linear infinite;
}

@keyframes leaderboardLaserScan {
  from {
    transform: translateX(-40%);
  }
  to {
    transform: translateX(40%);
  }
}

.leaderboard-state-menu label {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leaderboard-state-menu select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 0, 0, 0.45);
  background: #050505;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
  box-shadow:
    inset 0 0 8px rgba(255, 0, 0, 0.08);
}

.leaderboard-state-menu select:hover {
  border-color: rgba(255, 0, 0, 0.75);
  box-shadow:
    0 0 12px rgba(255, 0, 0, 0.2),
    inset 0 0 12px rgba(255, 0, 0, 0.12);
}

.leaderboard-state-menu select:focus {
  border-color: #ff0000;
  box-shadow:
    0 0 18px rgba(255, 0, 0, 0.4),
    inset 0 0 12px rgba(255, 0, 0, 0.15);
}

.leaderboard-state-menu option {
  background: #0a0a0a;
  color: #ffffff;
}

/* Mobile */

@media (max-width: 768px) {
  .leaderboard-state-menu {
    max-width: 100%;
    padding: 16px;
  }

  .leaderboard-state-menu select {
    height: 48px;
    font-size: 0.9rem;
  }
}

/* HEADER */

.leaderboard-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  gap: 20px;

  padding: 18px 24px;

  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.97),
      rgba(10, 10, 10, 0.95)
    );

  border-bottom: 1px solid rgba(255, 0, 0, 0.35);

  box-shadow:
    0 0 20px rgba(255, 0, 0, 0.12);
}

.leaderboard-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      #ff0000,
      transparent
    );

  box-shadow:
    0 0 10px #ff0000,
    0 0 20px #ff0000;

  animation: leaderboardHeaderLaser 3s infinite ease-in-out;
}

.leaderboard-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;

  color: #ffffff;
  text-decoration: none;
  font-weight: 700;

  border-radius: 999px;

  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.4);

  box-shadow:
    0 0 10px rgba(255, 0, 0, 0.25);
}

.leaderboard-back-btn:hover {
  border-color: rgba(255, 0, 0, 0.9);

  box-shadow:
    0 0 20px rgba(255, 0, 0, 0.5);
}

.leaderboard-header-center {
  flex: 1;
}

.leaderboard-header-center h1 {
  margin: 0;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.leaderboard-header-center p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

@keyframes leaderboardHeaderLaser {
  0% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.4;
  }
}

/* ORIGINAL */

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body{
  background:#050505;
  color:#fff;
  font-family:Arial,sans-serif;
  min-height:100vh;
}

#leaderboardPage{
  max-width:1200px;
  margin:auto;
  padding:40px 20px;
}

h1{
  font-size:42px;
  margin-bottom:10px;
  font-weight:300;
  letter-spacing:2px;
  color:#ff2b2b;
  text-transform:uppercase;
}

#leaderboardPage p{
  color:#999;
  margin-bottom:30px;
}

#leaderboardStatus{
  margin-bottom:20px;
  color:#ff4444;
}

#leaderboardGrid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(350px,1fr));
  gap:20px;
}

.leaderboard-card{
  display:block;
  text-decoration:none;
  color:white;
  background:#0d0d0d;
  border:1px solid rgba(255,0,0,.2);
  border-radius:20px;
  padding:20px;
  position:relative;
  overflow:hidden;
  transition:.3s;
}

.leaderboard-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(
      135deg,
      rgba(255,0,0,.18),
      transparent 40%
    );
  pointer-events:none;
}

.leaderboard-card:hover{
  transform:translateY(-4px);
  border-color:#ff0000;
  box-shadow:
    0 0 20px rgba(255,0,0,.3),
    0 0 50px rgba(255,0,0,.15);
}

.rank{
  font-size:32px;
  font-weight:700;
  color:#ff1a1a;
  margin-bottom:10px;
}

.leaderboard-card h2{
  font-size:22px;
  margin-bottom:5px;
}

.score{
  margin-top:15px;
  font-size:26px;
  font-weight:700;
  color:#ff4444;
}

.breakdown{
  margin-top:15px;
  display:grid;
  gap:6px;
  color:#bbb;
  font-size:14px;
}

.breakdown span{
  display:block;
}

@media(max-width:768px){

  h1{
    font-size:30px;
  }

  #leaderboardGrid{
    grid-template-columns:1fr;
  }

}
