.vb-root {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  color: #0f172a;
  box-sizing: border-box;
  user-select: none;
  touch-action: manipulation;
}

.theme-dark .vb-root {
  color: #f8fafc;
}

.vb-card-shell {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.theme-dark .vb-card-shell {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.vb-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.75rem;
}

.theme-dark .vb-top-toolbar {
  border-bottom-color: #1e293b;
}

.vb-format-control {
  display: flex;
  background: #f1f5f9;
  border-radius: 0.5rem;
  padding: 0.2rem;
  gap: 0.2rem;
}

.theme-dark .vb-format-control {
  background: #1e293b;
}

.vb-btn-chip {
  border: none;
  background: transparent;
  padding: 0.35rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.theme-dark .vb-btn-chip {
  color: #94a3b8;
}

.vb-btn-chip.vb-active {
  background: #fff;
  color: #0284c7;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.theme-dark .vb-btn-chip.vb-active {
  background: #0284c7;
  color: #fff;
}

.vb-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.vb-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.theme-dark .vb-action-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.vb-action-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.theme-dark .vb-action-btn:hover {
  background: #334155;
  color: #f8fafc;
}

.vb-set-tracker-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.5rem;
  background: #f8fafc;
  border-radius: 0.75rem;
}

.theme-dark .vb-set-tracker-bar {
  background: #1e293b;
}

.vb-set-pill {
  padding: 0.3rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.theme-dark .vb-set-pill {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

.vb-set-pill.vb-active-set {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

.vb-status-banner {
  display: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: vb-pulse-glow 1.5s infinite alternate;
}

.vb-status-banner.vb-visible {
  display: block;
}

.vb-status-setpoint {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #fff;
}

.vb-status-matchpoint {
  background: linear-gradient(90deg, #ef4444, #dc2626);
  color: #fff;
}

.vb-status-winner {
  background: linear-gradient(90deg, #10b981, #059669);
  color: #fff;
  font-size: 0.95rem;
  padding: 0.65rem;
}

@keyframes vb-pulse-glow {
  0% {
    transform: scale(0.99);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
  }
  100% {
    transform: scale(1.01);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.7);
  }
}

.vb-arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 720px) {
  .vb-arena-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.vb-team-card {
  border-radius: 1rem;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  border: 2px solid transparent;
}

.vb-team-a {
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
  border-color: #fde68a;
}

.theme-dark .vb-team-a {
  background: linear-gradient(145deg, #2a1f0a, #1f1605);
  border-color: #78350f;
}

.vb-team-b {
  background: linear-gradient(145deg, #f0f9ff, #e0f2fe);
  border-color: #bae6fd;
}

.theme-dark .vb-team-b {
  background: linear-gradient(145deg, #082f49, #0c2033);
  border-color: #0369a1;
}

.vb-team-card.vb-is-serving {
  border-color: #0284c7;
  box-shadow: 0 0 18px rgba(2, 132, 199, 0.25);
}

.vb-team-a.vb-is-serving {
  border-color: #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}

.vb-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.vb-team-name-input {
  font-size: 1.15rem;
  font-weight: 800;
  border: none;
  background: transparent;
  color: #0f172a;
  outline: none;
  border-bottom: 2px solid transparent;
  padding: 0.2rem 0;
  transition: border-color 0.15s ease-in-out;
  width: 100%;
  max-width: 200px;
}

.theme-dark .vb-team-name-input {
  color: #f8fafc;
}

.vb-team-name-input:focus {
  border-bottom-color: currentcolor;
}

.vb-serve-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #64748b;
  opacity: 0.4;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}

.theme-dark .vb-serve-indicator {
  background: #334155;
  color: #94a3b8;
}

.vb-is-serving .vb-serve-indicator {
  opacity: 1;
  background: #0284c7;
  color: #fff;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
  animation: vb-serve-bounce 1s infinite alternate ease-in-out;
}

.vb-team-a.vb-is-serving .vb-serve-indicator {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

@keyframes vb-serve-bounce {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-2px);
  }
}

.vb-score-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.vb-big-digit {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.1s ease-out;
}

.vb-team-a .vb-big-digit {
  color: #b45309;
}

.theme-dark .vb-team-a .vb-big-digit {
  color: #fcd34d;
}

.vb-team-b .vb-big-digit {
  color: #0369a1;
}

.theme-dark .vb-team-b .vb-big-digit {
  color: #7dd3fc;
}

.vb-big-digit:active {
  transform: scale(0.95);
}

.vb-point-btn {
  border: none;
  background: #0f172a;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease-out;
}

.vb-team-a .vb-point-btn {
  background: #d97706;
}

.vb-team-a .vb-point-btn:hover {
  background: #b45309;
}

.vb-team-b .vb-point-btn {
  background: #0284c7;
}

.vb-team-b .vb-point-btn:hover {
  background: #0369a1;
}

.vb-point-btn:active {
  transform: scale(0.9);
}

.vb-sets-won-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.vb-set-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.2s ease-in-out;
}

.theme-dark .vb-set-dot {
  background: #334155;
}

.vb-team-a .vb-set-dot.vb-dot-won {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.vb-team-b .vb-set-dot.vb-dot-won {
  background: #0284c7;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.6);
}

.vb-team-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

.theme-dark .vb-team-meta-row {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.vb-meta-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.vb-micro-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 0.375rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  color: #334155;
  transition: all 0.15s ease-in-out;
}

.theme-dark .vb-micro-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.vb-micro-btn:hover:not(:disabled) {
  border-color: #0284c7;
  color: #0284c7;
}

.vb-micro-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.vb-tactical-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
}

.theme-dark .vb-tactical-section {
  background: #020617;
  border-color: #1e293b;
}

.vb-tactical-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.vb-tactical-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0284c7;
}

.theme-dark .vb-tactical-title {
  color: #38bdf8;
}

.vb-court-canvas-wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  aspect-ratio: 2 / 1;
  background: #0284c7;
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.theme-dark .vb-court-canvas-wrap {
  background: #0369a1;
}

.vb-court-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.vb-player-node {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.vb-player-circle {
  fill: #fff;
  stroke: #0f172a;
  stroke-width: 2.5;
  transition: all 0.2s ease-in-out;
}

.vb-player-node.vb-is-server .vb-player-circle {
  fill: #f59e0b;
  stroke: #fff;
  stroke-width: 3.5;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8));
}

.vb-player-text {
  font-size: 13px;
  font-weight: 800;
  fill: #0f172a;
  text-anchor: middle;
  dominant-baseline: central;
}

.vb-player-node.vb-is-server .vb-player-text {
  fill: #fff;
}

.vb-pos-tag {
  font-size: 9px;
  font-weight: 800;
  fill: #fff;
  text-anchor: middle;
}

.vb-timeout-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.vb-timeout-modal.vb-active {
  display: flex;
}

.vb-timeout-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  max-width: 320px;
  width: 85%;
}

.theme-dark .vb-timeout-card {
  background: #0f172a;
}

.vb-timeout-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.theme-dark .vb-timeout-title {
  color: #f8fafc;
}

.vb-timeout-countdown {
  font-size: 3.5rem;
  font-weight: 900;
  color: #ef4444;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
