/* Reset básico: tira margens e arruma fonte */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Fundo e centralização */
body {
  background: #f3f3f3;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  transition: background 0.3s, color 0.3s;
}

/* Título principal */
h1 {
  margin-bottom: 20px;
  color: #2c3e50;
}

/* Cabeçalho */
header {
    width: 90%;
    max-width: 500px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* Botão Dark Mode fixo no canto superior direito da página */
#toggle-darkmode {
    position: fixed;      
    top: 10px;          
    right: 10px;          
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background: #3498db;
    color: white;
    cursor: pointer;
    z-index: 1000;        /* garante que fique acima de outros elementos */
    transition: background 0.3s;
}

#toggle-darkmode:hover {
    background: #2980b9;
}

/* Seções (caixinhas brancas) */
section {
  background: white;
  width: 80%;
  max-width: 500px;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: background 0.3s, box-shadow 0.3s;
}

/* Input e botão */
input {
  padding: 10px;
  width: 65%;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-right: 10px;
  transition: background 0.3s, color 0.3s, border 0.3s;
}

button {
  padding: 10px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #2980b9;
}

/* Lista de metas */
ul {
  list-style: none;
}

li {
  background: #ecf0f1;
  margin: 5px 0;
  padding: 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
  transition: background 0.3s, color 0.3s;
}

li input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #3498db; /* azul bonito */
  cursor: pointer;
}

li span {
  flex: 1;
  margin-left: 10px;
  font-size: 20px; /* aumenta fonte */
  font-weight: 500;
  transition: color 0.3s, text-decoration 0.3s;
}

li button {
  background: #e74c3c;
}

li button:hover {
  background: #c0392b;
}


/* Barra de progresso */
#barra {
  width: 100%;
  height: 25px;
  background-color: #ecf0f1;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

#barra-preenchida {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  text-align: center;
  color: white;
  line-height: 25px;
  transition: width 0.3s ease;
  border-radius: 5px;
}

#percentual {
  display: inline-block;
  margin-top: 5px;
  font-weight: bold;
}

/*filtros */
#filtros {
  display: flex;
  justify-content: center;
  gap: 6px; /* espaço entre botões */
  margin: 10px 0;
}

#filtros button {
  padding: 5px 2px; /* tamanho do botão */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
}


/* Fade In animation */
@keyframes fadeIn {
  to { opacity: 1; }
}

/* Dark Mode */
body.dark-mode {
    background: #1e1e1e;
    color: #ecf0f1;
}

body.dark-mode section {
    background: #2c2c2c;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

body.dark-mode input {
    background: #3a3a3a;
    color: #ecf0f1;
    border: 1px solid #555;
}

body.dark-mode li {
    background: #555555;
    color: #ecf0f1;
}

body.dark-mode li span {
    color: #ecf0f1;
}

body.dark-mode #barra {
    background-color: #555;
}

body.dark-mode #barra-preenchida {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

body.dark-mode li button {
    background: #e74c3c;
}