body {
background-color: black;
color: white;
font-family: Arial, sans-serif;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
height: 100vh;
padding: 0.5em 0;
overflow: hidden;
}

/* White flash animation for scoring */
@keyframes whiteFlash {
  0% { background-color: black; }
  8% { background-color: white; }
  12% { background-color: black; }
  16% { background-color: white; }
  20% { background-color: black; }
  24% { background-color: white; }
  28% { background-color: black; }
  100% { background-color: black; }
}

.flash-effect {
  animation: whiteFlash 0.3s ease-in-out;
}

/* Control Panel Body */
.control-panel-body {
  background-color: #f0f0f0;
  flex-direction: column;
justify-content: flex-start;
height: 100vh;
  padding: 0;
}

/* Viewer Window */
#viewer-window {
  position: absolute;
  top: 20px;
  right: 20px;
  width: calc(50% - 30px);
  height: calc(50vh - 30px);
  background-color: black;
  overflow: hidden;
  border: 5px solid #333;
  border-radius: 10px;
  box-sizing: border-box;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Control Panel Modal - 85% size and no scrolling */
.control-panel-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden; /* Disable scrolling within modal */
}

.control-panel-modal.show {
  opacity: 1;
  visibility: visible;
}

.control-panel-modal-content {
  background: white;
  padding: 34px; /* 85% of 40px */
  border-radius: 17px; /* 85% of 20px */
  text-align: center;
  max-width: 80%;
  box-shadow: 0 17px 34px rgba(0, 0, 0, 0.3); /* 85% of 20px 40px */
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.control-panel-modal.show .control-panel-modal-content {
  transform: scale(1);
}

.control-panel-modal-title {
  font-size: 40.8px; /* 85% of 48px */
  font-weight: bold;
  margin-bottom: 25.5px; /* 85% of 30px */
  color: #333;
}

.control-panel-modal-flags {
  display: flex;
  justify-content: center;
  gap: 17px; /* 85% of 20px */
  margin-bottom: 25.5px; /* 85% of 30px */
  flex-wrap: wrap;
}

.control-panel-modal-flag {
  font-size: 51px; /* 85% of 60px */
  filter: drop-shadow(0 3.4px 6.8px rgba(0, 0, 0, 0.3)); /* 85% of 4px 8px */
  text-shadow: 0 1.7px 3.4px rgba(0, 0, 0, 0.5); /* 85% of 2px 4px */
}

.control-panel-modal-judges {
  font-size: 20.4px; /* 85% of 24px */
  color: #666;
  font-weight: 500;
}

#viewer-content {
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  position: relative;
  overflow: hidden;
}

/* Override fixed positioning for control panel viewer */
.control-panel-body #timer-section {
  position: absolute !important;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.control-panel-body #country-flags {
  position: absolute !important;
  top: 0.5em;
  left: 0;
  right: 0;
  z-index: 20;
  justify-content: space-between !important;
}

.control-panel-body #warning-rectangles {
  position: absolute !important;
  top: calc(70% + 80px);
  left: 0;
  right: 0;
  z-index: 5;
}

.control-panel-body #main-content {
  position: absolute !important;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Swap red and blue positions in viewfinder */
.control-panel-body .left-flag {
  order: 2 !important;
}

.control-panel-body .right-flag {
  order: 1 !important;
}

.control-panel-body #overall-score {
  flex-direction: row-reverse !important;
}

.control-panel-body .blue-warnings-side {
  order: 2 !important;
  justify-content: flex-end !important; /* Blue warnings go from outside to inside (right to left) */
  flex-direction: row-reverse !important;
}

.control-panel-body .red-warnings-side {
  order: 1 !important;
  justify-content: flex-end !important; /* Red warnings go from outside to inside (right to left) */
  flex-direction: row !important;
}

/* Move triangles to inside corners in viewfinder */
.control-panel-body .red-triangle {
  left: 0 !important;
  right: auto !important;
}

.control-panel-body .blue-triangle {
  right: 0 !important;
  left: auto !important;
}

/* Left Side Draw Controls Area */
#upper-control-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  width: calc(50% - 30px);
  height: calc(100vh - 40px);
  background-color: #d3d3d3;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 100;
  box-sizing: border-box;
}

#upper-control-panel h2 {
  color: #333;
  text-align: center;
  margin: 0 0 15px 0;
  font-size: 1.2em;
}

