/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto Condensed', 'Arial', sans-serif;
}

body {
  background-color: transparent;
  color: white;

}

/* Scoreboard container */
.scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  max-width: 900px;
  margin: 0 auto;
  height: 90px;
  padding: 10px 15px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.scoreboard {
  /* Team styling */
  .team {
    display: flex;
    align-items: center;
    width: 36%;
    height: 100%;
  }

  .team1 {
    justify-content: flex-start;
    padding-right: 5px;
  }

  .team2 {
    justify-content: flex-end;
    padding-left: 5px;
  }

  /* Logo styling */
  .logo-container {
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 8px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .team1 .logo-container {
    margin-right: 8px;
    margin-left: 0;
  }

  .team2 .logo-container {
    margin-left: 8px;
    margin-right: 0;
  }

  .logo-container img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
  }

  /* Team name styling */
  .team-name {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    padding: 0 5px;
  }

  /* Center information and scores */
  .center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 28%;
    min-width: 130px;
    height: 100%;
    position: relative;
    flex-shrink: 0;
  }

  .timer {
    font-size: 36px;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    padding: 0 10px;
    margin-bottom: 5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
  }

  .period {
    font-size: 18px;
    padding: 2px 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    z-index: 2;
  }

  /* Score positioning */
  .score {
    font-size: 40px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 0 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .team-name {
      font-size: 24px;
      max-width: 140px;
    }
    
    .logo-container {
      width: 45px;
      height: 45px;
    }
    
    .timer {
      font-size: 28px;
    }
    
    .score {
      font-size: 34px;
      min-width: 45px;
    }
  } 

}

.scoreboard .score:first-of-type {
  right: calc(100% + 5px);
}

.scoreboard .score:last-of-type {
  left: calc(100% + 5px);
}

/* Animations */
@keyframes scoreChange {
  0% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.2); background-color: var(--opponentColor, rgba(255, 215, 0, 0.8)); }
  100% { transform: translateY(-50%) scale(1); }
}

.score-changed {
  animation: scoreChange 0.5s ease;
}

/***** SCOREBOARD 2 *******/

.scoreboard-2 {
  display: flex;
  justify-content: start;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 10px 15px;

  .background {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  }

  .team {
    display: flex;
    align-items: center;
    margin: 0 10px;
  }

  .team1 {
    --teamColor: #3A92C2;
    --opponentColor: #FF4BB2;
    margin-left: 40px;
  }

  .team2 {
    --teamColor: #FF4BB2;
    --opponentColor: #3A92C2;
    margin-right: 40px;
  }

  .team-wrapper {
    height: 80px;
    background: var(--teamColor);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .team1 .team-wrapper {
    transform: skew(-20deg);
    padding-left: 30px;
    padding-right: 20px;
  }

  .team2 .team-wrapper {
    transform: skew(-20deg);
    padding-left: 20px;
    padding-right: 30px;
  }

  .team-wrapper .set {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--teamColor);
    display: flex;
    align-items: center;
  }

  .team1 .team-wrapper .set {
    left: -50px;
    transform: skew(20deg);
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
  }

  .team2 .team-wrapper .set {
    right: -50px;
    transform: skew(20deg);
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
  }

  .set .score {
    background-color: white;
    border-radius: 50px;
    color: black;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 30px;
    margin-left: 4px;
  }

  .team-name {
    text-transform: uppercase;
    font-size: 30px;
    font-weight: bold;
    transform: skew(20deg);
    text-align: center;
    width: 200px;
    word-wrap: break-word;
  }

  .separator {
    height: 80px;
    background: var(--teamColor);  
    transform: skew(-20deg);
  }

  .separator-big {
    width: 15px;
  }

  .separator-small {
    width: 7px;
  }

  .team1 {
    .team-wrapper {
      margin-right: 10px;
    }

    .separator-big {
      margin-right: 10px;
    }

    .score-wrapper {
      margin-left: 10px;
    }
  }

  .team2 {
    .team-wrapper {
      margin-left: 10px;
    }

    .separator-small {
      margin-right: 10px;
    }

    .score-wrapper {
      margin-right: 10px;
    }
  }

  .score-wrapper {
    height: 100px;
    width: 80px;
    transform: skew(-20deg);
    background: var(--teamColor); 
    display: flex;
    justify-content: center;
    align-items: center;

    .score {
      transform: skew(20deg);
      font-size: 30px;
      font-weight: bold;
    }
  }

}