/* Live CSS v8 - Tempo de set abaixo, Lucide icons, quadra horizontal */

:root {
  --bg: #0d0d0d;
  --card: #1a1a1a;
  --hover: #252525;
  --txt: #fff;
  --txt2: #a0a0a0;
  --muted: #666;
  --border: #333;
  --red: #e31e24;
  --green: #28a745;
  --yellow: #ffc107;
  --blue: #007bff;
  --court: #ff915c;
  --court-area: #0873a7;
  --player-card: #d4a574;
  --serving-red: #d32f2f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--txt);
  height: 100vh;
  overflow: hidden;
}

.live-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 6px;
  gap: 6px;
  position: relative;
}

.hidden { display: none !important; }

/* Lucide Icons */
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 18px; height: 18px; }

/* ============================================ */
/* OVERLAYS                                     */
/* ============================================ */

.match-finished-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

/* Timeout e Challenge - modals centralizados */
.timeout-overlay,
.challenge-overlay {
  position: fixed;
  top: 50%;
  z-index: 1000;
  animation: slideInFromSide 0.4s ease;
}

/* Posição esquerda (time da casa) */
.timeout-overlay[data-side="left"],
.challenge-overlay[data-side="left"] {
  left: 20px;
  right: auto;
  transform: translateY(-50%);
}

/* Posição direita (time visitante) */
.timeout-overlay[data-side="right"],
.challenge-overlay[data-side="right"] {
  right: 20px;
  left: auto;
  transform: translateY(-50%);
}

@keyframes slideInFromSide {
  from { 
    opacity: 0; 
    transform: translateY(-50%) translateX(-30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(-50%) translateX(0); 
  }
}

.timeout-overlay[data-side="right"],
.challenge-overlay[data-side="right"] {
  animation: slideInFromRight 0.4s ease;
}

@keyframes slideInFromRight {
  from { 
    opacity: 0; 
    transform: translateY(-50%) translateX(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(-50%) translateX(0); 
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.finished-content {
  text-align: center;
  padding: 40px;
}

.finished-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--yellow);
  margin-bottom: 25px;
  letter-spacing: 2px;
}

.finished-winner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.winner-badge {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.winner-name {
  font-size: 24px;
  font-weight: 700;
}

.winner-label {
  font-size: 12px;
  color: var(--green);
  letter-spacing: 2px;
}

.finished-score {
  font-size: 56px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

.finished-score .sep { color: var(--muted); }

.finished-time {
  font-size: 14px;
  color: var(--txt2);
  margin-bottom: 25px;
}

.btn-close-overlay {
  background: var(--card);
  color: var(--txt);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-overlay:hover {
  background: var(--hover);
  border-color: var(--yellow);
}

/* Timeout Overlay */
.timeout-content {
  text-align: center;
  padding: 40px;
  background: var(--card);
  border-radius: 12px;
  border: 2px solid var(--yellow);
  min-width: 320px;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 40px rgba(255,193,7,0.3);
}

.challenge-content {
  text-align: center;
  padding: 40px;
  background: var(--card);
  border-radius: 12px;
  border: 2px solid var(--blue);
  min-width: 320px;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 40px rgba(0,123,255,0.3);
}

.timeout-icon,
.challenge-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 15px;
  color: var(--yellow);
}

.timeout-type {
  font-size: 20px;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 8px;
}

.timeout-team {
  font-size: 18px;
  color: var(--txt);
  margin-bottom: 15px;
  font-weight: 600;
}

.timeout-timer {
  font-size: 64px;
  font-weight: 800;
  font-family: monospace;
}

.timeout-timer.urgent {
  color: var(--red);
  animation: blink 0.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Challenge */
.challenge-content .challenge-icon {
  color: var(--blue);
}

.challenge-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
}

.challenge-team {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.challenge-reason {
  font-size: 14px;
  color: var(--txt2);
  margin-bottom: 12px;
}

.challenge-result {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 4px;
  margin-top: 10px;
}

.challenge-result.success {
  background: rgba(40,167,69,0.2);
  color: var(--green);
  border: 1px solid var(--green);
}

.challenge-result.failed {
  background: rgba(227,30,36,0.2);
  color: var(--red);
  border: 1px solid var(--red);
}

.challenge-result.pending {
  background: rgba(255,193,7,0.2);
  color: var(--yellow);
  border: 1px solid var(--yellow);
}

/* ============================================ */
/* HEADER                                       */
/* ============================================ */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: var(--card);
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 11px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.status-dot.finished {
  background: var(--muted);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-text {
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1px;
}

.status-text.finished { color: var(--muted); }

.match-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--txt2);
  font-size: 11px;
}

.header-center {
  display: flex;
  gap: 15px;
  color: var(--txt2);
}

.referee { font-size: 10px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.btn-stats {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--txt2);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.btn-stats:hover {
  background: var(--hover);
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn-stats svg { width: 16px; height: 16px; }

.conn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}

.conn-dot.ok { background: var(--green); }
.conn-dot.err { background: var(--red); }

/* ============================================ */
/* SCOREBOARD                                   */
/* ============================================ */

.scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--card);
  border-radius: 4px;
  border: 1px solid var(--border);
  gap: 10px;
}

.team-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.team-box.left { justify-content: flex-start; }
.team-box.right { justify-content: flex-end; }

.badge {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.team-info {
  display: flex;
  align-items: center;
  gap: 5px;
}

.flag {
  width: 20px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
}

.team-name {
  font-size: 12px;
  font-weight: 700;
}

.sets {
  font-size: 32px;
  font-weight: 800;
}

.score-center {
  text-align: center;
  min-width: 200px;
}

.set-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 2px;
}

.set-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}

.points-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pts {
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
  min-width: 35px;
}

.sep {
  font-size: 24px;
  color: var(--muted);
}

.serve-indicator {
  width: 16px;
  height: 16px;
}

.serve-icon {
  width: 14px;
  height: 14px;
  fill: var(--yellow);
  color: var(--yellow);
  animation: bounce 0.6s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-2px); }
}