#upper-control-buttons {
  display: flex;
  flex-direction: row;
  gap: 15px;
  height: 100%;
}

.quick-timer-group, .quick-score-group {
  background-color: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.quick-timer-group h3, .quick-score-group h3 {
  color: #333;
  margin: 0 0 8px 0;
  font-size: 0.9em;
  text-align: center;
}

.quick-timer-group button {
  padding: 8px 16px;
  margin: 2px;
  border: none;
  border-radius: 4px;
  background-color: #2196F3;
  color: white;
  cursor: pointer;
  font-size: 0.8em;
  transition: background-color 0.3s ease;
}

.quick-timer-group button:hover {
  background-color: #1976D2;
}

.quick-score-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-score-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-score-control label {
  color: #333;
  font-weight: bold;
  font-size: 0.8em;
  min-width: 30px;
}

.quick-score-btn {
  padding: 6px 12px;
  margin: 2px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  transition: background-color 0.3s ease;
  min-width: 40px;
}

.quick-score-btn[data-color="blue"] {
  background-color: #2196F3;
  color: white;
}

.quick-score-btn[data-color="blue"]:hover {
  background-color: #1976D2;
}

.quick-score-btn[data-color="red"] {
  background-color: #f44336;
  color: white;
}

.quick-score-btn[data-color="red"]:hover {
  background-color: #d32f2f;
}

/* Control Panel Area - Bottom Right Quadrant */
#control-panel {
  position: absolute;
  top: calc(50vh + 10px);
  right: 20px;
  width: calc(50% - 30px);
  height: calc(50vh - 30px);
  background-color: #d3d3d3;
  padding: 10px 20px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  box-sizing: border-box;
  overflow: hidden;
}

#control-panel h2 {
  color: #333;
  text-align: center;
  margin: 0 0 10px 0;
  font-size: 1.5em;
}

#control-buttons {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  height: calc(100% - 40px);
  width: 100%;
  position: relative;
}

.control-group {
  background-color: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  min-width: 150px;
  max-width: 180px;
}

/* Athletes Group - Now in Draw Controls */
.athletes-group {
  flex: 0 0 auto;
  width: 200px;
  position: absolute;
  left: 10%;
  top: 10%;
}

/* Timer Group - 25% */
.timer-group {
  flex: 0 0 auto;
  max-width: 150px;
  position: absolute;
  left: 25%;
  top: 5%;
  transform: translateX(-50%);
}

.control-group h3 {
  color: #333;
  margin: 0 0 8px 0;
  font-size: 1em;
  text-align: center;
}

.control-group button {
  background-color: #4CAF50;
  color: white;
  padding: 6px 12px;
  margin: 3px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  transition: background-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.control-group button:hover {
  background-color: #45a049;
}

.warning-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  background-color: transparent;
  min-width: 120px;
}

.warning-controls h4 {
  color: #333;
  font-size: 0.8em;
  margin: 5px 0;
  text-align: center;
}

.warning-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.warning-control .warning-btn-row {
  display: flex;
  gap: 2px;
}

.warning-control label {
  color: #333;
  font-weight: bold;
  font-size: 0.7em;
  text-align: center;
}

.warning-control button {
  padding: 3px 9px;
  font-size: 0.9em;
  margin: 1.5px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 45px;
  background-color: #808080;
  color: white;
}

.warning-control button:hover {
  background-color: #696969;
}

/* Warning button colors removed - using default styling */


.athlete-input {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.athlete-input label {
  color: #333;
  font-weight: bold;
  font-size: 0.8em;
}

.athlete-input input {
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 0.8em;
  width: 100%;
  box-sizing: border-box;
}

.athlete-confirm {
  text-align: center;
  margin-top: 10px;
}

.confirm-btn {
  padding: 8px 16px;
  font-size: 0.8em;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #28a745;
  color: white;
  min-width: 120px;
}

.confirm-btn:hover {
  background-color: #218838;
  transform: scale(1.05);
}

.confirm-btn:active {
  transform: scale(0.95);
}

/* Division Controls Styling - Right side of Draw Controls */
#division-control-area {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  border: 2px solid #e9ecef;
  width: 45%;
  height: 220px;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 80px;
  right: 20px;
}

#division-control-area h3 {
  color: #495057;
  margin: 0 0 8px 0;
  font-size: 0.9em;
  font-weight: bold;
  text-align: center;
  background-color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border: 1px solid #dee2e6;
}

.division-control-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}

.division-labels-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
}

