body {
  margin: 0;
  background-color: #000;
  font-family: 'Segoe UI', sans-serif;
  color: #FFD700;
}

#controls {
  padding: 1em;
  text-align: center;
  background-color: #FFD700;
}

input {
  padding: 0.5em;
  font-size: 1em;
  width: 200px;
  border-radius: 5px;
  border: none;
}

button {
  padding: 0.5em 1em;
  font-size: 1em;
  margin-left: 10px;
  background-color: #000000;
  color: #FFD700;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.campo {
  position: relative;
  margin: 1em auto;
  width: 95%;
  max-width: 1600px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
              url('https://i.ibb.co/27sSMwgC/campo.jpg') no-repeat center;
  background-size: cover;
}

.setor {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8vw;
  min-width: 6vw;
  min-height: 6vh;
}

.jogador {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.8em;
  max-width: 80px;
  word-break: break-word;
}
.jogador img {
  width: 3vw;
  height: 3vw;
  border-radius: 50%;
  border: 10px solid white;
  object-fit: cover;
}

.jogador span {
  max-width: 10em;
  overflow-wrap: break-word;
  text-overflow: ellipsis;
}

#layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2em;
  margin: 1em auto;
  width: 95%;
  max-width: 1800px;
}

#legenda {
  background-color: rgba(0, 0, 0, 0.85);
  color: #FFD700;
  padding: 1em;
  border-radius: 0.5em;
  font-size: 0.9em;
  border: 1px solid #FFD700;
  max-width: 200px;
  min-width: 160px;
}

#legenda h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.1em;
}

#legenda ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#legenda li {
  display: flex;
  align-items: center;
  margin-bottom: 0.4em;
  color: #fff;
}

#legenda .cor {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  margin-right: 0.5em;
  border: 1px solid #fff;
}

#legenda.hidden {
  display: none !important;
}


@media (min-width: 769px) and (max-width: 900px) {
  #legenda {
    display: none !important;
  }

  #toggleLegenda {
    display: block;
  }
}

@media (max-width: 768px) {
  #layout {
    flex-direction: column;
    align-items: center;
  }

  #controls {
    flex-direction: column;
    gap: 0.5em;
  }

  .campo {
    width: 100%;
    height: auto;

    overflow-x: auto;
    white-space: nowrap;
    transform: scale(0.95);
  }

  .jogador img {
    width: 5vw;
    height: 5vw;
    border: 5px solid white;
  }

  .jogador {
    font-size: 0.7em;
    max-width: 10em;
  }

  .setor {
    gap: 0.5em;
    padding: 0.3em;
    max-width: 100%;
  }

  #legenda {
    position: fixed;
    bottom: 70px;
    left: 1em;
    right: 1em;
    width: 80%;
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.9);
    max-width: none;
    z-index: 1000;
  }

  #toggleLegenda {
    display: block;
    position: fixed;
    bottom: 1em;
    right: 1em;
    font-size: 2em;
    padding: 0.4em 0.6em;
    background-color: #FFD700;
    color: #000;
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 10px #000;
    cursor: pointer;
    z-index: 1001;
  }
}

@media (max-width: 480px) {
  .jogador img {
    width: 12vw;
    height: 12vw;
    border: 3px solid white;
  }

  .jogador {
    font-size: 0.5em;
    max-width: 8em;
  }

  .setor {
    gap: 0.4em;
  }
}


#painel-lateral {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  max-width: 200px;
  min-width: 160px;
}

#indisponiveis {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#indisponiveis h3 {
  margin: 0.5em 0;
  font-size: 1.1em;
  color: yellow;
  text-align: center;
}

#indisponiveis-lista {
  display: grid;
  grid-template-columns: 1fr 1fr;  /* duas colunas */
  gap: 0.6em;
  justify-content: center;
  max-height: 80vh;
  overflow-y: auto;
}

#indisponiveis-lista .jogador {
  opacity: 0.5;
  transform: scale(0.85);
}

#menu-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #FFD700;
  color: #000;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#menu-topo .logo {
  font-weight: bold;
  font-size: 1.2em;
  text-decoration: none;
  color: #000;
}

#menu-topo nav {
  display: flex;
  gap: 1em;
}

#menu-topo nav a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  transition: opacity 0.2s ease;
}

#menu-topo nav a:hover {
  opacity: 0.7;
}

@media (max-width: 600px) {
  #menu-topo {
    flex-direction: column;
    align-items: flex-start;
  }

  #menu-topo nav {
    flex-direction: column;
    width: 100%;
  }
}



