/* Importando fontes */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&display=swap');
@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; /* fundo do menu claro */
  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);
  }
}

/* -------------------- SEÇÃO DE ROUNDS -------------------- */
main.rounds-container {
  margin-top: 90px;
  padding: 30px 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  background-color: #fff; /* fundo claro */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(75, 0, 130, 0.12);
}

/* Ajuste para telas pequenas */
@media (max-width: 600px) {
  main.rounds-container {
    padding: 20px 10px;
    margin-top: 100px; /* dá espaço pro menu fixo */
    width: 95%;
  }
}

.titulo-pagina {
  font-size: 32px;
  color: #4B0082;
  text-align: center;
  margin-bottom: 30px;
  font-family: 'Anton', sans-serif;
}

/* === Formulário === */
.round-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Seção do formulário */
.form-section {
  display: flex;
  flex-direction: column;
}

.form-section label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #4B0082;
  font-size: 18px;
}

.form-section input,
.form-section select {
  padding: 10px;
  font-size: 16px;
  border: 2px solid #444; /* borda escura */
  border-radius: 6px;
  transition: 0.2s;
  font-family: 'Work Sans', sans-serif;
  background-color: #fff; /* fundo claro para inputs */
  color: #333; /* texto escuro para inputs */
}

.form-section input:focus,
.form-section select:focus {
  outline: none;
  border-color: #4B0082;
  background-color: #f5f0fa;
}

/* === Container das saídas === */
.saidas-container {
  background-color: #f8f4ff;
  padding: 15px;
  border-radius: 10px;
  border: 1.5px solid #c8b8e0;
}

.saidas-container h3 {
  color: #330066;
  font-size: 20px;
  margin-bottom: 12px;
}

.saida-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.saida-item input {
  width: 100px;
  max-width: 100%;
  box-sizing: border-box;
}

/* === Botões do Formulário === */
.add-btn,
.remover-btn,
.submit-btn {
  padding: 10px 20px;
  font-weight: bold;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  font-family: 'Work Sans', sans-serif;
}

.add-btn {
  background-color: #e0d4f7;
  color: #330066;
}

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

.remover-btn {
  background-color: #ffe0e0;
  color: #990000;
}

.remover-btn:hover {
  background-color: #f5bcbc;
}

.submit-btn {
  background-color: #4B0082;
  color: #fff;
}

.submit-btn:hover {
  background-color: #3a0069;
}

/* === Modal === */
.modal {
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff; /* fundo claro */
  color: #333; /* texto escuro */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  padding: 30px 35px;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  text-align: left;
}

.fechar {
  color: #f44336; /* vermelho para fechar */
}

.fechar:hover {
  color: #bb86fc; /* roxo claro */
}

/* === Histórico === */
.historico-item {
  background: #fff; /* fundo claro */
  border-color: #bb86fc; /* borda roxa */
  color: #bb86fc; /* texto roxo */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.excluir-btn {
  background-color: #f44336; /* vermelho claro */
}

.excluir-btn:hover {
  background-color: #e53935; /* vermelho mais intenso */
}

/* === Scrollbar === */
#historicoConteudo::-webkit-scrollbar-thumb {
  background-color: #bb86fc; /* roxo claro */
}

/* === Definições de Cores para o Tema Escuro === */
/* === Definições de Cores para o Tema Claro === */
:root {
  --bg-light: #f9f9f9; /* fundo claro */
  --text-dark: #333; /* texto escuro */
  --primary-color: #4B0082; /* roxo */
  --secondary-color: #6200ea; /* roxo claro */
  --input-bg-light: #fff; /* fundo claro para inputs */
  --input-border-light: #ddd; /* borda clara para inputs */
  --button-bg-light: #6200ea; /* fundo roxo para botões */
  --button-hover-light: #bb86fc; /* hover roxo claro */
  --modal-bg-light: #fff; /* fundo claro para modal */
  --table-header-light: #4B0082; /* cor do cabeçalho da tabela */
  --table-bg-light: #fff; /* fundo da tabela */
  --table-border-light: #ddd; /* borda da tabela */
  --link-color-light: #4B0082; /* cor dos links */
}

/* === Definições de Cores para o Tema Escuro === */
:root[data-theme="dark"] {
  --bg-dark: #121212; /* fundo escuro */
  --text-light: #e0e0e0; /* texto claro */
  --primary-color: #bb86fc; /* roxo claro */
  --secondary-color: #6200ea; /* roxo */
  --input-bg-dark: #333; /* fundo escuro para inputs */
  --input-border-dark: #444; /* borda escura para inputs */
  --button-bg-dark: #6200ea; /* fundo roxo para botões */
  --button-hover-dark: #bb86fc; /* hover roxo claro */
  --modal-bg-dark: #333; /* fundo escuro para modal */
  --table-header-dark: #4B0082; /* cabeçalho da tabela escuro */
  --table-bg-dark: #333; /* fundo escuro da tabela */
  --table-border-dark: #444; /* borda escura da tabela */
  --link-color-dark: #bb86fc; /* cor dos links */
}

/* 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: var(--bg-light);
  color: var(--text-dark);
}

/* === 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: var(--link-color-light);
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

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

/* === Seção de Rounds - Modo Claro === */
main.rounds-container {
  margin-top: 90px;
  padding: 30px 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--table-bg-light);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(75, 0, 130, 0.12);
}

.titulo-pagina {
  font-size: 32px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
  font-family: 'Anton', sans-serif;
}

/* === Formulário - Modo Claro === */
.round-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Seção do formulário */
.form-section {
  display: flex;
  flex-direction: column;
}

