/* tournament-ui.css + game-ui.css — оформление новых блоков турнира и пульта. */

/* ------------------------------------------------------------- турнирная сетка */

.bracket-stage {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bracket-stage.is-current {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}

.bracket-stage-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bracket-bars {
  display: grid;
  gap: 5px;
}

.bracket-bar {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .04);
  font-size: 11px;
}

.bracket-bar b {
  font-size: 17px;
  font-weight: 850;
}

.bracket-bar span {
  color: var(--muted);
}

.bar-two b { color: #7fe0a8; }
.bar-one b { color: #ffcb7a; }
.bar-zero b { color: #ff9aa4; }

.bracket-stage-total {
  margin-top: auto;
  font-size: 20px;
  font-weight: 850;
  color: var(--gold);
}

.bracket-stage-total span {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* ------------------------------------------------------------------- проверка */

.trn-check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.trn-check-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
}

.trn-check-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: #24412f;
  color: #b6f0cc;
}

.trn-check-item.is-warn .trn-check-mark {
  background: #4a3320;
  color: #ffcf8f;
}

.trn-check-item b {
  font-size: 13.5px;
}

.trn-check-item p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* --------------------------------------------------------------- сортировка */

.trn-sort {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  position: relative;
}

.trn-sort::after {
  content: ' ⇅';
  opacity: .35;
  font-size: 10px;
}

.trn-sort.is-active {
  color: var(--gold);
}

.trn-sort.is-active::after {
  opacity: 1;
}

.trn-history-btn {
  margin-top: 5px;
}

.trn-top td {
  background: rgba(245, 197, 66, .07);
}

.trn-standings .trn-modal {
  min-width: 0;
}

/* ---------------------------------------------------------------- игровой пульт */

.gme-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
  padding: 9px 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
}

.gme-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
}

.gme-step + .gme-step::before {
  content: '';
  width: 12px;
  height: 1px;
  background: var(--line);
  margin-right: 5px;
}

.gme-step-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
}

.gme-step.is-done .gme-step-dot {
  background: rgba(125, 224, 168, .2);
  color: #9ce8bd;
}

.gme-step.is-current {
  color: var(--ink);
  font-weight: 800;
  background: rgba(245, 197, 66, .16);
}

.gme-step.is-current .gme-step-dot {
  background: var(--gold);
  color: #1d1508;
}

.gme-selected {
  margin: 11px 0 0;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  min-height: 46px;
  display: flex;
  align-items: center;
}

.gme-player {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  flex-wrap: wrap;
}

.gme-player-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #38303b;
  font-size: 18px;
}

.gme-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gme-player-info {
  min-width: 0;
  flex: 1;
}

.gme-player-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.gme-player-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.gme-subhead {
  margin: 15px 0 8px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 640px) {
  .gme-stepper { gap: 2px; }
  .gme-step-label { display: none; }
  .gme-step.is-current .gme-step-label { display: inline; }
}