/* Sets History com tempo abaixo de cada set */
.sets-history {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.sh {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  color: var(--muted);
  padding: 3px 6px;
  background: var(--hover);
  border-radius: 4px;
  min-width: 45px;
}

.sh.done { 
  color: var(--txt); 
  background: rgba(40,167,69,0.2);
}

.sh.current { 
  color: var(--yellow); 
  background: rgba(255,193,7,0.15);
  border: 1px solid var(--yellow);
}

.sh-label {
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 2px;
}

.sh-score { 
  font-weight: 700;
  font-size: 11px;
}

.sh-time { 
  font-size: 9px; 
  color: var(--txt2);
  margin-top: 2px;
}

/* ============================================ */
/* MAIN LAYOUT                                  */
/* ============================================ */

.main {
  flex: 1;
  display: flex;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}

/* ============================================ */
/* PANELS                                       */
/* ============================================ */

.panel {
  width: 150px;
  min-width: 130px;
  background: var(--card);
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 7px;
  background: var(--hover);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
}

.mflag {
  width: 16px;
  height: 11px;
  object-fit: cover;
  border-radius: 1px;
}

.panel-resources {
  display: flex;
  justify-content: space-around;
  padding: 5px;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.panel-resources span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.panel-resources span span {
  color: var(--txt);
  font-weight: 600;
}

.panel-coach {
  padding: 4px 7px;
  background: rgba(227,30,36,0.1);
  border-bottom: 1px solid var(--border);
  font-size: 9px;
  display: flex;
  gap: 3px;
}

.panel-coach .lbl { color: var(--muted); }
.panel-coach .val { color: var(--txt); font-weight: 600; }

.players {
  flex: 1;
  overflow-y: auto;
  padding: 3px;
}

.pl {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 2px;
  font-size: 9px;
  border-left: 2px solid transparent;
  margin-bottom: 1px;
}

.pl.cap {
  border-left-color: var(--green);
  background: rgba(40,167,69,0.1);
}

.pl.lib {
  border-left-color: var(--yellow);
  background: rgba(255,193,7,0.1);
}

.pl .n {
  font-weight: 700;
  color: var(--txt2);
  min-width: 22px;
}

.pl .nm {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl .tag {
  font-size: 7px;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 2px;
}

.pl .tag.c { background: var(--green); color: #fff; }
.pl .tag.l { background: var(--yellow); color: #333; }

.no-data {
  color: var(--muted);
  font-size: 9px;
  padding: 6px;
  text-align: center;
}

/* ============================================ */
/* COURT SECTION - Posições Reais do Vôlei      */
/* ============================================ */

.court-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.court-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--court-area);
  border-radius: 4px;
  padding: 15px;
  gap: 0;
  position: relative;
}

/* Área livre tracejada */
.court-area::before,
.court-area::after {
  content: '';
  position: absolute;
  top: 15px;
  bottom: 15px;
  width: 40px;
  border: 2px dashed rgba(255,255,255,0.3);
  pointer-events: none;
}

.court-area::before { left: 15px; }
.court-area::after { right: 15px; }

.court-wrapper {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 100%;
  max-height: 400px;
}

.court {
  background: var(--court);
  display: flex;
  width: 280px;
  min-width: 220px;
  position: relative;
}

.court-left {
  flex-direction: row-reverse;  
  border-left: 3px solid #fff;
  border-top: 3px solid #fff;
  border-bottom: 3px solid #fff;
}

.court-right {
  border-right: 3px solid #fff;
  border-top: 3px solid #fff;
  border-bottom: 3px solid #fff;
}

/* Linha de ataque - entre as duas linhas (50%) */
.court::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  border-left: 2px dashed rgba(255,255,255,0.4);
}

/* Linhas da quadra - 2 linhas */
.court-row {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.court-row.front-row {
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

/* Zona individual - 3 por linha */
.court .zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 3px;
  position: relative;
  /* Animação de movimento */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.court .zone:last-child {
  border-right: none;
}

.zone .zname {
  font-size: 10px;
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65px;
  transition: all 0.3s ease;
}

.zone .zn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--player-card);
  border-radius: 5px;
  width: 45px;
  height: 55px;
  font-size: 24px;
  font-weight: 800;
  color: #333;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  position: relative;
  /* Animação suave */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================ */
/* CORES DOS TIMES - HOME (Azul) / AWAY (Laranja) */
/* ============================================ */

/* Time da casa (Esquerda) - Camisa Azul */
.court-left .zone .zn {
  background: #1565c0;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 2px 2px 6px rgba(21, 101, 192, 0.4);
}

/* Time visitante (Direita) - Camisa Laranja */
.court-right .zone .zn {
  background: #e65100;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 2px 2px 6px rgba(230, 81, 0, 0.4);
}

/* Libero mantém amarelo */
.court-left .zone.libero .zn { 
  background: var(--yellow) !important; 
  color: #333;
  border: 2px solid #1565c0;
}

.court-right .zone.libero .zn { 
  background: var(--yellow) !important; 
  color: #333;
  border: 2px solid #e65100;
}

/* Sacador - mesma cor do time */
.serve-area-left .server-number {
  background: #1565c0;
  color: #fff;
  border: 2px solid #fff;
  animation: pulse-serve-home 1.5s infinite;
}

.serve-area-right .server-number {
  background: #e65100;
  color: #fff;
  border: 2px solid #fff;
  animation: pulse-serve-away 1.5s infinite;
}

@keyframes pulse-serve-home {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21, 101, 192, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(21, 101, 192, 0); }
}

@keyframes pulse-serve-away {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 81, 0, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(230, 81, 0, 0); }
}

/* ============================================ */
/* ANIMAÇÕES DE ROTAÇÃO E MOVIMENTO             */
/* ============================================ */

/* O JavaScript aplica transforms dinamicamente para movimento real */
/* Estas animações são para saída do sacador */

.serve-area .server-card.serving-out {
  animation: serve-out 0.5s ease-out;
}

@keyframes serve-out {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.serve-area-right .server-card.serving-out {
  animation: serve-out-right 0.5s ease-out;
}

@keyframes serve-out-right {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Indicador de capitão (C) */
.zone .captain-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--green);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 2px;
  line-height: 1;
}

/* Quadra direita - cards invertidos */
.court-right .zone {
  flex-direction: column-reverse;
}

.court-right .zone .zname {
  margin-bottom: 0;
  margin-top: 3px;
}

/* ============================================ */
/* ÁREA DE SAQUE                                */
/* ============================================ */

.serve-area {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  width: 70px;
  padding: 10px 5px;
}

.serve-area-left { padding-right: 8px; }
.serve-area-right { padding-left: 8px; }

.serve-area .server-card {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 6px;
}

.serve-area .server-card.active {
  display: flex;
}

.serve-area .server-name {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

.serve-area .server-number {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--serving-red);
  border-radius: 5px;
  width: 45px;
  height: 55px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: servepulse 1s infinite;
}

@keyframes servepulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211,47,47,0.4), 2px 2px 4px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 12px 4px rgba(211,47,47,0.4), 2px 2px 4px rgba(0,0,0,0.3); }
}