.division-label-left, .division-label-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  position: relative;
  height: 100%;
}

.division-label-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  position: relative;
  height: 100%;
}

.division-label-text {
  font-weight: bold;
  font-size: 0.9em;
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  color: #495057;
}

.division-input {
  padding: 6px 10px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  background-color: #ffffff;
  font-size: 0.8em;
  color: #495057;
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  transition: border-color 0.2s ease;
}

.division-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.division-input::placeholder {
  color: #adb5bd;
  font-style: italic;
}

.division-separator {
  width: 2px;
  height: 120px;
  background-color: #dee2e6;
  margin: 0 10px;
  border-radius: 1px;
}

.division-confirm-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.division-confirm-btn:hover {
  background-color: #138496;
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
}

.division-confirm-btn:active {
  transform: translateX(-50%) translateY(0);
  box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

/* Score Controls */
.score-group {
  flex: 0 0 auto; /* Don't take up remaining space */
  background-color: white !important;
  border-radius: 8px;
  padding: 10px;
  box-sizing: border-box;
  min-height: fit-content;
  height: auto;
  overflow: visible;
  width: 400px; /* Fixed width for scores section */
  max-width: none;
  position: absolute;
  left: 75%;
  top: 5%;
  transform: translateX(-50%);
  max-height: calc(100% - 20px);
}

.score-controls-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}

.left-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}

.score-controls {
  display: flex;
  flex-direction: row;
  gap: 15px;
  flex: 0 0 auto;
}

.score-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.score-control label {
  color: #333;
  font-weight: bold;
  font-size: 0.8em;
}

.score-btn {
  padding: 6px 10px;
  font-size: 0.6em;
  margin: 1px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 50px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-control .score-btn-row {
  display: flex;
  gap: 2px;
}

/* Senchu Controls */
.senchu-controls {
  text-align: center;
  background-color: transparent;
  width: 100%;
}

.senchu-controls h4 {
  color: #333;
  font-size: 0.8em;
  margin: 5px 0;
}

.senchu-btn-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}

.senchu-btn-row button {
  padding: 4.5px 12px;
  font-size: 0.9em;
  border: none;
  border-radius: 4.5px;
  cursor: pointer;
  background-color: #4CAF50;
  color: white;
  transition: background-color 0.3s ease;
  width: 100%;
  max-width: 150px;
}

.senchu-btn-row button:hover {
  background-color: #45a049;
}

/* Reset Controls - Bottom Right Quadrant */
.reset-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: transparent;
}

.reset-btn {
  padding: 6px 12px;
  font-size: 0.7em;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #dc3545;
  color: white;
  min-width: 80px;
}

.reset-btn:hover {
  background-color: #c82333;
  transform: scale(1.05);
}

.reset-btn:active {
  transform: scale(0.95);
}

.score-btn[data-color="blue"] {
  background-color: #2196F3;
  color: white;
}

.score-btn[data-color="blue"]:hover {
  background-color: #1976D2;
}

.score-btn[data-color="red"] {
  background-color: #f44336;
  color: white;
}

.score-btn[data-color="red"]:hover {
  background-color: #d32f2f;
}

/* Special styling for kick and sweep buttons */
.kick-btn, .sweep-btn {
  flex-direction: column;
  position: relative;
  overflow: hidden;
}


/* Button Click Animation */
@keyframes buttonDepress {
  0% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(0.95);
  }
  100% { 
    transform: scale(1);
  }
}

.button-clicked {
  animation: buttonDepress 0.15s ease-in-out;
}

.btn-text {
  font-size: 0.8em;
  font-weight: bold;
  line-height: 1;
}

.btn-subtext {
  font-size: 0.6em;
  font-weight: bold;
  line-height: 1;
  margin-top: 3px;
  opacity: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Country Flags */
#country-flags {
position: fixed;
top: 0.5em;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
z-index: 20;
padding: 0 2em;
}

.flag-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
width: 281px; /* Match flag width */
overflow: hidden; /* Prevent content from affecting other elements */
}

.left-flag {
align-items: center;
}

.right-flag {
align-items: center;
}

.country-code {
  font-size: 2.5em;
  font-weight: bold;
  color: white;
  text-align: center;
  margin: 0.5em 0 0.3em 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  position: relative;
  top: 0px;
}


