body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  color: #333;
}

header {
  background: #004080;
  color: white;
  height: 40px;
  line-height: 40px; /* centraliza o texto verticalmente */
  text-align: center;
  /*font-size: 0.75rem; /* reduz tamanho da fonte para caber */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  overflow: hidden;
  white-space: nowrap;
}

.controls {
  margin-top: 0.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
  left: 0.5rem;
}

button {
  margin: 0.3rem;
  padding: 0.3rem 0.6rem; /* reduzido proporcionalmente */
  border: none;
  background: #0077cc;
  color: white;
  cursor: pointer;
  border-radius: 5px;
  font-size: 0.75rem; /* menor fonte */
  transition: background 0.3s ease;
  width: 15%; /* 1/3 da largura do container pai */
  min-width: 50px; /* evita que fique pequeno demais */
  box-sizing: border-box;
}

button:hover {
  background: #005fa3;
}

.controls button.active {
  background-color: #ffa500;
  color: black;
  font-weight: bold;
  border: 2px solid #cc8400;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

th, td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

thead {
  background-color: #f0f0f0;
  font-weight: bold;
}

tr.selected {
  background-color: #e0f7fa;
  font-weight: bold;
}

tr:hover {
  background-color: #f9f9f9;
}

aside, section {
  margin: 1rem;
}

.ads {
  background: #ddd;
  height: 100px;
  text-align: center;
  line-height: 100px;
  margin-top: 2rem;
  border-radius: 8px;
}

.painel {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  padding: 0.5rem;
  height: 100vh;
  box-sizing: border-box;
}

.classificacao, .jogos {
  flex: 1;
  overflow-y: auto;
}

.jogos-controle {
  /*display: flex;
  gap: 0.5rem;
  
  /*justify-content: center;*/
  margin-bottom: 0.5rem;
}

.tabela-jogos-area {
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.tabela-jogos-area h2 {
  margin-top: 0;
  font-size: 0.8rem;
  color: #004080;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.5rem;
}

input[type="number"] {
  width: 50px;
  padding: 3px;
  font-size: 0.8rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .painel {
    flex-direction: column;
  }

  .jogos-controle {
    flex-direction: column;
    align-items: center;
  }
}

/* Compactar linhas da tabela de jogos */
.tabela-jogos tbody tr {
  height: 28px;
}

/* Reduzir padding e altura das células */
.tabela-jogos th,
.tabela-jogos td {
  padding: 4px 6px;
  font-size: 0.78rem;
  line-height: 1.2;
}

/* Ajustar inputs dentro das tabelas */
.tabela-jogos input[type="number"] {
  width: 38px;
  padding: 2px;
  font-size: 0.75rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Reduzir margem superior da tabela */
.tabela-jogos {
  margin-top: 0.5rem;
}


th {
  cursor: pointer;
  position: relative;
  user-select: none;
}

th.sort-asc::after {
  content: " ↑";
  position: absolute;
  right: 8px;
  font-size: 0.8rem;
  color: #0077cc;
}

th.sort-desc::after {
  content: " ↓";
  position: absolute;
  right: 8px;
  font-size: 0.8rem;
  color: #0077cc;
}