@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* Resetando estilos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Corpo e fundo geral para modo claro === */
body {
  font-family: "Bebas Neue", sans-serif;
  background-color: #f9f9f9; /* fundo claro */
  color: #333; /* texto escuro */
}

/* === MENU FIXO NO TOPO === */
.menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background-color: #fff;
  border-bottom: 1.5px solid #ddd;
  z-index: 1000;
  box-shadow: 0 3px 8px rgba(75, 0, 130, 0.15);
  flex-wrap: wrap;
}

.menu a {
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  color: #4B0082;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.menu a:hover {
  background-color: rgba(75, 0, 130, 0.12);
  color: #330066;
}

.menu-left,
.menu-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-items {
  display: flex;
  flex: 1;
  justify-content: space-between;
}

.menu-toggle {
  display: none;
  font-size: 26px;
  color: #4B0082;
  background: none;
  border: none;
  cursor: pointer;
}

/* Responsivo menu */
@media (max-width: 768px) {
  .menu {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-toggle {
    display: block;
    margin-bottom: 10px;
  }

  .menu-items {
    flex-direction: column;
    width: 100%;
    display: none;
  }

  .menu-items.active {
    display: flex;
  }

  .menu-left,
  .menu-right {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .menu a {
    width: 100%;
    padding: 12px 20px;
    border-top: 1px solid rgba(75, 0, 130, 0.1);
  }
}

.tabela-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tabela-rounds {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-family: "Work Sans", sans-serif;
  background-color: #fff;
}

.tabela-rounds thead {
  background-color: #4B0082;
  color: #fff;
}

.tabela-rounds th,
.tabela-rounds td {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  word-wrap: break-word;
}

.conteudo {
  padding: 100px 30px 30px;
}

h2 {
  font-family: "Bebas Neue", sans-serif;
  color: #4B0082;
  font-size: 32px;
  margin-bottom: 20px;
}

.botao-grafico {
  background-color: #4B0082;
  color: white;
  font-weight: bold;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 16px;
}

.botao-grafico:hover {
  background-color: #330066;
}

/* Seção dos botões dos gráficos */
.botoes-graficos {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.botoes-graficos button {
  background-color: #4B0082;
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 10px;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(75, 0, 130, 0.2);
}

.botoes-graficos button:hover {
  background-color: #330066;
  transform: scale(1.05);
}

/* Estilo do gráfico */
#graficoErros {
  width: 100%;
  max-width: 600px;
  margin: 40px auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(75, 0, 130, 0.1);
  display: none;
}

/* Estilo do Modal */
#modalRound {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  width: 90%;
  max-width: 480px;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 1001;
  display: none; /* começa oculto */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#modalRound header {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

#modalRound .modal-content p {
  font-size: 16px;
  margin: 8px 0;
  color: #555;
}

#modalRound .modal-content ul {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
}

#modalRound .modal-content ul li {
  padding: 8px 12px;
  background: #f9f9f9;
  border-radius: 6px;
  margin-bottom: 8px;
  color: #444;
  font-weight: 600;
}

#modalRound .close-btn {
  background-color: #3498db;
  border: none;
  color: white;
  padding: 8px 20px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#modalRound .close-btn:hover {
  background-color: #2980b9;
}

/* Fundo escurecido atrás do modal */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

/* Botão de fechar */
.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close:hover {
  color: #330066;
}

/* Animação suave */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

