/* Leaderboard Button */
.leaderboard-btn {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.leaderboard-btn:hover {
  background: linear-gradient(135deg, #ee5a24, #ff6b6b);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

/* Leaderboard Modal */
.leaderboard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.leaderboard-modal {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #00ff88;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.leaderboard-header {
  background: linear-gradient(135deg, #00ff88, #00cc6f);
  color: #1a1a2e;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.leaderboard-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.leaderboard-header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.8;
  font-size: 1rem;
}

.close-btn {
  background: none;
  border: none;
  color: #1a1a2e;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.close-btn:hover {
  background: rgba(26, 26, 46, 0.2);
}

.leaderboard-list {
  padding: 1rem;
  max-height: 60vh;
  overflow-y: auto;
}

.score-entry {
  display: grid;
  grid-template-columns: 60px 1fr auto 80px;
  gap: 1rem;
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  align-items: center;
  transition: all 0.3s ease;
}

.score-entry:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.score-entry.rank-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.1));
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.score-entry.rank-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(169, 169, 169, 0.1));
  border: 1px solid rgba(192, 192, 192, 0.3);
}

.score-entry.rank-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(184, 115, 51, 0.1));
  border: 1px solid rgba(205, 127, 50, 0.3);
}

.rank {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  color: #00ff88;
}

.name {
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score {
  color: #00ff88;
  font-weight: bold;
  font-size: 1.1rem;
}

.date {
  color: #888;
  font-size: 0.9rem;
}

.no-scores {
  text-align: center;
  color: #888;
  padding: 2rem;
  font-style: italic;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}