.flag {
  width: 281px !important;
  height: 211px !important;
  min-width: 281px !important;
  min-height: 211px !important;
  max-width: 281px !important;
  max-height: 211px !important;
  margin: 0;
  padding: 0;
position: relative;
  display: block;
  z-index: 30;
  border: 2px solid #444444;
  box-sizing: border-box;
  flex-shrink: 0;
  flex-grow: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* Flag Styles - All flags use SVG images */
[class$="-flag"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#main-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
}

#timer-section {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 0.5em;
z-index: 25;
padding: 0.5em 0;
}

#timer {
font-size: 12em;
color: white;
margin-bottom: 0;
text-align: center;
text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

#timer-button-container {
position: fixed;
top: 6em;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 0.5em;
z-index: 25;
}

#timer-section button {
background-color: #333;
color: white;
border: none;
padding: 0.5em 1em;
border-radius: 5px;
cursor: pointer;
font-size: 1em;
}

#timer-section button:hover {
background-color: #555;
}

.last-name {
  position: relative;
  top: 0px;
  font-size: 2em;
font-weight: bold;
color: white;
text-align: center;
  z-index: 1000;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  margin: 0.3em 0 0 0;
  text-transform: uppercase; /* Force all caps display */
  max-width: 281px; /* Match flag width to prevent overflow */
  width: 281px; /* Fixed width to match flag */
  height: auto; /* Allow height to grow with content */
  min-height: 1.2em; /* Minimum height for single line */
  max-height: 3.6em; /* Maximum height for 3 lines (1.2em * 3) */
  line-height: 1.2; /* Tighter line height for wrapped text */
  overflow: hidden; /* Hide any text that exceeds max-height */
  word-wrap: normal; /* Only break at word boundaries */
  overflow-wrap: normal; /* Only break at word boundaries */
  white-space: normal; /* Allow normal wrapping at word boundaries */
  text-overflow: ellipsis; /* Add ... for truncated text */
  display: -webkit-box; /* Required for line clamping */
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical; /* Vertical orientation for line clamp */
}
#main-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
padding: 0;
}

#timer-section {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
z-index: 10;
padding: 0.5em 0;
}

#timer-button-container {
position: fixed;
top: 6em;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 0.5em;
z-index: 25;
}
#timer {
font-size: 12em;
/* font-weight: bold; */
color: white;
margin-bottom: 0;
line-height: 1;
}
#timer-section button {
background-color: lightgray;
color: black;
padding: 0.1em 0.8em;
font-size: 0.7em;
border: none;
border-radius: 3px;
cursor: pointer;
transition: background-color 0.3s ease;
/* margin-bottom: 0.1em; */
}
#timer-section button:hover {
background-color: gray;
}

/* Round Button Styles */
.round-button {
background-color: #2196F3;
color: white;
padding: 0.4em 1.5em;
font-size: 1.5em;
font-weight: bold;
border: none;
border-radius: 25px;
cursor: pointer;
transition: all 0.3s ease;
margin: 0.01em 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
min-width: 150px;
}

.round-button:hover {
background-color: #1976D2;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.round-button:active {
transform: translateY(0);
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


#overall-score {
display: flex; /* Aligns the elements horizontally */
align-items: flex-start; /* Align to top to stack small squares above large ones */
justify-content: center; /* Center the squares */
font-size: 8em;
width: 90%;
max-width: 1400px;
gap: 3em; /* Increased gap to spread squares further apart */
}
.score-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
}
.score-square {
display: flex;
align-items: center;
justify-content: center;
width: 300px;
height: 300px;
border-radius: 20px;
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
position: relative;
}
.small-square {
display: flex;
align-items: flex-end;
justify-content: center;
width: 105px;
height: 105px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
position: relative;
}
.blue-small-square {
background-color: rgb(103, 164, 255);
}
.red-small-square {
background-color: red;
}
.vr-banner {
  background-color: #cc6600; /* Dark orange */
  color: white;
  font-weight: bold;
  font-size: 0.1em; /* Even smaller font to ensure it fits within the banner */
  padding: 0;
  border-radius: 0 0 10px 10px; /* Rounded bottom corners */
  width: 100%;
  height: 20%; /* Take up exactly 20% of the small square height */
  text-align: center;
  position: absolute;
  bottom: 0;
  display: flex; /* Always visible when small square is visible */
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Ensure text doesn't overflow the banner */
  box-sizing: border-box; /* Include padding in the height calculation */
}

/* VR card color states */
.small-square.hidden {
  background-color: #000000 !important; /* Black background to blend with page */
}

