:root {
  --bg-0: #07070d;
  --bg-1: #0d0d18;
  --fg: #e7e7f0;
  --muted: #9b9bb0;
  --accent: #7c5cff;
  --accent-2: #20e3b2;
  --danger: #ff5d7a;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--fg);
  background:
    radial-gradient(1200px 800px at 10% -10%, #1a1340 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 10%, #0a3b3a 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
  overflow-x: hidden;
}

.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; }
.orb-1 { width: 420px; height: 420px; background: #6f47ff; top: -120px; left: -80px; }
.orb-2 { width: 360px; height: 360px; background: #20e3b2; bottom: -120px; right: -60px; opacity: 0.4; }
.orb-3 { width: 300px; height: 300px; background: #ff5d7a; top: 40%; left: 50%; transform: translate(-50%, -50%); opacity: 0.18; }

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--glass-shadow);
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px auto;
  padding: 16px 22px;
  max-width: 880px;
  width: calc(100% - 32px);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.tagline { color: var(--muted); font-size: 12px; }
.logo {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 700; font-size: 22px;
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.45);
}

.stats { display: flex; gap: 10px; }
.stat {
  text-align: center;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 60px;
}
.stat span { display: block; font-size: 18px; font-weight: 700; }
.stat label { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.08em; }

.container {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.card { padding: 22px; }

.add-form {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.add-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fg);
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.add-form input::placeholder { color: var(--muted); }
.add-form input:focus {
  border-color: rgba(124, 92, 255, 0.6);
  background: rgba(255, 255, 255, 0.07);
}

.btn-primary {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--accent), #5b3df0);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.45);
  transition: transform 0.1s ease;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.filters { display: flex; gap: 8px; margin-bottom: 14px; }
.filter {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.filter:hover { color: var(--fg); }
.filter.active {
  color: white;
  background: rgba(124, 92, 255, 0.18);
  border-color: rgba(124, 92, 255, 0.5);
}

.task-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.task {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.task:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.14); }
.task.done .title { color: var(--muted); text-decoration: line-through; }

.checkbox {
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
}
.checkbox:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.checkbox:checked::after {
  content: ''; position: absolute; left: 6px; top: 2px;
  width: 6px; height: 12px;
  border: solid white; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.title { flex: 1; font-size: 15px; word-break: break-word; }
.task-meta { color: var(--muted); font-size: 11px; margin-right: 4px; }

.btn-icon {
  background: transparent; border: none; cursor: pointer;
  color: var(--muted);
  padding: 6px; border-radius: 8px;
  display: grid; place-items: center;
  transition: all 0.15s;
}
.btn-icon:hover { color: var(--danger); background: rgba(255, 93, 122, 0.1); }

.empty { text-align: center; color: var(--muted); padding: 30px 0 10px; font-size: 14px; }
.hidden { display: none; }

.footer {
  position: relative; z-index: 1;
  text-align: center; color: var(--muted);
  font-size: 12px; padding: 16px 0 28px;
}

@media (max-width: 540px) {
  .stats { display: none; }
  .topbar { padding: 14px 16px; }
}
