* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
    height: 100vh;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* To-do Container */
.todo-container {
    background: #fff;
    width: 90%;
    max-width: 420px; 
    min-height: 450px;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #333;
    font-size: 1.6rem;
}

/* Input-section*/
.input-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

#task-input {
    flex: 1;
    min-width: 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;

}

#add-btn {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
}

#add-btn:hover {
    background: #0056b3;
  }

  /* --- Task List --- */
#task-list {
    list-style: none;
  }
  
  #task-list li {
    background: #f9f9f9;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
  }

  #task-list li:hover {
    background: #e6f0ff;
  }
  
  .delete {
    color: #ff4d4d;
    font-weight: bold;
    cursor: pointer;
    padding: 0 8px;
    transition: 0.3s;
  }
  
  .delete:hover {
    color: #cc0000;
  }

  /* --- Completed task style --- */
.completed {
    text-decoration: line-through;
    color: #888;
    opacity: 0.7;
    transition: all 0.3s ease;
  }
  

  /* --- Responsive Design --- */
@media (max-width: 500px) {
    body {
      padding: 10px;
    }
  
    .todo-container {
      width: 100%;
      padding: 15px;
    }
  
    header h1 {
      font-size: 1.4rem;
    }
  
    #task-input {
      font-size: 0.9rem;
    }
  
    #add-btn {
      padding: 8px 12px;
      font-size: 0.9rem;
    }
  
    #task-list li {
      font-size: 0.9rem;
      padding: 8px;
    }
  }
  