body {
  font-family: Arial, sans-serif;
  background: #eee;
  margin: 0;
}
#adminUI {
  margin: 7px;
}
.scoreboard {

}
.team, .round {
  margin-bottom: 10px;
}
h1 {
  font-size: 1.5em;
}
h1 img {
  max-height: 35px;
  display: inline-block;
}
#resetpass {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 12px;  
  flex-shrink: 0; 
  padding: 6px 12px;
  background-color: #888;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.3;
}
#resetpass:hover {
  opacity: 1;
}

/* Loading
----------------------------------------------- */
#loadingIndicator {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* semi-transparent black overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5em;
  z-index: 9999; 
  text-align: center;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin: 20vh auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Selected scoreboard popup
----------------------------------------------- */
#selectedScoreboardContainer {
  position: fixed;
  top: 1vh;
  left: 50%;
  transform: translateX(-50%);
  width: 85vw;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 3vh auto;
  padding: 15px;
  background: white;
/*  border: 2px solid #777;*/
  border-radius: 8px;
  box-shadow: 0 4px 8px rgb(0 0 0 / 44%);
  z-index: 9998;
}
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9997; /* Behind the popup content */
}

#closePopup {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
}
#scoreboardHeading,
#selectedScoreboardContainer h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
}



/* Scoreboard list
----------------------------------------------- */
.scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #ccc;
}

.scoreboard a {
  flex: 1; /* Take up remaining space */
  text-decoration: none;
  color: #000;
  padding: 10px 0;
}

.deletebutton {
  flex-shrink: 0; /* Prevent button from resizing */
  padding: 6px 12px;
  margin-left: 10px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.deletebutton:hover {
  background-color: #d32f2f;
}

.createbutton {
  flex-shrink: 0; /* Prevent button from resizing */
  padding: 6px 12px;
  margin-left: 10px;
  background-color: #00ad00;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.createbutton:hover {
  background-color: #007800;
}

/* Teams list
----------------------------------------------- */


#teamsContainer .createbutton {
  margin: 0;
}
#teamsTable {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
}
#teamsTable tbody td {
  padding: 5px 0;
  text-align: center;
}
#teamsList {
  padding: 0;
}
#teamsList li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

#teamsList li span {
  flex: 1; /* Take up remaining space for team name */
}

#teamsList td input {
/*  height: 2.2em;*/
  padding: 7px 0px 7px 5px;
}
input:focus {
  background-color: yellow;
}

#teamsContainer input[type=text].teamname {
  width: 270px;
  font-size: 1em;
/*  font-weight: bold;*/
}
#teamsContainer input[type=text] {
  width: 60px;
}
#teamsList td input[type=number] {
  max-width: 40px;
  border-radius: 3px;
  border-width: 1px;
  text-align: center;
}
#teamsList td input[type=color] {
  height: 33px;
  width: 50px;
  padding: 0px;
/*  block-size: 26px;*/
}

#teamsList td input[type=number].zero {
  background-color: #ddd;
  color: #444;
}



.bigbutton {
  padding: 1em 2em;
  font-weight: bold;
  text-transform: uppercase;
}


/* Presentation mode
----------------------------------------------- */



#presentModeUI {
  height: 100vh; /* Full viewport height */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.present-team-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Distribute rows evenly */
  height: 100%; /* Full height of parent */
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow-y: auto; /* Allow scrolling if necessary */
  text-transform: uppercase;
  font-size: 4vh;
  font-family: Bahnschrift, sans-serif;
}

.present-team-item {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: 100%; /* Force no gaps effect */
  padding: 10px 20px;
/*  border-radius: 5px;*/
  transition: transform 0.3s ease, order 0.3s ease;
  color: #000; /* Text color for readability */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.present-team-item .team-rank {
  font-weight: bold;
  font-size: 1.2em;
  margin-right: 10px; 
  width: 50px;
  text-align: center;
}

.present-team-item .team-name {
  flex: 1;
  font-weight: bold;
  font-size: 1.2em;
  margin-right: 10px;
}


.present-team-item .team-score, 
.present-team-item .team-total {
  width: 50px;
  text-align: center;
  padding: 5px;
  border-radius: 3px;
}

.present-team-item  .team-total {
  width: 80px; 
  text-align: right;
  padding-right: 50px;
  font-weight: bold;
  font-size: 1.61em;
}

/* Actions
----------------------------------------------- */
#actions {
  display: flex;
  justify-content: space-between; /* Spread items evenly */
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-top: 20px;
}
#actions .button-container {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between image and button */
}
#actions #createbutton, 
#actions #permalink {
  text-align: center;
}

#actions img {
  max-width: 200px; 
  height: auto;
}


/* Status
------------ */
#statusPopup {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background-color: #333;
  color: #fff;
  border-radius: 5px;
  font-size: 16px;
  display: none; /* Hidden by default */
  z-index: 9999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}