.lb-two-col {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  width: 100%;
}

.lb-scores-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lb-buttons-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
  padding-top: 2px;
}

.lb-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
  width: 100%;
}

.lb-action-btn:hover {
  filter: brightness(0.92);
}

.lb-action-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.lb-action-btn.btn-gold {
  background-color: #FFD700;
  color: #1a1a1a;
}

.lb-action-btn.btn-blue {
  background-color: #a8c2ea;
  color: #1a1a1a;
}

.lb-action-btn.btn-white {
  background-color: #ffffff;
  color: #1a1a1a;
}

.lb-action-btn.btn-green {
  background-color: #10a020;
  color: #ffffff;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leaderboard-list li {
  cursor: pointer;
  transition: transform 0.1s, filter 0.1s;
}
.leaderboard-list li:hover {
  filter: brightness(1.15);
}
.leaderboard-list li:active {
  transform: scale(0.98);
}

.lb-row-container {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4px 6px;
  border-radius: 8px;
  box-sizing: border-box;
  gap: 6px;
}

.lb-rank {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  color: var(--highlight);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
  font-size: 16px;
}

.lb-initials-group {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.lb-initial-tile {
  width: clamp(24px, calc(var(--game-size) * 0.08), 34px);
  height: clamp(24px, calc(var(--game-size) * 0.08), 34px);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(16px, calc(var(--game-size) * 0.06), 22px);
  font-family: Arial, sans-serif;
  font-weight: bold;
  background-color: #fdf6e3;
  color: #1a1a1a;
  border-radius: 4px;
  box-shadow:
    inset 2px 2px 3px rgba(255, 255, 255, 1),
    inset -2px -2px 3px rgba(0, 0, 0, 0.15),
    1px 2px 3px rgba(0, 0, 0, 0.4);
}

.lb-score-tile {
  min-width: clamp(44px, calc(var(--game-size) * 0.12), 56px);
  height: clamp(28px, calc(var(--game-size) * 0.08), 36px);
  padding: 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(16px, calc(var(--game-size) * 0.05), 20px);
  font-family: Arial, sans-serif;
  font-weight: bold;
  background-color: #2b4c7e;
  color: #ffffff;
  border-radius: 4px;
  box-shadow:
    inset 2px 2px 3px rgba(255, 255, 255, 0.3),
    inset -2px -2px 3px rgba(0, 0, 0, 0.3),
    1px 2px 3px rgba(0, 0, 0, 0.4);
  margin-left: auto;
}

.leaderboard-list li.is-top-score .lb-row-container {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.16), rgba(255, 170, 0, 0.06));
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow:
    0 0 14px rgba(255, 215, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  animation: goldPulse 1.8s ease-in-out infinite;
}

.leaderboard-list li.is-top-score .lb-rank {
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.55);
}

.leaderboard-list li.is-top-score .lb-initial-tile {
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.leaderboard-list li.is-top-score .lb-score-tile {
  background: linear-gradient(180deg, #ffd700, #f0a500);
  color: #1a1a1a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 12px rgba(255, 215, 0, 0.24);
}

.leaderboard-list li.is-top-score .lb-score-tile::before {
  content: "★ ";
}

#leaderboard-title.is-celebration {
  color: #FFD700 !important;
  animation: titleShimmer 1.3s ease-in-out infinite;
  letter-spacing: 1px;
}

#leaderboard-modal.is-celebration {
  box-shadow:
    inset 0 0 50px rgba(255, 215, 0, 0.08),
    0 12px 38px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(255, 215, 0, 0.18);
}

.board-title {
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.board-title.top-score-mode {
  color: var(--gold-1);
  animation: titleShimmer 1.3s ease-in-out infinite;
}

.board-title.ai-mode {
  color: var(--highlight);
  animation: bluePulse 1.5s ease-in-out infinite;
}

.board-score-line {
  font-size: 20px;
  margin-bottom: 12px;
}

.board-score-line.top-score-mode {
  color: #fff2b0;
}

.board-score-line.ai-mode {
  color: #d8e7ff;
}

.glow-gold {
  color: var(--gold-1);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.85), 0 0 22px rgba(255, 170, 0, 0.55);
}

.glow-blue {
  color: #d9ebff;
  text-shadow: 0 0 10px rgba(168, 194, 234, 0.85), 0 0 22px rgba(120, 180, 255, 0.55);
}
