@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Merriweather", "Poppins", sans-serif;
}

/* Body Background */
body {
  background: linear-gradient(145deg, #0e2253 30%, #1e3a8a 70%, #0891b2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 60px;
  color: #e2e8f0;
  overflow-x: hidden;
}

/* Title and Subtitle */
h1 {
  font-size: 3rem;
  color: #f0f9ff;
  margin-bottom: 15px;
  letter-spacing: 2px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: slideInFromTop 0.8s ease-out;
}

p {
  color: #cbd5e1;
  margin-bottom: 30px;
  font-size: 1.1rem;
  text-align: center;
  opacity: 0.9;
}

/* Input & Button Container */
.input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* Input Field */
#todo-input {
  width: 350px;
  padding: 12px 18px;
  border-radius: 25px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

#todo-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

#todo-input:focus {
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.2);
}

/* Add Button */
#add-btn {
  margin-top: 25px;
  margin-left: 15px;
  padding: 12px 25px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

#add-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

#add-btn:hover::before {
  left: 100%;
}

#add-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.6);
}

/* Todo List Container */
#todo-list {
  list-style: none;
  margin-top: 20px;
  padding: 0;
  width: 400px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Each Todo Item */
#todo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

#todo-list li:last-child {
  border-bottom: none;
}

#todo-list li:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

/* Checkbox */
#todo-list input[type="checkbox"] {
  accent-color: green;
  transform: scale(1.4);
  margin-right: 15px;
  cursor: pointer;
}

/* Todo Text */
#todo-list span {
  flex: 1;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  word-wrap: break-word;
}

#todo-list span:hover {
  color: #67e8f9;
  text-shadow: 0 0 8px rgba(103, 232, 249, 0.5);
}

/* Delete Button */
#todo-list button {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  border-radius: 15px;
  padding: 8px 15px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#todo-list button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* Completed Todo */
#todo-list li input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: #94a3b8;
  opacity: 0.7;
  transition: all 0.3s ease;
}

/* Animations */
#todo-list li {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: 40px;
  }
  h1 {
    font-size: 2.5rem;
  }
  .input-container {
    flex-direction: column;
    gap: 10px;
  }
  #todo-input {
    width: 280px;
  }
  #add-btn {
    margin-left: 0;
  }
  #todo-list {
    width: 320px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  #todo-input {
    width: 250px;
  }
  #todo-list {
    width: 280px;
  }
  #todo-list li {
    padding: 12px 15px;
  }
}


