* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
}

header .logo h1 {
  font-family: "Cormorant SC", serif;
  font-size: 1.4rem;
  letter-spacing: 2px;
  background: var(--logo-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  font-weight: 800;
}

.header-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.header-controls input{
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size:0.7rem ;
}

.header-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.icon-btn,
.add-btn {
  padding: 0.5rem 0.8rem;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size:0.8rem;
}

.error{
  color: var( --clearbtn); 
  font-size: 0.9rem;
  margin-bottom: 8px;
  display: block; 
}

.hide-error{
  display: none;
}

.task-box {
  margin-top: 1rem;
  background: var(--card);
  padding: 1.5rem 1rem;
  border-radius: 8px;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.3rem;
  opacity: 0.7;
  gap: 1.2rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: none;
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 10px;
  /* display: block; */
}

.empty-state p {
  font-size: 1rem;
  margin-top: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--card);
  padding: 1.3rem;
  width: 350px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap:0.6rem;
  justify-content: space-between;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.circle-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border, #777);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.check-icon {
  font-size: 14px;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.task-item.completed .circle-btn {
  background: linear-gradient(135deg, #55ddff, #c058f3);
  border-color: transparent;
}

.task-item.completed .check-icon {
  opacity: 1;
}


.task-left {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem; 
}


#task-list .task-title {
  font-size: 1.28rem;
  font-weight: 600;
}

#task-list .task-date{
  font-size: 0.78rem;
}

#task-list .delete-btn {
  color: #e74c3c;
}

#task-list .edit-btn {
  color: #5c6cff;
}

.task-actions{
  display: flex;
  gap: 1.6rem;
}

.task-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  opacity: 0.8;
  transition: 0.2s;
}

.task-actions button:hover {
  opacity: 1.2;
}

#task-list .task-item.completed .task-title {
  text-decoration: line-through;
  opacity: 0.5;
}


.btn-cancel {
  background: #e74c3c;
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}



.task-footer {
  margin-block: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-btn{
  background-color: var(--bg);
  color:var(--btn);
  border: none;
  padding: 0.3rem 1rem;
  margin-left: 0.5rem;
  cursor: pointer;
}

.filter-btn:hover{
  color: var(--text);
}
.filter-btn.active{
  color: var(--primary);
}

.clear-btn{
  background-color: var(--bg);
  color:var(--clearbtn);
  border: none;
  padding: 0.3rem 1rem;
  margin-left: 0.5rem;
  cursor: pointer;
}


/* Notification */
#notification-container {
  position: fixed;
  top: 50px;
  right: 50px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2000;
}

.notification {
  padding:0.75rem 1rem;
  color: #fff;
  border-radius: 6px;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideIn 0.4s forwards, fadeOut 0.4s 3s forwards;
  font-weight: 500;
}

.notification.success {
  background: var(--primary);
}

.notification.error {
  background: #ea5455;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}


.notification.loading {
  background: #7cbbe6;
  font-weight: 600;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: .5; }
  50% { opacity: 1; }
  100% { opacity: .5; }
}
