/* Estilos da Aplicação Placar Interativo */

/* Fontes referenciadas localmente, conforme original */
/* cyrillic-ext */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2_SeW4Ep0.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2_QOW4Ep0.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2_R-W4Ep0.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2_S-W4Ep0.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2_SuW4Ep0.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2_ROW4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* Reseta estilos básicos e define a fonte */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Evita barras de rolagem */
  font-family: "Roboto Mono", monospace;
  background-color: #111;
}

/* Regra geral para transições suaves e rápidas */
* {
  transition: all 0.4s ease-in-out;
}

#fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85); /* Fundo escuro semi-transparente */
  z-index: 9999; /* Garante que está acima de tudo */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 1; /* Para transição */
}

#fullscreen-overlay.hidden {
  opacity: 0;
  pointer-events: none; /* Impede cliques quando escondido */
}

#fullscreen-button {
  background-color: #2980b9;
  border: 2px solid #3498db;
  color: white;
  padding: 20px 40px;
  font-family: "Roboto Mono", monospace;
  font-size: 24px;
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
}
#fullscreen-button:hover {
  background-color: #3498db;
}
#fullscreen-button:active {
  transform: scale(0.95);
}

#rotation-wrapper {
  width: 100%;
  height: 100%;
}

/* Regra de rotação via Media Query para navegadores que a interpretam corretamente (ex: Firefox Mobile) */
@media (orientation: portrait) and (hover: none) and (pointer: coarse) {
  #rotation-wrapper {
    width: 100vh;
    height: 100vw;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    transform-origin: top left;
    transform: translateY(100vh) rotate(-90deg);
  }
  .score {
    font-size: 120vw !important;
  }
  .score.score-reduced {
    font-size: 70vw !important;
  }
  .timer-display {
    font-size: 4vw !important;
  }
  .timer-container.timer-paused .timer-display {
    font-size: 8vw !important;
  }
}

/* Classe adicionada via JS para forçar a rotação no Chrome Mobile, que tem bugs com a media query */
#rotation-wrapper.force-landscape-chrome {
  width: 100vh;
  height: 100vw;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  transform-origin: top left;
  transform: translateY(100vh) rotate(-90deg);
}

.force-landscape-chrome .score {
  font-size: 120vw !important;
}
.force-landscape-chrome .score.score-reduced {
  font-size: 70vw !important;
}
.force-landscape-chrome .timer-display {
  font-size: 4vw !important;
}
.force-landscape-chrome .timer-container.timer-paused .timer-display {
  font-size: 8vw !important;
}


#app {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.scoreboard {
  display: flex;
  width: 100%;
  height: 100%;
}

.team {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  position: relative;
  user-select: none;
  cursor: pointer;
}

.team-a { background-color: #F00; }

.team-b { background-color: #00F; }

.team-name {
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  position: absolute;
  top: 0;
  cursor: pointer; /* Indica que o nome é clicável */
  z-index: 10; /* Garante que o nome esteja acima da área de clique do placar */
}

.score {
  font-size: 120vh;
  font-weight: bold;
  line-height: 1;
}

.score.score-reduced {
  font-size: 70vh;
}

.timer-container {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 5px 25px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer; /* Adicionado para indicar que é clicável */
}

.timer-container.timer-paused {
  background-color: #e67e22; /* Laranja */
  border-color: #f39c12;
}

.timer-display {
  font-size: 4vh;
  color: white;
  font-weight: bold;
}

.timer-container.timer-paused .timer-display {
  font-size: 8vh; /* Dobro da fonte quando pausado */
}

.controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.reset-button {
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reset-button:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.reset-button svg {
  width: 28px;
  height: 28px;
}

.help-container {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
}

.help-button {
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  font-family: 'Roboto Mono', monospace;
}

.help-button:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.help-content {
  background-color: #2c3e50;
  color: white;
  padding: 30px;
  border-radius: 10px;
  font-size: max(1.1rem, 3vh);
  line-height: 1.8;
  max-width: 90%;
  border: 2px solid #34495e;
}

.help-content ul {
  list-style: '✔ ';
  padding-left: 1.5em;
  margin: 0;
}

.help-content li {
  margin-bottom: 15px;
}

.help-content li:last-child {
  margin-bottom: 0;
}

.help-content a {
  color: #3498db;
  text-decoration: none;
  font-weight: bold;
}

.help-content a:hover {
  text-decoration: underline;
}