.red-small-square.hidden {
  background-color: #000000 !important; /* Black background to blend with page */
}

.blue-small-square.hidden {
  background-color: #000000 !important; /* Black background to blend with page */
}

.small-square.hidden .vr-banner {
  background-color: #000000 !important; /* Black VR banner to blend with background */
  color: #000000 !important; /* Black text to make it invisible */
}
.blue-square {
background-color: rgb(103, 164, 255);
}
.red-square {
background-color: red;
}
.blue-square #overallBlue {
color: white;
font-weight: bold;
font-size: 1.875em;
}
.red-square #overallRed {
color: white;
font-weight: bold;
font-size: 1.875em;
}

/* Triangular Objects */
.triangle {
position: absolute;
width: 0;
height: 0;
  opacity: 0;
transition: opacity 0.3s ease;
}

.blue-triangle {
bottom: 0;
right: 0;
border-left: 112px solid transparent;
border-right: 0px solid transparent;
border-bottom: 112px solid #00FF00;
transform: none;
}

.red-triangle {
bottom: 0;
left: 0;
border-left: 0px solid transparent;
border-right: 112px solid transparent;
border-bottom: 112px solid #00FF00;
transform: none;
}

/* Warning Rectangles */
#warning-rectangles {
position: fixed;
top: calc(70% + 80px); /* Position at 65% + offset */
left: 0;
right: 0;
height: 40px;
display: flex;
justify-content: space-between;
align-items: flex-end;
z-index: 5;
pointer-events: none;
}

.warning-side {
display: flex;
flex-direction: row;
gap: 10px;
align-items: flex-end;
}

.blue-warnings-side {
justify-content: flex-start;
flex-direction: row;
}

.red-warnings-side {
justify-content: flex-end;
flex-direction: row-reverse;
}

.warning-rectangle {
width: 120px;
height: 30px;
background-color: yellow;
border: 2px solid #333;
border-radius: 12px;
opacity: 0;
transition: opacity 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
font-size: 1em;
font-weight: bold;
color: #333;
}


#warnings {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 1.2em;
margin-top: 0.5em;
}

.warning-title {
font-size: 1.2em;
font-weight: bold;
color: white;
text-align: center;
margin-bottom: 0.5em;
margin-top: 1em;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
border: 2px solid #808080;
border-radius: 8px;
padding: 8px 16px;
display: inline-block;
background-color: #808080;
}

/* Additional Labels */
.label-text {
  font-size: 1.2em;
  font-weight: bold;
  color: white;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  border: 2px solid #808080;
  border-radius: 8px;
  padding: 8px 16px;
  display: inline-block;
  background-color: #808080;
}

/* Draw Label - Positioned at 60% x and 60% y */
#draw-label {
  position: fixed;
  top: 87.5%;
  left: 85%;
  transform: translate(-50%, -50%);
  z-index: 15;
  pointer-events: none;
}

/* Control Panel specific positioning for draw label */
.control-panel-body #draw-label {
  position: absolute !important;
  top: 87.5%;
  left: 15%;
  transform: translate(-50%, -50%);
  z-index: 15;
}

/* Division Label - Positioned at 30% x and 30% y */
#division-label {
  position: fixed;
  top: 90%;
  left: 15%;
  transform: translate(-50%, -50%);
  z-index: 15;
  pointer-events: none;
}

/* Control Panel specific positioning for division label */
.control-panel-body #division-label {
  position: absolute !important;
  top: 90%;
  left: 85%;
  transform: translate(-50%, -50%);
  z-index: 15;
}

/* Ring Label - Positioned at 25% x and 25% y */
#ring-label {
  position: fixed;
  top: 85%;
  left: 15%;
  transform: translate(-50%, -50%);
  z-index: 15;
  pointer-events: none;
}

