/* styles.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif; 
  background-color: #121212;
  color: #e0e0e0; 
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  background-color: #1e1e1e;
  padding: 24px; 
  border-radius: 10px;
  width: 350px; 
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); 
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.input-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

input[type="text"] {
  width: 70%;
  padding: 12px; 
  background-color: #2c2c2c; 
  border: 1px solid #444;
  border-radius: 5px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.25s; 
}

input[type="text"]:focus {
  border-color: #7c4dff; 
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1); 
}

button {
  width: 25%;
  padding: 10px;
  background-color: #7c4dff;
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-weight: 500; 
  transition: all 0.2s;
}

button:hover {
  background-color: #651fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); 
}

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

li {
  background-color: #333333;
  padding: 10px; 
  margin-bottom: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  transition: all 0.2s ease-in-out;
  
}

li:hover {
    transform: scale(1.012);
    background-color: #404040;
}

/* checkbox styles - fully outside */
li input[type="checkbox"] {
  position: absolute;
  left: -35px; /* moves it outside */
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  accent-color: #6200ea;
  cursor: pointer;
}

li.completed {
  text-decoration: line-through;
  opacity: 0.7;
}

li button {
  background-color: #d32f2f;
  border: none;
  padding: 5px;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

li button:hover {
  background-color: #b71c1c;
}


@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-15px); 

    
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  to {
    opacity: 1;
    transform: translateX(0);

    
    max-height: 100px; 
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
}

.new-item-animation {
  animation: slideIn 0.4s ease-out;
}



@keyframes fadeAndCollapse {
  to {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
}


.deleting {
  animation: fadeAndCollapse 0.2s ease-out;
}