button.excluir-btn {
  background-color: #330066; /* vermelho vivo */
  border: none;
  color: white;
  padding: 6px 12px;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button.excluir-btn:hover {
  background-color: #330066; /* vermelho escuro */
}

button.detalhes-btn {
  background-color: #330066; /* vermelho vivo */
  border: none;
  color: white;
  padding: 6px 12px;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button.detalhes-btn:hover {
  background-color: #330066; /* vermelho escuro */
}

.botoes-acao {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

@media (max-width: 480px) {
  .botoes-acao button {
    flex: 1 1 100%; /* Faz os botões ocuparem 100% da largura no mobile */
    max-width: 100%;
  }
}

/* --- Estilo para o modo escuro --- */
:root[data-theme="dark"] {
  --bg-dark: #121212; /* Fundo escuro */
  --text-light: #e0e0e0; /* Texto claro */
  --accent-light: #bb86fc; /* Cor de destaque roxa */
  --highlight: #6200ea; /* Cor de destaque ao passar o mouse */
  --menu-bg-dark: #1f1f1f; /* Fundo do menu no modo escuro */
  --menu-text-dark: #b497ff; /* Cor do texto do menu */
  --menu-hover-dark: rgba(75, 0, 130, 0.3); /* Cor de hover no menu */
  --menu-active-dark: #d0bfff; /* Cor ativa no menu */
  --menu-border-dark: #444; /* Cor da borda do menu */
  --button-bg-dark: #6200ea; /* Cor de fundo dos botões */
  --button-hover-dark: #bb86fc; /* Cor de hover dos botões */
  --modal-bg-dark: #333; /* Fundo escuro para modais */
  --table-bg-dark: #333333; /* Fundo escuro das tabelas */
  --table-header-dark: #4B0082; /* Cabeçalho da tabela escuro */
  --table-border-dark: #444; /* Cor da borda da tabela */
}

[data-theme="dark"] body {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

[data-theme="dark"] .menu {
  background-color: var(--menu-bg-dark);
  border-bottom: 1.5px solid var(--menu-border-dark);
}

[data-theme="dark"] .menu a {
  color: var(--menu-text-dark);
}

[data-theme="dark"] .menu a:hover {
  background-color: var(--menu-hover-dark);
  color: var(--menu-active-dark);
}

[data-theme="dark"] .menu a.active {
  background-color: var(--menu-active-dark);
  color: var(--menu-text-dark);
}

[data-theme="dark"] .menu {
  box-shadow: 0 3px 8px rgba(75, 0, 130, 0.5);
}

[data-theme="dark"] .tabela-rounds {
  background-color: var(--table-bg-dark);
  color: var(--text-light);
  border-collapse: collapse;
}

[data-theme="dark"] .tabela-rounds thead {
  background-color: var(--table-header-dark);
}

[data-theme="dark"] .tabela-rounds th,
[data-theme="dark"] .tabela-rounds td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--table-border-dark);
  text-align: left;
}

[data-theme="dark"] main.rounds-container {
  background-color: #222;
  box-shadow: 0 4px 12px rgba(75, 0, 130, 0.1);
}

[data-theme="dark"] .titulo-pagina {
  color: var(--accent-light);
}

[data-theme="dark"] .form-section label {
  color: var(--text-light);
}

[data-theme="dark"] .form-section input,
[data-theme="dark"] .form-section select {
  background-color: #333;
  color: var(--text-light);
  border: 2px solid var(--menu-border-dark);
}

[data-theme="dark"] .form-section input:focus,
[data-theme="dark"] .form-section select:focus {
  outline: none;
  border-color: var(--accent-light);
  background-color: #444;
}

[data-theme="dark"] .add-btn,
[data-theme="dark"] .remover-btn,
[data-theme="dark"] .submit-btn {
  background-color: var(--button-bg-dark);
  color: #fff;
}

[data-theme="dark"] .add-btn:hover,
[data-theme="dark"] .remover-btn:hover,
[data-theme="dark"] .submit-btn:hover {
  background-color: var(--button-hover-dark);
}

[data-theme="dark"] #modalRound {
  background-color: var(--modal-bg-dark);
  color: var(--text-light);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .close {
  color: var(--menu-text-dark);
}

[data-theme="dark"] .close:hover {
  color: var(--accent-light);
}

[data-theme="dark"] .botoes-acao button {
  background-color: var(--button-bg-dark);
  color: var(--text-light);
}

[data-theme="dark"] .botoes-acao button:hover {
  background-color: var(--button-hover-dark);
  transform: scale(1.05);
}

/* === Container das saídas === */
.saidas-container {
  background-color: #333;
  padding: 20px;
  border-radius: 10px;
  border: 1.5px solid #444;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

.saidas-container h3 {
  color: #bb86fc;
  font-size: 22px;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
}

.saida-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #444;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.saida-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(75, 0, 130, 0.3);
}

.saida-item label {
  color: #bb86fc;
  font-size: 16px;
  font-weight: 600;
  width: 100px;
  text-align: right;
  margin-right: 10px;
}

.saida-item input {
  padding: 12px 15px;
  font-size: 16px;
  border-radius: 6px;
  border: 2px solid #555;
  background-color: #333;
  color: #e0e0e0;
  flex: 1;
  transition: border-color 0.3s ease;
}

.saida-item input:focus {
  outline: none;
  border-color: #bb86fc;
}

.saida-item button {
  background-color: #f44336;
  color: #fff;
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.saida-item button:hover {
  background-color: #e53935;
  transform: scale(1.05);
}

.saida-item button:focus {
  outline: none;
}

.add-btn {
  background-color: #6200ea;
  color: #fff;
  font-size: 18px;
  padding: 12px 20px;
  border-radius: 6px;
  margin-top: 20px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-btn:hover {
  background-color: #bb86fc;
}

[data-theme="dark"] .add-btn {
  background-color: #6200ea;
}

[data-theme="dark"] .add-btn:hover {
  background-color: #bb86fc;
}

/* Estilos para modo escuro */
/* Estilo do Modal no Modo Escuro */
[data-theme="dark"] #modalRound {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #222; /* Fundo escuro mais profundo */
  width: 90%;
  max-width: 480px;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 1001;
  display: none; /* Começa oculto */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #e0e0e0; /* Texto claro */
}

/* Cabeçalho do Modal no Modo Escuro */
[data-theme="dark"] #modalRound header {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #bb86fc; /* Roxo claro */
  text-align: center;
}

/* Conteúdo do Modal no Modo Escuro */
[data-theme="dark"] #modalRound .modal-content {
  font-size: 16px;
  margin-top: 10px;
  color: #e0e0e0;
}

[data-theme="dark"] #modalRound .modal-content p {
  margin: 8px 0;
  color: #bbb; /* Texto claro */
}

[data-theme="dark"] #modalRound .modal-content ul {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
}

[data-theme="dark"] #modalRound .modal-content ul li {
  padding: 8px 12px;
  background: #444; /* Fundo escuro para cada item */
  border-radius: 6px;
  margin-bottom: 8px;
  color: #e0e0e0; /* Texto claro */
  font-weight: 600;
}

/* Seção individual no Modal */
[data-theme="dark"] .modal-section {
  margin-bottom: 15px;
}

[data-theme="dark"] .modal-section strong {
  color: #bb86fc; /* Roxo claro */
}

/* Botão de Fechar no Modo Escuro */
[data-theme="dark"] .fechar-btn {
  background-color: #6200ea; /* Roxo mais escuro */
  border: none;
  color: white;
  padding: 8px 20px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .fechar-btn:hover {
  background-color: #bb86fc; /* Roxo claro */
}

/* Fundo escurecido atrás do Modal */
[data-theme="dark"] #modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

/* Estilos do botão de fechar no modal */
[data-theme="dark"] .close {
  color: #bbb; /* Texto claro para o botão de fechar */
}

[data-theme="dark"] .close:hover {
  color: #bb86fc; /* Roxo claro no hover */
}