/* Control Panel specific positioning for ring label */
.control-panel-body #ring-label {
  position: absolute !important;
  top: 85%;
  left: 85%;
  transform: translate(-50%, -50%);
  z-index: 15;
}
.warning-container {
display: flex; /* Aligns the warning boxes horizontally */
align-items: center;
gap: 1em;
}
.warning-box {
display: flex;
align-items: center;
gap: 0.2em;
}
.warning-box p {
margin: 0;
font-weight: bold;
font-size: 0.6em;
}
.warning-increment, .warning-decrement {
padding: 0.2em 0.4em;
font-size: 0.5em;
border-radius: 3px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.warning-increment {
color: white;
background-color: rgb(103, 164, 255); /* Blue for the "Warning" button for blue side */
}
.warning-decrement {
color: white;
background-color: gray; /* Gray for the "-" button */
}
#redWarningsBox .warning-increment {
background-color: red; /* Red for the "Warning" button for red side */
}
#blueWarningsBox .warning-increment {
background-color: rgb(103, 164, 255);
}
#redWarningsBox .warning-increment:hover {
background-color: lightcoral;
}
#blueWarningsBox .warning-increment:hover {
background-color: lightskyblue;
}
.warning-increment:hover {
background-color: lightgray; /* Default hover for other warning buttons */
}
.warning-decrement:hover {
background-color: darkgray;
}
#blueWarnings {
font-size: 1em;
font-weight: bold;
color: rgb(103, 164, 255);
text-align: center;
}
#redWarnings {
font-size: 1em;
font-weight: bold;
color: red;
text-align: center;
}


#fouls {
display: flex; /* Aligns the foul boxes horizontally */
justify-content: center; /* Centers the content horizontally */
align-items: center; /* Centers the content vertically */
font-size: 1.0em;
margin-top: 0.5em;
margin-bottom: 3.0em;
}
.foul-container {
display: flex; /* Aligns the foul boxes horizontally */
align-items: center;
}
.foul-box {
display: flex;
align-items: center;
margin: 0 3em;
}
.foul-box p {
margin: 0;
font-weight: bold;
}
.foul-increment, .foul-decrement {
padding: 0.5em 1em;
font-size: 1.0em;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
margin: 0 0.5em;
}
.foul-increment {
color: white;
background-color: red; /* Red for the "Foul" button for red side */
}
.foul-decrement {
color: white;
background-color: gray; /* Gray for the "-" button */
}
#redFoulsBox .foul-increment {
background-color: red; /* Red for the "Foul" button for red side */
}
#blueFoulsBox .foul-increment {
background-color: rgb(103, 164, 255); /* Blue for the "Foul" button for blue side */
}
#redFoulsBox .foul-increment:hover {
background-color: lightcoral; /* Light red for the red button */
}
#blueFoulsBox .foul-increment:hover {
background-color: lightskyblue; /* Light blue for the blue button */
}
.foul-increment:hover {
background-color: lightgray; /* Default hover for other foul buttons */
}
.foul-decrement:hover {
background-color: darkgray;
}
#blueFouls {
font-size: 4em;
font-weight: bold;
color: rgb(103, 164, 255);
text-align: center;
padding-left: 0.2em;
}
#redFouls {
font-size: 4em;
font-weight: bold;
color: red;
text-align: center;
padding-right: 0.2em;
}


#scores {
display: flex;
flex-wrap: wrap;  /* Allow wrapping if the screen is too small */
gap: 30px;  /* Add spacing between each score block */
justify-content: center;  /* Center the scores on the page */
margin-top: 1.0em;
}
#scores div {
/* border: 1px solid #ccc; */
/* padding: 10px; */
/* border-radius: 5px; */
text-align: center;
/* background-color: #f9f9f9; */
width: 300px;  /* Adjust width for uniformity */
}
.corner-name {
font-weight: bold;
}
.corner-number {
margin-left: 1px;
}
.blue-text {
color: rgb(103, 164, 255); /* Set the text color to blue */
font-size: 2.0em;
}
.red-text {
color: red; /* Set the text color to red */
font-size: 2.0em;
}
  

#reset-section {
text-align: center; /* Center the reset section */
margin-top: 2em; /* Space above the reset button */
position: fixed;
top: 10em; /* Position below the timer buttons */
left: 50%;
transform: translateX(-50%);
z-index: 10;
}
#resetAll {
padding: 0.3em 0.6em; /* Adjust the padding for top/bottom and left/right */
font-size: 1.8em; /* Match the control panel font size */
font-weight: bold; /* Make the text bold */
background-color: lightgray; /* Set background color */
color: black; /* Set text color to white */
border: none; /* Remove default border */
border-radius: 3px; /* Round the corners */
cursor: pointer; /* Change cursor to pointer on hover */
transition: background-color 0.3s ease; /* Add hover effect */
}
#resetAll:hover {
background-color: gray; /* Darker red on hover */
}

#blueTriangleButton, #redTriangleButton {
padding: 0.3em 0.6em;
font-size: 0.6em;
font-weight: bold;
background-color: lightgray;
color: black;
border: none;
border-radius: 3px;
cursor: pointer;
transition: background-color 0.3s ease;
margin: 0 0.2em;
}

