:root {
  --bg-1: #e6efe6;
  --bg-2: #fff4dc;
  --ink: #1b1d24;
  --muted: #5c6470;
  --panel: #fffdf8;
  --line: #d8dece;
  --accent: #0e7a6b;
  --accent-2: #084f69;
  --danger: #b9382a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 22%, transparent 82%);
  pointer-events: none;
}

.container {
  width: min(94vw, 760px);
  margin: 42px auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.hero {
  margin-bottom: 18px;
  animation: rise-in 560ms ease-out both;
}

.eyebrow {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent-2);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.06;
}

.subtitle {
  margin-top: 8px;
  color: var(--muted);
  max-width: 52ch;
}

.panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 240, 0.95));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow:
    0 20px 40px rgba(9, 39, 40, 0.14),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
}

.todo-form {
  display: flex;
  gap: 12px;
  margin: 0;
}

input[type="text"] {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #c7cfbc;
  border-radius: 10px;
  font: inherit;
  background: #fffefb;
}

button {
  border: none;
  background: linear-gradient(120deg, var(--accent), #199c87);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform 120ms ease, filter 120ms ease;
}

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

.list-head {
  margin: 16px 2px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

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

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e4e8db;
  border-radius: 12px;
  animation: rise-in 280ms ease both;
  animation-delay: var(--delay, 0ms);
}

.todo-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.todo-text {
  overflow-wrap: anywhere;
}

li.done .todo-text {
  text-decoration: line-through;
  opacity: 0.58;
}

.delete-btn {
  background: var(--danger);
  padding: 8px 10px;
  font-size: 0.86rem;
}

.empty-state {
  margin: 14px 2px 2px;
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .container {
    margin: 20px auto;
    padding: 14px;
  }

  .panel {
    padding: 14px;
  }

  .todo-form {
    flex-direction: column;
  }

  .todo-form button {
    width: 100%;
  }
}