.serve-area-right .server-card {
  flex-direction: column-reverse;
}

.serve-area-right .server-name {
  margin-bottom: 0;
  margin-top: 3px;
}

/* ============================================ */
/* REDE                                         */
/* ============================================ */

.net {
  width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0;
  background-color: var(--court);  
  border-top: 3px solid #fff;
  border-bottom: 3px solid #fff;
}

.net-post {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  z-index: 2;
  flex-shrink: 0;
}

.net-cable {
  flex: 1;
  width: 3px;
  background: #fff;
}

/* ============================================ */
/* INFO BAR                                     */
/* ============================================ */

.info-bar {
  display: flex;
  gap: 10px;
  min-height: 28px;
}

.subs {
  flex: 1;
  font-size: 11px;
  color: var(--yellow);
  padding: 5px 10px;
  background: var(--card);
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.no-subs {
  color: var(--muted);
  font-size: 10px;
}

.sub-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,193,7,0.15);
  padding: 3px 8px;
  border-radius: 3px;
  animation: subHighlight 0.5s ease;
}

.sub-item .sub-team {
  font-weight: 600;
  color: var(--txt);
}

.sub-item .sub-out {
  color: var(--red);
}

.sub-item .sub-in {
  color: var(--green);
}

.sub-item .sub-arrow {
  color: var(--muted);
}

