/* Umpiring Interface - Original Layout with Light Theme */

/* Main scoreboard layout */
.scoreboard-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  margin-bottom: 40px;
  align-items: start;
}

.participant-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.participant-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #495057;
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.participant-score {
  font-size: 4rem;
  font-weight: bold;
  color: #212529;
  text-align: center;
  background: #ffffff;
  border: 2px solid #dee2e6;
  padding: 30px;
  border-radius: 12px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-buttons button {
  padding: 18px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
}

.btn-fault {
  background: #d4a017;
  color: #212529;
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-fault:hover {
  background: #c19616;
  border-color: rgba(0, 0, 0, 0.25);
}

.fault-indicator {
  font-size: 1.5rem;
  margin-right: 8px;
}

.btn-ace {
  background: #218838;
  color: white;
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-ace:hover {
  background: #1e7e34;
  border-color: rgba(0, 0, 0, 0.25);
}

.btn-winner {
  background: #0056b3;
  color: white;
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-winner:hover {
  background: #004085;
  border-color: rgba(0, 0, 0, 0.25);
}

.btn-forced-error {
  background: #a02630;
  color: white;
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-forced-error:hover {
  background: #8b2029;
  border-color: rgba(0, 0, 0, 0.25);
}

.btn-unforced-error {
  background: #5a6268;
  color: white;
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-unforced-error:hover {
  background: #495057;
  border-color: rgba(0, 0, 0, 0.25);
}

.center-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 300px;
}

.set-scores {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.set-score {
  text-align: center;
  color: #495057;
}

.set-number {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 8px;
}

.scores {
  display: flex;
  flex-direction: row;
  gap: 10px;
  font-size: 2rem;
  font-weight: bold;
}

.p1-score, .p2-score {
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.p1-score.winner, .p2-score.winner {
  background: #d4edda;
  border: 2px solid #28a745;
  color: #155724;
}

.current-game-score {
  background: #ffffff;
  border: 1px solid #dee2e6;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-score-display {
  font-size: 3rem;
  font-weight: bold;
  color: #212529;
  margin-bottom: 15px;
}

.server-indicator {
  font-size: 1.2rem;
  color: #ffc107;
  font-weight: bold;
}

.serving {
  display: inline-block;
  animation: pulse 2s infinite;
}

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

.control-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-control {
  padding: 15px 25px;
  font-size: 1.5rem;
  background: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  color: #495057;
  font-weight: 600;
}

.btn-control:hover {
  background: #dee2e6;
  border-color: #adb5bd;
}

.btn-switch {
  background: #cfe2ff;
  border-color: #9ec5fe;
  color: #084298;
}

.btn-switch:hover {
  background: #b8d4f1;
  border-color: #7aa2f0;
}

.btn-undo {
  background: #f5c2c7;
  border-color: #f1aeb5;
  color: #842029;
}

.btn-undo:hover {
  background: #f1b0b7;
  border-color: #e29e9c;
}

.btn-swap-positions {
  background: #ffe8cc;
  border-color: #ffdb99;
  color: #b7490f;
}

.btn-swap-positions:hover {
  background: #ffd8a8;
  border-color: #ffcd75;
}


/* Court Change Modal */
.court-change-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.court-change-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.court-change-modal-content {
  position: relative;
  background: #f8f9fa;
  color: #212529;
  padding: 40px 50px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  text-align: center;
  max-width: 600px;
  animation: scaleIn 0.4s ease-out;
  border: 2px solid #dee2e6;
}

.court-change-modal-content h3 {
  margin: 0 0 20px 0;
  font-size: 2.2rem;
  color: #495057;
  font-weight: 600;
}

.court-change-note {
  font-size: 1.2rem;
  margin: 0 0 25px 0;
  color: #6c757d;
  line-height: 1.5;
}

.court-change-note.side-change {
  color: #28a745;
  font-weight: 600;
}

.set-score-display {
  font-size: 2rem;
  margin: 20px 0;
  font-weight: 600;
  color: #495057;
}

.btn-dismiss-court-change {
  background: #495057;
  color: white;
  border: none;
  padding: 12px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.btn-dismiss-court-change:hover {
  background: #343a40;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-dismiss-court-change:active {
  transform: translateY(0);
}

/* Enhanced Countdown Timer */
.timer-display {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.timer-display .countdown-circle {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.timer-display .countdown-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-display .countdown-circle .background {
  fill: none;
  stroke: #e9ecef;
  stroke-width: 8;
}

.timer-display .countdown-circle .progress {
  fill: none;
  stroke: #007bff;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.timer-display .countdown-circle .text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: 700;
  color: #212529;
  font-variant-numeric: tabular-nums;
}

.timer-display .countdown-circle.warning .progress {
  stroke: #ffc107;
}

.timer-display .countdown-circle.urgent .progress {
  stroke: #dc3545;
}

.timer-display .countdown-circle.warning .text,
.timer-display .countdown-circle.urgent .text {
  color: #212529;
}

.timer-display .countdown-label {
  text-align: center;
  margin-top: 12px;
  font-size: 1rem;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Fallback for non-circular display */
.timer-display .countdown-number {
  font-size: 3rem;
  font-weight: bold;
  color: #212529;
  margin: 20px 0;
  font-variant-numeric: tabular-nums;
  position: relative;
  display: inline-block;
  min-width: 100px;
  text-align: center;
}

.timer-display .countdown-number.warning {
  color: #ffc107;
}

.timer-display .countdown-number.urgent {
  color: #dc3545;
}

.timer-display .countdown-number::after {
  content: 's';
  font-size: 1.5rem;
  margin-left: 4px;
  opacity: 0.7;
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}



@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Match Completion Banner */
.match-completed-banner {
  background: #f8f9fa;
  color: #212529;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.5s ease-out;
  border: 2px solid #e9ecef;
}

.match-completed-content {
  text-align: center;
}

.match-completed-content h2 {
  margin: 0 0 15px 0;
  font-size: 2.2rem;
  color: #495057;
  font-weight: 600;
}

.winner-announcement {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: #343a40;
}

.winner-announcement strong {
  font-size: 1.9rem;
  color: #212529;
  font-weight: 700;
}

.final-score {
  display: flex;
  gap: 15px;
  justify-content: center;
  font-size: 1.5rem;
  margin-top: 10px;
}

.set-score-final {
  background: #e9ecef;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  color: #495057;
}

/* Match Finished State */
.scoreboard-section.match-finished {
  opacity: 0.7;
}

.scoreboard-section.match-finished .action-buttons {
  pointer-events: none;
}

.scoreboard-section.match-finished .participant-score {
  pointer-events: none;
}

.match-completed-message {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #28a745;
  padding: 15px;
  background: #d4edda;
  border: 2px solid #28a745;
  border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .scoreboard-section {
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
  }
  
  .center-scoreboard {
    min-width: 200px;
  }
  
  .participant-name {
    font-size: 1rem;
    padding: 10px;
  }
  
  .participant-score {
    font-size: 2.5rem;
    min-height: 80px;
    padding: 20px;
  }
  
  .action-buttons {
    gap: 8px;
  }
  
  .action-buttons button {
    padding: 12px 16px;
    font-size: 0.85rem;
  }
  
  .game-score-display {
    font-size: 2rem;
  }
  
  .set-scores {
    padding: 15px;
    gap: 10px;
  }
  
  .scores {
    font-size: 1.5rem;
  }
  
  .current-game-score {
    padding: 20px;
  }
  
  .control-buttons {
    gap: 8px;
  }
  
  .btn-control {
    padding: 12px 20px;
    font-size: 1.2rem;
  }
  
  .match-completed-content h2 {
    font-size: 1.8rem;
  }
  
  .winner-announcement {
    font-size: 1.4rem;
  }
  
  .winner-announcement strong {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .scoreboard-section {
    gap: 10px;
  }
  
  .center-scoreboard {
    min-width: 150px;
  }
  
  .participant-name {
    font-size: 0.9rem;
    padding: 8px;
  }
  
  .participant-score {
    font-size: 2rem;
    min-height: 60px;
    padding: 15px;
  }
  
  .action-buttons button {
    padding: 10px 12px;
    font-size: 0.75rem;
  }
  
  .game-score-display {
    font-size: 1.5rem;
  }
  
  .set-scores {
    padding: 10px;
    gap: 8px;
  }
  
  .set-number {
    font-size: 0.75rem;
  }
  
  .scores {
    font-size: 1.2rem;
  }
  
  .current-game-score {
    padding: 15px;
  }
  
  .server-indicator {
    font-size: 1rem;
  }
  
  .btn-control {
    padding: 10px 15px;
    font-size: 1rem;
  }
  
  .match-completed-content h2 {
    font-size: 1.5rem;
  }
  
  .winner-announcement {
    font-size: 1.2rem;
  }
  
  .winner-announcement strong {
    font-size: 1.4rem;
  }
}


/* Point History Table */
.table-responsive {
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.table-responsive table {
  margin-bottom: 0;
}

.table thead.sticky-top {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table thead.sticky-top th {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
}

.table-sm td, .table-sm th {
  padding: 0.5rem;
  vertical-align: middle;
}

/* Visual Progress Bars */
.stat-bar-container {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.percentage-display {
  width: 100%;
}

.percentage-display .progress {
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: #e9ecef;
}

.percentage-display .progress-bar {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.6s ease;
}

.percentage-display .progress-bar strong {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Chart containers */
.card canvas {
  max-width: 100%;
  height: auto;
}

/* Modern chart card styling */
.statistics-charts-controller .card {
  border: none;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  background: #ffffff;
}

.statistics-charts-controller .card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.statistics-charts-controller .card-body {
  padding: 1.5rem;
}

/* Enhanced card headers */
.statistics-charts-controller .card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 1rem 1.5rem;
}

.statistics-charts-controller .card-header h4 {
  color: white;
  margin: 0;
  font-weight: 600;
}

/* Head-to-Head Comparison Bars */
.comparison-bars-container {
  padding: 1.5rem;
}

.comparison-bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.comparison-bar-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.comparison-left-value,
.comparison-right-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
}

.comparison-left-value {
  text-align: right;
  padding-right: 0.5rem;
}

.comparison-right-value {
  text-align: left;
  padding-left: 0.5rem;
}

.comparison-bar-wrapper {
  position: relative;
}

.comparison-bar-track {
  height: 32px;
  background: transparent;
  border-radius: 16px;
  position: relative;
  display: flex;
  overflow: visible;
}

.comparison-bar-fill {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  top: 0;
}

.comparison-bar-fill.left {
  background: linear-gradient(90deg, #86a8b5 0%, #a8c5d1 100%);
  border-radius: 16px 0 0 16px;
  right: 50%;
}

.comparison-bar-fill.right {
  background: linear-gradient(90deg, #e8b4b8 0%, #d89ba0 100%);
  border-radius: 0 16px 16px 0;
  left: 50%;
}

.comparison-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  z-index: 1;
}

/* Responsive comparison bars */
@media (max-width: 768px) {
  .comparison-bars-container {
    padding: 1rem 0.5rem;
  }
  
  .comparison-bar-row {
    grid-template-columns: 60px 1fr 60px;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  
  .comparison-left-value,
  .comparison-right-value {
    font-size: 0.8rem;
    font-weight: 700;
    word-break: break-word;
    line-height: 1.2;
  }
  
  .comparison-label {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: normal;
    line-height: 1.3;
  }
  
  .comparison-bar-track {
    height: 48px;
  }
}

@media (max-width: 576px) {
  .comparison-bar-row {
    grid-template-columns: 55px 1fr 55px;
    gap: 0.4rem;
  }
  
  .comparison-bar-track {
    height: 44px;
  }
  
  .comparison-left-value,
  .comparison-right-value {
    font-size: 0.75rem;
  }
  
  .comparison-label {
    font-size: 0.7rem;
  }
  .comparison-bar-track {
    height: 24px;
  }
}


