@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #20263a;
  --muted: #7c8498;
  --line: #e9ecf3;
  --accent: #6258e8;
  --accent-dark: #5045d4;
  --surface: #ffffff;
  --page: #f5f7fb;
  --green: #238a68;
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(119, 107, 255, .10), transparent 35rem),
    var(--page);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(98, 88, 232, .24);
  outline-offset: 2px;
}
.app { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 28px; }
.hero { margin-bottom: 30px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .17em; margin-bottom: 15px; }
h1 { margin: 0; font-size: clamp(29px, 5vw, 42px); line-height: 1.3; letter-spacing: -.045em; }
h1 span { color: var(--accent); }
.hero p { margin: 13px 0 0; color: var(--muted); font-size: 15px; }
.panel, .task-section { background: var(--surface); border: 1px solid rgba(224, 228, 239, .85); border-radius: 20px; box-shadow: 0 12px 36px rgba(37, 45, 80, .045); }
.panel { padding: 23px; }
h2 { margin: 0; font-size: 16px; font-weight: 700; }
.task-form { display: flex; gap: 10px; margin-top: 16px; }
.task-form input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; color: var(--ink); background: #fafbfe; transition: border .2s;
}
.task-form input:focus { border-color: var(--accent); outline: none; }
.task-form input::placeholder { color: #a7adbd; }
.primary-button {
  border: 0; border-radius: 12px; padding: 0 17px; color: white;
  background: var(--accent); font-weight: 600; white-space: nowrap;
  box-shadow: 0 5px 12px rgba(98, 88, 232, .18); transition: background .2s, transform .2s;
}
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button span { font-size: 18px; margin-left: 4px; vertical-align: -1px; }
.task-section { margin-top: 18px; padding: 23px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.muted { color: var(--muted); margin: 7px 0 0; font-size: 12px; }
.filters { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #f5f6fa; }
.filter { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 7px 10px; border-radius: 7px; }
.filter.active { color: var(--accent); background: white; box-shadow: 0 1px 4px rgba(31, 39, 69, .09); font-weight: 700; }
.task-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 9px; }
.task-item { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 12px; animation: appear .18s ease-out; }
.task-item:hover { border-color: #d8d5fb; }
.task-check { appearance: none; flex: 0 0 19px; width: 19px; height: 19px; margin: 0; border: 1.5px solid #cbd0df; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.task-check:checked { border-color: var(--green); background: var(--green); }
.task-check:checked::after { content: "✓"; color: white; font-size: 13px; line-height: 1; }
.task-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.task-item.completed .task-text { color: #a2a8b7; text-decoration: line-through; }
.task-date { color: #a1a7b6; font-size: 11px; white-space: nowrap; }
.delete-button { border: 0; border-radius: 8px; width: 30px; height: 30px; color: #9ba2b2; background: transparent; font-size: 18px; }
.delete-button:hover { color: #c7475a; background: #fff0f2; }
.empty-state { text-align: center; padding: 34px 12px 28px; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 14px; color: var(--accent); background: #f0efff; font-size: 22px; }
.empty-state strong { color: #555d72; font-size: 13px; }
.empty-state p { margin: 7px 0 0; font-size: 12px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 5px 0; font-size: 12px; }
.text-button:hover { color: #c7475a; }
footer { text-align: center; padding: 24px 0 0; color: #a0a6b5; font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); padding: 10px 16px; color: white; background: #252a3c; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 8px 24px #20263a22; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 560px) {
  .app { padding-top: 38px; }
  .panel, .task-section { padding: 17px; border-radius: 16px; }
  .task-form { flex-direction: column; }
  .primary-button { padding: 12px 16px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; }
  .filter { flex: 1; }
  .task-date { display: none; }
}