.form-section label {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--primary-color);
  font-size: 18px;
}

.form-section input,
.form-section select {
  padding: 10px;
  font-size: 16px;
  border: 2px solid var(--input-border-light);
  border-radius: 6px;
  transition: 0.2s;
  font-family: 'Work Sans', sans-serif;
  background-color: var(--input-bg-light);
  color: var(--text-dark);
}

.form-section input:focus,
.form-section select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #f5f0fa;
}

/* === Botões do Formulário - Modo Claro === */
.add-btn,
.remover-btn,
.submit-btn {
  padding: 10px 20px;
  font-weight: bold;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  font-family: 'Work Sans', sans-serif;
}

.add-btn {
  background-color: var(--secondary-color);
  color: #fff;
}

.add-btn:hover {
  background-color: var(--button-hover-light);
}

.remover-btn {
  background-color: #ffe0e0;
  color: #990000;
}

.remover-btn:hover {
  background-color: #f5bcbc;
}

.submit-btn {
  background-color: var(--primary-color);
  color: #fff;
}

.submit-btn:hover {
  background-color: #3a0069;
}

/* === Modal para Modo Claro === */
.modal-content {
  background-color: var(--modal-bg-light);
  color: var(--text-dark);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  padding: 30px 35px;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  text-align: left;
}

.fechar {
  color: #f44336; /* vermelho para fechar */
}

.fechar:hover {
  color: var(--primary-color);
}

/* === Histórico para Modo Claro === */
.historico-item {
  background: var(--table-bg-light); /* fundo claro */
  border-color: var(--primary-color); /* borda roxa */
  color: var(--primary-color); /* texto roxo */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.excluir-btn {
  background-color: #f44336; /* vermelho claro */
}

.excluir-btn:hover {
  background-color: #e53935; /* vermelho mais intenso */
}

/* === Scrollbar para Modo Claro === */
#historicoConteudo::-webkit-scrollbar-thumb {
  background-color: var(--primary-color); /* roxo claro */
}

/* --- Estilo para o modo escuro --- */

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

[data-theme="dark"] .menu {
  background-color: #1f1f1f;
  border-bottom: 1.5px solid #444;
}

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

[data-theme="dark"] .menu a:hover {
  background-color: rgba(75, 0, 130, 0.3);
  color: #d0bfff;
}

/* === Seção de Rounds - Modo Escuro === */
[data-theme="dark"] main.rounds-container {
  background-color: var(--bg-dark);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(75, 0, 130, 0.12);
}

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

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

[data-theme="dark"] .form-section input,
[data-theme="dark"] .form-section select {
  background-color: var(--input-bg-dark);
  color: var(--text-light);
  border: 2px solid var(--input-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"] .modal-content {
  background-color: var(--modal-bg-dark);
  color: var(--text-light);
}

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

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

[data-theme="dark"] .historico-item {
  background: var(--bg-dark);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

[data-theme="dark"] .excluir-btn {
  background-color: #f44336;
}

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

[data-theme="dark"] #historicoConteudo::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
}

/* === Seção de Saídas e Tempo de Troca de Anexo - Modo Escuro === */
[data-theme="dark"] .saidas-container {
  background-color: #222; /* fundo ainda mais escuro */
  padding: 20px;
  border-radius: 10px;
  border: 1.5px solid #444; /* borda escura */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* sombra suave */
  margin-bottom: 20px; /* espaço entre os containers */
}

/* Título da seção Saídas */
[data-theme="dark"] .saidas-container h3 {
  color: #bb86fc; /* roxo claro */
  font-size: 22px;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center; /* centralizar título */
}

/* Itens da saída */
[data-theme="dark"] .saida-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #333; /* fundo escuro para cada item */
  border-radius: 8px; /* borda suave */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover nos itens da saída */
[data-theme="dark"] .saida-item:hover {
  transform: scale(1.05); /* animação de hover */
  box-shadow: 0 4px 12px rgba(75, 0, 130, 0.3); /* sombra no hover */
}

/* Rótulos dentro dos itens de saída */
[data-theme="dark"] .saida-item label {
  color: #bb86fc; /* roxo claro para labels */
  font-size: 16px;
  font-weight: 600;
  width: 100px;
  text-align: right;
  margin-right: 10px;
}

/* Entradas dos itens de saída */
[data-theme="dark"] .saida-item input {
  padding: 12px 15px;
  font-size: 16px;
  border-radius: 6px;
  border: 2px solid #555; /* borda sutil para inputs */
  background-color: #444; /* fundo escuro para inputs */
  color: #e0e0e0; /* texto claro */
  flex: 1;
  transition: border-color 0.3s ease;
}

/* Foco nos inputs */
[data-theme="dark"] .saida-item input:focus {
  outline: none;
  border-color: #bb86fc; /* borda em roxo claro ao focar */
}

/* Botão de remover */
[data-theme="dark"] .saida-item button {
  background-color: #f44336; /* vermelho claro */
  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;
}

/* Hover no botão de remover */
[data-theme="dark"] .saida-item button:hover {
  background-color: #e53935; /* vermelho mais intenso */
  transform: scale(1.05); /* animação de hover */
}

/* Foco no botão de remover */
[data-theme="dark"] .saida-item button:focus {
  outline: none;
}

/* Botão de adicionar saída */
[data-theme="dark"] .add-btn {
  background-color: #6200ea; /* roxo */
  color: #fff;
  font-size: 18px;
  padding: 12px 20px;
  border-radius: 6px;
  margin-top: 20px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Hover no botão de adicionar saída */
[data-theme="dark"] .add-btn:hover {
  background-color: #bb86fc; /* roxo claro */
}