#blueTriangleButton:hover, #redTriangleButton:hover {
background-color: gray;
}

/* Injury Timer Overlay Styles */
#injury-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.7);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}

#injury-timer-section {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
background-color: rgba(34, 34, 34, 0.01);
padding: 2em;
border-radius: 10px;
border: 3px solid rgba(255, 255, 255, 0.01);
backdrop-filter: blur(5px);
}

#injury-timer-section h2 {
color: #ff6b6b;
font-size: 2em;
margin-bottom: 0.5em;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#injury-timer {
font-size: 7em;
color: #ff6b6b;
cursor: pointer;
margin-bottom: 0.5em;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#injury-timer-button-container {
display: flex;
gap: 1em;
}

#injury-timer-section button {
background-color: #ff6b6b;
color: white;
padding: 0.7em 2em;
font-size: 1.2em;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
font-weight: bold;
}

#injury-timer-section button:hover {
background-color: #ff5252;
}

#injury-close {
background-color: #666 !important;
}

#injury-close:hover {
background-color: #555 !important;
}

#injuryButton {
padding: 0.5em 1em;
font-size: 0.8em;
font-weight: bold;
background-color: #ff6b6b;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
margin-left: 0.5em;
}

#injuryButton:hover {
background-color: #ff5252;
}

/* Intermission Timer Overlay Styles */
#intermission-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.7);
z-index: 999;
display: flex;
align-items: center;
justify-content: center;
}

#intermission-timer-section {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
background-color: rgba(34, 34, 34, 0.01);
padding: 2em;
border-radius: 10px;
border: 3px solid rgba(255, 255, 255, 0.01);
backdrop-filter: blur(5px);
}

#intermission-timer-section h2 {
color: #595a01;
font-size: 2em;
margin-bottom: 0.5em;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#intermission-timer {
font-size: 7em;
color: #595a01;
cursor: pointer;
margin-bottom: 0.5em;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#intermission-timer-button-container {
display: flex;
gap: 1em;
}

#intermission-timer-section button {
background-color: #595a01;
color: white;
padding: 0.7em 2em;
font-size: 1.2em;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
font-weight: bold;
}

#intermission-timer-section button:hover {
background-color: #595a01;
}

#intermission-close {
background-color: #666 !important;
}

#intermission-close:hover {
background-color: #555 !important;
}

#timer-section #intermissionButton {
background-color: #595a01;
color: white;
padding: 0.15em 0.8em;
font-size: 1em;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}

#timer-section #intermissionButton:hover {
background-color: #595a01;
}

/* VR Modal Overlay Styles */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 25%; /* Start at 25% from left */
  top: 25%; /* Start at 25% from top */
  width: 50%; /* Take up 50% of width */
  height: 50%; /* Take up 50% of height */
  background-color: transparent;
  animation: fadeIn 0.3s ease;
}

/* Blur overlay for page background when modal is open */
.blur-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  z-index: 999;
  transition: opacity 0.3s ease;
}

.modal-overlay .modal-content {
  background-color: transparent;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  width: 100%;
  height: 100%;
  box-shadow: none;
  animation: none;
  display: flex;
  flex-direction: column;
}


.modal-overlay .modal-body {
  padding: 20px 20px 40px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;
}

.modal-overlay .modal-title {
  font-size: 4.5em;
  font-weight: bold;
  text-align: center;
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

.modal-overlay .number-bubble {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 270px;
  height: 270px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 9px 45px rgba(0, 0, 0, 0.3);
  border: 9px solid rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.modal-overlay .number-bubble span {
  font-size: 12em;
  font-weight: bold;
  color: #333;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
}

.modal-overlay .number-bubble.confirm {
  background-color: rgba(76, 175, 80, 0.3);
}

.modal-overlay .number-bubble.deny {
  background-color: rgba(244, 67, 54, 0.3);
}

.modal-overlay .number-bubble.confirm::after {
  content: "✓";
  position: absolute;
  font-size: 12em;
  color: rgba(76, 175, 80, 0.9);
  font-weight: 900;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
  z-index: 1;
  font-family: Arial, sans-serif;
}

.modal-overlay .number-bubble.deny::after {
  content: "✕";
  position: absolute;
  font-size: 12em;
  color: rgba(244, 67, 54, 0.9);
  font-weight: 900;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
  z-index: 1;
  font-family: Arial, sans-serif;
}

.modal-overlay .feedback-text {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3em;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
  z-index: 10;
}

.modal-overlay .feedback-text.yes {
  color: #4CAF50;
}

.modal-overlay .feedback-text.no {
  color: #F44336;
}

.modal-overlay .modal-body.red-theme {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.8) 0%, rgba(238, 90, 36, 0.8) 100%);
  color: white;
}

