:root {
  --bg-gradient: linear-gradient(135deg, #0f172a, #1e1b4b, #3b0764);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.1);
  --primary: #c084fc;
  --primary-glow: rgba(192, 132, 252, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
}

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

body {
  font-family: 'Instrument Sans', sans-serif;
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.app-container {
  width: 100%;
  max-width: 500px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeUp 0.6s ease-out forwards;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

header h1 {
  font-size: 2rem;
  font-weight: 600;
  background: linear-gradient(to right, #e879f9, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.input-group {
  display: flex;
  gap: 0.75rem;
  position: relative;
}

.input-group input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.input-group input::placeholder {
  color: #64748b;
}

.input-group button {
  background: linear-gradient(135deg, #c084fc, #9333ea);
  color: white;
  border: none;
  border-radius: 12px;
  width: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.input-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.input-group button:active {
  transform: translateY(0);
}

.filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  transition: all 0.2s ease;
}

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

.filter-btn.active {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text-main);
}

.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Custom Scrollbar */
.todo-list::-webkit-scrollbar {
  width: 6px;
}
.todo-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
}
.todo-list::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}
.todo-list::-webkit-scrollbar-thumb:hover {
  background: var(--glass-hover);
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  animation: slideIn 0.3s ease-out forwards;
  transition: all 0.2s ease;
}

.todo-item:hover {
  background: var(--glass-bg);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.todo-item.completed .task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checkbox-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.checkbox-container i {
  position: absolute;
  font-size: 14px;
  color: white;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.todo-item.completed .checkbox-container {
  background: var(--success);
  border-color: var(--success);
}

.todo-item.completed .checkbox-container i {
  opacity: 1;
  transform: scale(1);
}

.task-text {
  flex: 1;
  font-size: 1rem;
  word-break: break-word;
  transition: color 0.3s ease;
}

.delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.todo-item:hover .delete-btn {
  opacity: 1;
  transform: scale(1);
}

.delete-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.actions-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.glass-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.glass-btn:hover {
  background: var(--glass-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.empty-state i {
  font-size: 2.5rem;
  opacity: 0.5;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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