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

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 20%, rgba(15, 25, 45, 1) 0%, rgba(10, 15, 30, 1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 30%, rgba(120, 80, 200, 0.15), rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
  z-index: 0;
}

.app-container {
  width: 100%;
  max-width: 720px;
  z-index: 2;
  position: relative;
}

.glass-card {
  background: rgba(20, 25, 45, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.05) inset;
  padding: 2rem 1.8rem;
  transition: all 0.3s ease;
}

.app-header {
  margin-bottom: 2rem;
  text-align: center;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.logo-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.glass-card h1 {
  font-size: 2rem;
  font-weight: 600;
  background: linear-gradient(135deg, #FFFFFF, #C0B7FF);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.tagline {
  color: rgba(220, 220, 255, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  margin-top: 0.4rem;
  font-weight: 400;
}

.add-task-area {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

#taskInput {
  flex: 1;
  background: rgba(15, 20, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  padding: 0.9rem 1.4rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: #f0f0ff;
  transition: all 0.2s ease;
  outline: none;
  backdrop-filter: blur(4px);
}

#taskInput:focus {
  border-color: #a07aff;
  box-shadow: 0 0 0 2px rgba(160, 122, 255, 0.3);
  background: rgba(20, 25, 48, 0.85);
}

#taskInput::placeholder {
  color: rgba(200, 200, 240, 0.5);
}

#addTaskBtn {
  background: linear-gradient(105deg, #6c5ce7, #a363d9);
  border: none;
  border-radius: 2rem;
  padding: 0 1.8rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

#addTaskBtn:hover {
  transform: scale(1.02);
  background: linear-gradient(105deg, #7c6ef0, #b474e6);
  box-shadow: 0 8px 18px rgba(108, 92, 231, 0.4);
}

.stats-filer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  background: rgba(10, 12, 25, 0.4);
  padding: 0.7rem 1.2rem;
  border-radius: 2rem;
  backdrop-filter: blur(6px);
}

.task-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem 0.9rem;
  border-radius: 2rem;
}

.stat-badge {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 2rem;
  font-size: 0.8rem;
}

.stat-badge.total { color: #b9c3ff; }
.stat-badge.completed { color: #8bffc2; }
.stat-badge.pending { color: #ffb97a; }

.stat-label {
  color: rgba(230, 230, 250, 0.7);
  font-weight: 500;
}

.stat-divider {
  color: rgba(255, 255, 255, 0.3);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-btn {
  background: transparent;
  border: none;
  color: #cfd4ff;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.filter-btn.active {
  background: rgba(108, 92, 231, 0.5);
  color: white;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.clear-completed-btn {
  background: rgba(220, 80, 90, 0.2);
  border: 1px solid rgba(255, 100, 110, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffb3b3;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-completed-btn:hover {
  background: rgba(220, 80, 90, 0.5);
  color: white;
  border-color: #ff7a7a;
}

.tasks-list {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.3rem;
  margin-top: 0.5rem;
}

.tasks-list::-webkit-scrollbar {
  width: 4px;
}
.tasks-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
.tasks-list::-webkit-scrollbar-thumb {
  background: #7c6ef0;
  border-radius: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: rgba(25, 30, 50, 0.5);
  backdrop-filter: blur(5px);
  margin-bottom: 0.8rem;
  padding: 0.9rem 1.2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
  animation: fadeSlideUp 0.2s ease-out;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-item:hover {
  background: rgba(45, 50, 80, 0.6);
  border-color: rgba(160, 122, 255, 0.3);
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.custom-checkbox {
  width: 1.3rem;
  height: 1.3rem;
  background: rgba(255,255,240,0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.4);
  transition: all 0.15s;
}

.task-complete .custom-checkbox {
  background: #6c5ce7;
  border-color: #c0b7ff;
}

.task-complete .custom-checkbox::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: white;
  font-size: 0.75rem;
}

.task-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #f0f0ff;
  word-break: break-word;
  transition: all 0.2s;
  cursor: pointer;
  flex: 1;
}

.task-complete .task-text {
  text-decoration: line-through;
  color: #9ca0c0;
}

.task-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.edit-task-btn, .delete-task-btn {
  background: rgba(250, 248, 249, 0.2);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 1rem;
  transition: all 0.2s;
  opacity: 0.7;
}

.edit-task-btn:hover {
  background: rgba(100, 150, 250, 0.2);
  transform: scale(1.05);
  opacity: 1;
}

.delete-task-btn:hover {
  background: rgba(220, 70, 80, 0.3);
  transform: scale(1.05);
  opacity: 1;
}

.edit-input {
  background: rgba(20, 25, 45, 0.95);
  border: 1px solid #a07aff;
  border-radius: 1.2rem;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  color: white;
  font-family: 'Inter', sans-serif;
  outline: none;
  flex: 1;
}

.empty-state-message {
  text-align: center;
  padding: 2.5rem 1rem;
  color: rgba(200, 200, 240, 0.5);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.empty-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}

.credit-note {
  text-align: center;
  font-size: 0.7rem;
  margin-top: 1.8rem;
  color: rgba(220, 220, 255, 0.3);
  letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 550px) {
  .glass-card {
    padding: 1.5rem;
  }
  .stats-filer-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    justify-content: space-between;
  }
  .task-item {
    flex-wrap: wrap;
  }
  .task-left {
    width: calc(100% - 50px);
  }
  .task-actions {
    width: auto;
  }
}