*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:"Poppins", sans-serif;
}

body{
  background:linear-gradient(135deg, #1e293b, #0f172a);
  height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  color:#222;
}

.card{
  background:#ffffff;
  width:380px;
  padding:25px;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
  
}

.card h2{
  text-align:center;
  margin-bottom:15px;
  font-weight:600;
}

.input-row{
  display:flex;
  gap:10px;
  margin-bottom:15px;
}

.input-row input{
  flex:1;
  padding:10px;
  font-size:15px;
  border:2px solid #2e3e58;
  border-radius:8px;
}

.input-row button{
  padding:10px 18px;
  background:#293344;
  border:none;
  color:white;
  font-size:15px;
  font-weight:600;
  border-radius:8px;
  cursor:pointer;
  transition:.2s;
}

.input-row button:hover{
  background:#101520;
  
}

#taskList{
  list-style:none;
}

.task{
  background:#f1f5f9;
  padding:10px 12px;
  border-radius:8px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.task p{
  margin-left:8px;
}

.checked{
  text-decoration:line-through;
  color:#425986;
}

.delete{
  font-size:18px;
  color:#ef4444;
  cursor:pointer;
}
/* Theme Toggle Button */


/* Light mode style */
.light-mode{
  background:linear-gradient(135deg, #eef2ff, #e2e8f0);
}

.light-mode .card{
  background:white;
  color:black;
}

.light-mode .input-row button{
  background:#87a7da;
}

.light-mode .input-row button:hover{
  background:#7a91c2;
}


/* Mobile responsiveness with animation */
.card{
  animation: pop 0.4s ease-in-out;
}
.theme-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: white;
  border: 2px solid black;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 0;
}

.theme-btn img {
  width: 28px;   /* icon size */
  height: 28px;
  object-fit: contain;
}




@keyframes pop{
  0%{ transform:scale(0.8); opacity:0; }
  100%{ transform:scale(1); opacity:1; }
}

@media(max-width:450px){
  .card{
    width:90%;
    padding:20px;
  }
}