.modal-overlay .modal-body.blue-theme {
  background: linear-gradient(135deg, rgba(116, 185, 255, 0.8) 0%, rgba(9, 132, 227, 0.8) 100%);
  color: white;
}

.modal-overlay #modal-athlete-info {
  text-align: center;
  margin-bottom: 20px;
}

.modal-overlay .athlete-display .flag-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.modal-overlay .athlete-display .flag {
  width: 200px;
  height: 140px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  border: none;
}

/* Referee Modal Overlay Styles */
.referee-modal-overlay {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0%;
  top: 0%;
  width: 100%;
  height: 100%;
  background-color: transparent;
  animation: fadeIn 0.3s ease;
  overflow: hidden; /* Disable scrolling within modal */
}

.referee-modal-content {
  background-color: transparent;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  width: 100%;
  height: 100%;
  box-shadow: none;
  animation: none;
  display: flex;
  flex-direction: column;
}

.referee-modal-body {
  padding: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Remove padding and border radius for split modal to fill entire space */
.referee-modal-body.split-modal {
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.referee-modal-title {
  font-size: 13.6em; /* 85% of 16em */
  font-weight: bold;
  text-align: center;
  margin: 0 0 25.5px 0; /* 85% of 30px */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}


/* Red theme for referee modal */
.referee-modal-body.red-theme {
  background: linear-gradient(135deg, rgba(120, 60, 60, 1.0) 0%, rgba(100, 50, 50, 1.0) 100%);
  color: white;
}

/* Blue theme for referee modal */
.referee-modal-body.blue-theme {
  background: linear-gradient(135deg, rgba(60, 80, 120, 1.0) 0%, rgba(50, 70, 100, 1.0) 100%);
  color: white;
}

/* Referee flags container */
.referee-flags-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 68px; /* 85% of 80px */
  margin-top: 42.5px; /* 85% of 50px */
  flex-wrap: wrap;
  padding: 17px; /* 85% of 20px */
}

.referee-flag {
  width: 340px; /* 85% of 400px */
  height: 340px; /* 85% of 400px */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27.2em; /* 85% of 32em */
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.6);
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

/* Judge count styling */
.referee-judge-count {
  font-size: 3.4em; /* 85% of 4em */
  font-weight: bold;
  text-align: center;
  margin-top: 76.5px; /* 85% of 90px */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  opacity: 0.9;
}

/* Split team display styling */
.split-team-display {
  display: flex;
  height: 100%;
  width: 100%;
  flex: 1;
  margin: 0;
  padding: 0;
  gap: 0;
  align-items: stretch;
}

.team-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  margin: 0;
  border: none;
}

.red-half {
  background: linear-gradient(135deg, rgba(120, 60, 60, 1.0) 0%, rgba(100, 50, 50, 1.0) 100%);
  color: white;
  margin: 0;
  border: none;
}

.blue-half {
  background: linear-gradient(135deg, rgba(60, 80, 120, 1.0) 0%, rgba(50, 70, 100, 1.0) 100%);
  color: white;
  margin: 0;
  border: none;
}

.team-divider {
  display: none;
}

.team-title {
  font-size: 2.55em; /* 85% of 3em */
  font-weight: bold;
  text-align: center;
  margin-bottom: 17px; /* 85% of 20px */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

.team-points {
  font-size: 10.2em; /* 85% of 12em */
  font-weight: bold;
  text-align: center;
  margin-bottom: 25.5px; /* 85% of 30px */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

.team-flags {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px; /* 85% of 40px */
  margin: 25.5px 0; /* 85% of 30px */
  flex-wrap: wrap;
}

.team-flag {
  width: 204px; /* 85% of 240px */
  height: 204px; /* 85% of 240px */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20.4em; /* 85% of 24em */
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.6);
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.team-judges {
  font-size: 2.55em; /* 85% of 3em */
  font-weight: bold;
  text-align: center;
  margin-top: 76.5px; /* 85% of 90px */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  opacity: 0.9;
}



