.highscores-app {
  min-height: 100%;
}

.highscores-hero {
  min-height: 72vh;
  background:
    radial-gradient(circle at top, rgba(255, 215, 128, 0.16), transparent 38%),
    linear-gradient(180deg, #050505 0%, #120b1d 48%, #0b1d2d 100%);
}

.highscores-hero::before {
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 214, 102, 0.12) 0%, transparent 42%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, transparent 45%, rgba(255, 255, 255, 0.02) 100%);
}

.highscores-hero-content {
  width: min(1100px, calc(100% - 2rem));
}

.breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: #f0d8aa;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.hero-kicker,
.board-kicker {
  color: #d8bf7c;
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions .expand-button {
  min-width: 150px;
}

.board-section {
  padding-top: 4rem;
}

.board-shell,
.lookup-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.board-topline {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.board-title,
.lookup-title {
  margin: 0.45rem 0 1rem;
  text-align: left;
}

.board-summary,
.lookup-text {
  color: #d8d8d8;
  line-height: 1.7;
  max-width: 60ch;
}

.board-status-wrap {
  min-width: 260px;
  text-align: right;
}

.board-status,
.board-updated {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.board-status {
  color: #f5f5f5;
  margin-bottom: 0.7rem;
}

.board-status.is-error {
  color: #ffd2d2;
  border-color: rgba(255, 120, 120, 0.35);
  background: rgba(90, 18, 18, 0.45);
}

.board-status.is-success {
  color: #d9ffe2;
  border-color: rgba(120, 255, 160, 0.25);
  background: rgba(16, 72, 35, 0.36);
}

.board-updated {
  color: #adadad;
  font-size: 0.92rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 260px));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.metric-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #f3f3f3;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.metric-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 220, 140, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.metric-button.is-active {
  border-color: rgba(255, 220, 140, 0.6);
  background: linear-gradient(180deg, rgba(255, 220, 140, 0.18), rgba(255, 255, 255, 0.05));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.metric-label {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.metric-description {
  display: block;
  color: #b8b8b8;
  font-size: 0.84rem;
  line-height: 1.4;
}

.table-shell {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(5, 5, 5, 0.34);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead {
  background: rgba(255, 255, 255, 0.05);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1rem 1.2rem;
  text-align: left;
}

.leaderboard-table th {
  color: #d6d6d6;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.leaderboard-table tbody tr {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.leaderboard-row.podium-gold {
  background:
    linear-gradient(90deg, rgba(255, 216, 102, 0.16), rgba(255, 255, 255, 0.02) 42%, rgba(255, 216, 102, 0.08)) !important;
}

.leaderboard-row.podium-silver {
  background:
    linear-gradient(90deg, rgba(214, 223, 235, 0.14), rgba(255, 255, 255, 0.02) 42%, rgba(214, 223, 235, 0.07)) !important;
}

.leaderboard-row.podium-bronze {
  background:
    linear-gradient(90deg, rgba(201, 133, 83, 0.16), rgba(255, 255, 255, 0.02) 42%, rgba(201, 133, 83, 0.08)) !important;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8e1ae;
  font-weight: 700;
}

.rank-pill.podium-gold {
  background: linear-gradient(180deg, #f7d977, #d59b15);
  color: #2e2000;
  box-shadow: 0 0 22px rgba(255, 215, 112, 0.34);
}

.rank-pill.podium-silver {
  background: linear-gradient(180deg, #edf3fb, #98a7bb);
  color: #182130;
  box-shadow: 0 0 18px rgba(209, 220, 236, 0.25);
}

.rank-pill.podium-bronze {
  background: linear-gradient(180deg, #ebb28a, #9f5c2a);
  color: #241003;
  box-shadow: 0 0 18px rgba(223, 146, 94, 0.25);
}

.player-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.player-primary {
  color: #ffffff;
  font-weight: 700;
}

.leaderboard-row.podium-gold .player-primary {
  color: #fff4cf;
}

.leaderboard-row.podium-silver .player-primary {
  color: #f3f8ff;
}

.leaderboard-row.podium-bronze .player-primary {
  color: #ffe5d5;
}

.player-secondary {
  color: #959595;
  font-size: 0.82rem;
  word-break: break-all;
}

.metric-value {
  color: #fff4cf;
  font-weight: 700;
}

.leaderboard-row.podium-gold .metric-value,
.leaderboard-row.podium-silver .metric-value,
.leaderboard-row.podium-bronze .metric-value {
  font-size: 1.05rem;
}

.empty-state {
  color: #b8b8b8;
  text-align: center;
  padding: 2rem 1rem;
}

.lookup-section {
  padding-top: 4rem;
}

.lookup-form {
  margin: 1.8rem 0;
}

.lookup-label {
  display: block;
  color: #d8d8d8;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.lookup-controls {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.lookup-input {
  flex: 1 1 320px;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.24);
  color: #ffffff;
}

.lookup-input:focus {
  outline: none;
  border-color: rgba(255, 220, 140, 0.52);
  box-shadow: 0 0 0 3px rgba(255, 220, 140, 0.1);
}

.player-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
}

.player-card.hidden {
  display: none;
}

.player-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.player-name {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  margin-top: 0.3rem;
}

.player-uuid {
  color: #9f9f9f;
  font-size: 0.86rem;
  word-break: break-all;
  text-align: right;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
}

.stat-tile {
  border-radius: 12px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-label {
  display: block;
  color: #b8b8b8;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-value {
  display: block;
  color: #fff7db;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.45rem;
}

.notes-section {
  background: linear-gradient(135deg, #141414 0%, #1d122c 55%, #0d2333 100%);
}

.notes-content code,
.board-summary code {
  color: #ffe3a6;
  font-family: Consolas, Monaco, monospace;
}

.noscript-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: rgba(96, 15, 15, 0.95);
  color: #fff0f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 1000;
}

@media (max-width: 820px) {
  .board-topline,
  .player-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .board-status-wrap,
  .player-uuid {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .highscores-hero {
    min-height: 60vh;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.85rem 0.8rem;
  }

  .metric-grid,
  .player-grid {
    grid-template-columns: 1fr;
  }
}
