/* Score + Leaderboard — Prime */
.screen.score, .screen.leaderboard {
  position: fixed; inset: 0; z-index: 100;
  background: #0a0e14; color: #e4f1ee;
  display: flex; flex-direction: column;
  font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  font-weight: 500; overflow: hidden; letter-spacing: .05em;
}
.screen.score.hidden, .screen.leaderboard.hidden { display: none; }

.scr__topbar {
  display: flex; align-items: stretch;
  background: #0a0e14; border-bottom: 1px solid #00bfa533;
  min-height: 44px; padding-left: 4px; flex-shrink: 0;
}
.scr__back {
  background: none; border: 0; color: #00bfa5;
  padding: 0 10px 0 4px; cursor: pointer;
  display: flex; align-items: center;
}
.scr__back svg { width: 20px; height: 20px; stroke-width: 2.5; }
.scr__title {
  flex: 1; padding: 12px 14px 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #00bfa5;
  display: flex; align-items: center;
  text-shadow: 0 0 8px #00bfa588;
}
.scr__content {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  -webkit-overflow-scrolling: touch;
}

/* ---------- SCORE ---------- */
.score__graphs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 16px;
  padding: 12px;
  background: #0e141c;
  border: 1px solid #00bfa533;
}
.score__graph-wrap {
  display: flex; flex-direction: column; gap: 6px;
}
.score__graph-label {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #5d6b6b; text-align: center;
}
.score__graph {
  height: 120px; display: flex; align-items: flex-end;
  gap: 4px; padding: 0 4px 22px;
  position: relative;
}
.score__bar {
  flex: 1; min-height: 2px;
  transition: height .4s ease-out;
  position: relative;
}
.score__bar--r { background: linear-gradient(180deg, #FF5555 0%, #8B0000 100%); box-shadow: 0 0 12px #B0008888; }
.score__bar--g { background: linear-gradient(180deg, #55FF88 0%, #008844 100%); box-shadow: 0 0 12px #00B00088; }
.score__bar--b { background: linear-gradient(180deg, #55AAFF 0%, #004488 100%); box-shadow: 0 0 12px #0088FF88; }
.score__bar-val {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: #e4f1ee;
  white-space: nowrap;
  letter-spacing: .02em;
}

.score__table {
  width: 100%; border-collapse: collapse;
  margin-bottom: 12px;
}
.score__table th, .score__table td {
  padding: 10px 8px; text-align: center;
  border-bottom: 1px solid #00bfa522;
}
.score__table thead th {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #5d6b6b; font-weight: 700;
}
.score__table tbody th {
  font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; text-align: left;
}
.score__table .team-r th { color: #B00; }
.score__table .team-g th { color: #0B0; }
.score__table .team-b th { color: #08F; }
.score__table .current { font-size: 15px; font-weight: 700; color: #e4f1ee; }
.score__table .diff { font-size: 12px; font-weight: 600; color: #5d6b6b; }
.score__table .diff.plus { color: #4ade80; }
.score__table .diff.minus { color: #ff6b6b; }

.score__timers {
  display: flex; justify-content: space-around;
  padding: 12px; background: #0e141c;
  border: 1px solid #00bfa533;
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase;
}
.score__timers span { color: #5d6b6b; }
.score__timers strong { color: #00bfa5; margin-left: 6px; font-weight: 700; }

/* ---------- LEADERBOARD ---------- */
.lb__term {
  display: flex; gap: 8px; margin-bottom: 12px;
  overflow-x: auto; scrollbar-width: none;
}
.lb__term::-webkit-scrollbar { display: none; }
.lb__term-btn {
  background: none; border: 1px solid #00bfa544;
  color: #5d6b6b; padding: 8px 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; white-space: nowrap;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.lb__term-btn.active {
  color: #00bfa5; border-color: #00bfa5;
  box-shadow: 0 0 8px #00bfa544;
}

.lb__list-wrp { overflow-x: auto; }
.lb__list {
  width: 100%; border-collapse: collapse;
  min-width: 320px;
}
.lb__list td {
  padding: 10px 8px;
  border-bottom: 1px solid #00bfa522;
  font-size: 14px;
}
.lb__list td:nth-child(1) {
  width: 44px; text-align: right;
  color: #5d6b6b; font-weight: 700;
}
.lb__list td:nth-child(3) {
  text-align: right; color: #00bfa5;
  font-weight: 700; letter-spacing: .04em;
}
.lb__list .own { background: #00bfa510; }
.lb__level {
  display: inline-block; min-width: 22px;
  padding: 0 4px; font-size: 11px; font-weight: 700;
  text-align: center; border-radius: 3px;
  margin-right: 6px; vertical-align: middle;
}
.lb__name {
  font-weight: 700; letter-spacing: .04em; cursor: pointer;
  vertical-align: middle;
}

.lb__place {
  padding: 10px 0; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: #5d6b6b;
  text-align: center;
}
.lb__place strong { color: #00bfa5; }

.lb__pages {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; padding: 12px 0;
  border-top: 1px solid #00bfa533;
}
.lb__pages button, .lb__pages select {
  background: #0e141c; color: #00bfa5;
  border: 1px solid #00bfa544;
  padding: 6px 10px; font-family: inherit; font-size: 13px;
  font-weight: 700; letter-spacing: .08em;
  cursor: pointer;
}
.lb__pages button:disabled, .lb__pages select:disabled { opacity: .3; }
.lb__pages select { min-width: 60px; text-align: center; }

.scr__loading { padding: 40px; text-align: center; color: #00bfa5; font-size: 12px; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; }
.scr__error { padding: 40px; text-align: center; color: #ff6b6b; font-size: 14px; }

/* Иконки уровней в лидерборде */
.lb__level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 6px;
  vertical-align: middle;
  background: none !important;
  border: 0 !important;
  padding: 0;
}
.lb__level-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