@keyframes subHighlight {
  0% { transform: scale(1.05); background: rgba(255,193,7,0.4); }
  100% { transform: scale(1); background: rgba(255,193,7,0.15); }
}

/* ============================================ */
/* STATS PANEL                                  */
/* ============================================ */

.stats-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 850px;
  max-height: 80vh;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 900;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--hover);
  border-bottom: 1px solid var(--border);
}

.stats-header h3 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-header h3 svg {
  width: 18px;
  height: 18px;
}

.btn-close-stats {
  background: transparent;
  border: none;
  color: var(--txt2);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.btn-close-stats:hover { color: var(--red); }
.btn-close-stats svg { width: 20px; height: 20px; }

.stats-content {
  display: flex;
  gap: 20px;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.stats-team {
  flex: 1;
}

.stats-team h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--red);
}

.team-stats {
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--hover);
  border-radius: 4px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
}

.stat-row span:first-child { color: var(--txt2); }
.stat-row span:last-child { font-weight: 600; }

.player-stats-table {
  overflow-x: auto;
}

.player-stats-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.player-stats-table th,
.player-stats-table td {
  padding: 5px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.player-stats-table th {
  background: var(--hover);
  font-weight: 600;
  color: var(--txt2);
}

.player-stats-table tr:hover { background: var(--hover); }
.player-stats-table tr.libero { background: rgba(255,193,7,0.1); }

/* ============================================ */
/* STANDINGS                                    */
/* ============================================ */

.standings {
  display: flex;
  gap: 12px;
  padding: 5px 10px;
  background: var(--card);
  border-radius: 4px;
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 9px;
}

.st-group {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.st-name {
  font-weight: 700;
  color: var(--muted);
}

.st-item { color: var(--txt2); }
.st-item.hl { color: var(--red); font-weight: 600; }

/* ============================================ */
/* SCROLLBAR                                    */
/* ============================================ */

.players::-webkit-scrollbar,
.stats-content::-webkit-scrollbar {
  width: 4px;
}

.players::-webkit-scrollbar-track,
.stats-content::-webkit-scrollbar-track {
  background: var(--bg);
}

.players::-webkit-scrollbar-thumb,
.stats-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ============================================ */
/* ANIMATIONS                                   */
/* ============================================ */

.value-changed {
  animation: flash 0.3s ease;
}

@keyframes flash {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); color: var(--yellow); }
  100% { transform: scale(1); }
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */

@media (max-width: 1024px) {
  .panel { width: 120px; min-width: 110px; }
  .court { width: 200px; min-width: 170px; }
  .zone .zn { width: 40px; height: 48px; font-size: 20px; }
}

@media (max-width: 768px) {
  .stats-content { flex-direction: column; }
}
