:root {
  --main-color: #0d6efd; /* Primary Blue */
  --secondary-color: #dadee2; /* Light Gray */
  --danger-color: #dc3545; /* Red */
  --warning-color: #ffc107; /* Yellow */
  --success-color: #198754; /* Green */
  --success-color-dark: #20c997; /* Teal Green for dark mode */

  --text-dark: #212529; /* Text in light mode */
  --text-light: #f8f9fa; /* Text in dark mode */

  --bg-light: #f8f9fa; /* Light Background */
  --bg-dark: #121212; /* Dark Background */
  --bg-dark-secondary: #343a40; /* Dark containers */
}

/* Light Mode */
.light {
  background: var(--bg-light);
  color: var(--text-dark);

  .nav,
  .footer {
    background: var(--main-color);
    color: var(--text-light);
  }
  .title{
    background: var(--secondary-color);
    border-bottom: 2px solid var(--main-color);
  }
  /* .input-section, */
  .input {
    background: var(--bg-light);
    color: var(--text-dark);
  }
}

/* Dark Mode */
.dark {
  background: var(--bg-dark);
  color: var(--text-light);
  .nav,
  .footer,
  /* .input-section, */
  .input,
  .title
  {
    background: var(--bg-dark-secondary);
    color: var(--text-light);
  }
  li.completed {
    background: var(--bg-dark);
  }
}
/* Body */
body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
}

/* Main Container */
.container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Navbar */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 10px;
}

/* Footer */
.footer {
  text-align: center;
}

/* Sections */
.input-section,
.view-section {
  padding: 10px;
  border-radius: 12px;
  width: 80%;
  max-width: 800px;
  margin: 20px auto;
}

/* Form */
form {
  display: flex;
  align-items: center;
}

.input {
  flex: 1;
  padding: 10px;
  border-radius: 50px;
  border: 1px solid #ccc;
  outline: none;
  transition: border-color 0.3s ease;

}
.input:focus {
  border-color: var(--main-color);
}

/* Buttons */
.btn {
  border: none;
  cursor: pointer;
  background: transparent;
  transition: transform 0.2s ease;
}
.btn:hover {
  transform: scale(1.1);
}

.btn-edit {
  color: var(--warning-color);
}
.btn-done {
  color: var(--success-color);
}
.dark .btn-done {
  color: var(--success-color-dark);
}
.btn-delete {
  color: var(--danger-color);
}
.btn-success {
  color: var(--main-color);

}

.actions {
  display: flex;
  gap: 8px;
  justify-content: end;
}

/* List */
ul {
  list-style: none;
  padding: 0;
}

/* List Item */
li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0;
  padding: 10px;
  border-bottom: 1px solid var(--secondary-color);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  gap: 8px;
}


li.completed span {
  text-decoration: line-through var(--danger-color) 2px;
  opacity: 0.9;

}
li span {
  text-wrap: wrap;
  word-wrap: break-word;
  max-width: calc(100% - 80px * 3);
}

.title{
  text-align: center;
  font-size: 20px;
  line-height: 40px;
  border-bottom: 2px solid var(--secondary-color);
}
/* Error Message */
.error {
  color: var(--danger-color);
}

/* Responsive */
@media (max-width: 600px) {
  .input-section,
  .view-section {
    width: 90%;
  }
  li {
    flex-direction: column;
    align-items: flex-start;
  }
  .actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

/* Print */
@media print {
  .nav,
  .footer,
  .input-section {
    display: none;
  }
}
