/* Definindo variáveis no root */
:root {
  --primary-color: #2c2c2c;
  --secondary-color: #e5e5e5;
  --accent-color: #ff9900;
  --hover-color: #e68600;
  --complete-color: #2ecc71;
  --delete-color: #e74c3c;
  --font-family: "Poppins", sans-serif;
  --font-size-base: 16px;
  --font-size-heading: 28px;
  --border-radius: 8px;
  --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  --padding-base: 10px;
  --gap-base: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  background-color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center; 
  padding: 20px;
  min-height: 100vh;
}

.container {
  color: white;
  padding: 30px;
  border-radius: 24px;
  width: 100%;
  max-width: 700px;
  box-shadow: var(--box-shadow);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: var(--font-size-heading);
}

.form {
  display: flex;
  gap: var(--gap-base);
  margin-bottom: 20px;
  flex-wrap: wrap;
  width: 100%;
}

input {
  flex: 1;
  padding: var(--padding-base);
  border-radius: var(--border-radius);
  border: none;
  width: 100%;
  font-size: var(--font-size-base);
}

.form button {
  background-color: var(--accent-color);
  border: none;
  padding: 10px 16px;
  border-radius: var(--border-radius);
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.form button:hover {
  background-color: var(--hover-color);
}

ul {
  list-style: none;
  padding-left: 0;
}

li {
  background-color: #3a3a3a;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.task-text {
  flex: 1;
}

.task-name {
  font-weight: bold;
  font-size: 18px;
}

.task-desc {
  font-size: 14px;
  opacity: 0.8;
}

.completed .task-name,
.completed .task-desc {
  text-decoration: line-through;
  opacity: 0.5;
}

.btns {
  display: flex;
  gap: var(--gap-base);
  margin-top: 10px;
}

.btn-complete {
  background-color: var(--complete-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-delete {
  background-color: var(--delete-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}
/* Estilo para o Modal */
.modal {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); 
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 400px;
  text-align: center;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 25px;
  cursor: pointer;
}

.modal-btn {
  background-color: #ff9900;
  padding: 10px 20px;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.modal-btn:hover {
  background-color: #e68600;
}

/* Estilo para o Modal de Confirmação de Exclusão */
#delete-modal {
  display: none;
}

.modal-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#delete-yes,
#delete-no {
  background-color: #e74c3c;
  padding: 10px 20px;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

#delete-yes:hover,
#delete-no:hover {
  background-color: #c0392b;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 600px) {
  .form {
    flex-direction: column;
  }

  .form button {
    width: 100%;
  }

  .task-text {
    flex: 1;
    padding-right: 10px;
  }

  .btns {
    flex-direction: column;
    align-items: center;
  }

  .btn-complete,
  .btn-delete {
    width: 100%;
    margin-bottom: 10px;
  }
}
