* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  min-height: 100vh;
}

.top-bar {
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 2;
}

.top-bar h1 { margin: 0; font-size: 16px; opacity: 0.9; }

.top-bar .btn-logout { margin-left: auto; }

main {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: calc(100vh - 48px);
}

@media (max-width: 800px) {
  main { grid-template-columns: 1fr; }
  .sidebar { border-left: none; border-top: 1px solid rgba(255,255,255,0.12); }
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 12px;
  min-height: calc(100vh - 48px);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  opacity: 0.75;
}

.timer {
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 8px;
}

.btn-check {
  font: inherit;
  font-size: clamp(2.5rem, 12vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.35em 0.7em;
  border-radius: 16px;
  border: 4px solid rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  cursor: pointer;
  line-height: 1;
  min-width: min(90vw, 420px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.btn-check:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.4);
  transform: scale(1.02);
}

.btn-check:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-check:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.target-team {
  margin: 8px 0 0;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 700;
}

.sidebar {
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  overflow: auto;
}

.sidebar h2 {
  margin: 0 0 10px;
  font-size: 13px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.team-list,
.elim-list {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.team-list li,
.elim-list li {
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.team-list li.active {
  outline: 2px solid rgba(255, 255, 255, 0.65);
}

.team-list li.eliminated {
  opacity: 0.4;
  text-decoration: line-through;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.badge.ok { color: #afffb0; }
.badge.warn { color: #ffd580; }
.badge.off { opacity: 0.6; }

.btn-secondary {
  font: inherit;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.18); }

.btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
