* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Helvetica, sans-serif;
}

body {
  background: #d1aa6c;
  min-height: 100vh;/* % height works ONLY if parent has height defined*/
  display: flex;
  justify-content: center;
  align-items: center;
}

.app {
  height: 100%;/* % height works ONLY if parent has height defined*/
  display: flex;
  flex-direction: column;
  background: white;
  width: 360px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 16px;
}


.header {
  padding: 20px;
  color: rgb(17, 186, 53);
}

.header h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 16px;
}

/*task area*/
.task-container {
  flex: 1;
  padding: 10px 20px;
  overflow-y: auto;
}

/*lists*/
.task-list,
.completed-list {
  list-style: none;
}

.task-list li,
.completed-list li {
  background: #37c5e5;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 
    background-color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease
}

.completed-list li {
  text-decoration: line-through;
  opacity: 0.6;
}

.completed-list {
  transition: max-height 0.25s ease, opacity 0.25s ease;
  margin-top: 15px;
}

.task-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.completed-list li:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.completed-section {
  margin-top: 20px;
}

.completed-toggle {
  background: rgba(255, 255, 255, 0.2);
  color: rgb(209, 8, 8);
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
  border-radius: 8px;
}

.task-list span,
.completed-list span {
  color: #e63946;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.task-list span:hover,
.completed-list span:hover {
  transform: scale(1.25);
  color: #ff0000;
}

.add-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  width: 90%;
  max-width: 500px;

  background: #f5f6fa;
  border-radius: 12px;

  display: flex;
  align-items: center;
  padding: 12px;
  gap: 10px;
  margin-top: 12px;
}

.add-bar input {
  flex: 1;
  outline: none;
  background: transparent;
  font-size: 16px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.add-bar input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.add-icon {/*experiment with icons and alignment!!*/
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #555;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #4f46e5;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.add-icon:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.add-icon::before {
  content: "+";
  color: white;
  font-size: 24px;
}

.hidden {
  display: none;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  background: #e5e7eb;
  color: #111827;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background: #d1d5db;
  transform: scale(1.05);
}

/*Dark Mode Experiment*/
body.dark {
  background: #0f172a;
}

body.dark .app {
  background: #020617;
  color: #e5e7eb;
}

body.dark .task-list li,
body.dark .completed-list li {
  background: #1e293b;
}

body.dark .completed-list li {
  opacity: 0.6;
}

body.dark .add-bar input {
  background: #020617;
  color: white;
  border-color: #334155;
}

body.dark .completed-toggle {
  background: #1e293b;
  color: rgb(209, 8, 8);
}

body.dark .theme-toggle {
  background: #1e293b;
  color: #e5e7eb;
}

body.dark .theme-toggle:hover {
  background: #334155;
}