:root {
  color-scheme: dark;
  --bg: #080b15;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --text: #eef2ff;
  --muted: #9ca3af;
  --cyan: #22d3ee;
  --blue: #6366f1;
  --green: #34d399;
  --pink: #f472b6;
  --red: #fb7185;
  --border: rgba(148, 163, 184, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.32), transparent 30rem),
    radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.2), transparent 28rem),
    radial-gradient(circle at 70% 95%, rgba(244, 114, 182, 0.18), transparent 26rem),
    var(--bg);
}

.app-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

.subtitle {
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.hero-card {
  position: relative;
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.26), rgba(15, 23, 42, 0.72));
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.45);
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.75;
}

.orb-one {
  inset: 26px auto auto 42px;
  width: 88px;
  height: 88px;
  background: var(--cyan);
}

.orb-two {
  right: 32px;
  bottom: 34px;
  width: 116px;
  height: 116px;
  background: var(--pink);
}

.mini-card {
  position: relative;
  margin: 16px 0 0 auto;
  width: 70%;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  font-weight: 800;
}

.mini-card.active {
  transform: translateX(-24px);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.25), rgba(99, 102, 241, 0.28));
}

.todo-panel {
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 24px;
  background: var(--panel);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.todo-form {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 14px;
  align-items: end;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 800;
}

.optional-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.details-field {
  grid-column: 1 / -1;
}

input, select, textarea, button {
  border: 0;
  border-radius: 16px;
  font: inherit;
}

input, select, textarea {
  width: 100%;
  padding: 16px 18px;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.48);
  outline: none;
}

textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.5;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

button {
  cursor: pointer;
  padding: 14px 18px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  transition: transform 150ms ease, opacity 150ms ease;
}

button:hover { transform: translateY(-1px); }

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 22px 0;
  color: var(--muted);
}

.filters {
  display: flex;
  gap: 8px;
}

.filter {
  padding: 9px 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--border);
}

.filter.active {
  color: #020617;
  background: var(--cyan);
}

.todo-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.todo-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-strong);
}

.todo-item label {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.toggle {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.task-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.task-text {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.task-details {
  color: #cbd5e1;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

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

.todo-item.done .task-details {
  color: var(--muted);
}

.priority-pill {
  padding: 5px 10px;
  border-radius: 999px;
  color: #020617;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--green);
}

.priority-pill.high { background: var(--red); color: white; }
.priority-pill.low { background: #93c5fd; }

.delete {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.3);
  background: rgba(127, 29, 29, 0.32);
  font-size: 1.4rem;
}

.empty-state {
  display: none;
  padding: 48px 12px 28px;
  text-align: center;
  color: var(--muted);
}

.empty-state.visible { display: block; }

.empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 24px;
  color: #022c22;
  background: var(--green);
  font-size: 2rem;
  font-weight: 900;
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--text);
}

@media (max-width: 760px) {
  .hero, .todo-form {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 210px;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .todo-item {
    grid-template-columns: 1fr;
  }
}
