:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2d27;
  background-color: #f4f8f2;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at 20% 20%, rgba(172, 213, 173, 0.45), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(214, 238, 207, 0.55), transparent 52%),
    linear-gradient(135deg, #f0f7ef 0%, #d9ead5 45%, #b4d4b3 100%);
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(74, 109, 83, 0.15), transparent 70%);
  border-radius: 50%;
  filter: blur(0.5px);
  z-index: 0;
}

body::before {
  top: -180px;
  left: -140px;
}

body::after {
  bottom: -200px;
  right: -160px;
}

.app {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(240, 250, 242, 0.96));
  border-radius: 30px;
  border: 1px solid rgba(101, 145, 115, 0.25);
  box-shadow: 0 30px 60px rgba(36, 68, 50, 0.18);
  padding: clamp(24px, 6vw, 40px);
  width: min(520px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow: hidden;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(170, 214, 170, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(204, 232, 194, 0.4), transparent 52%);
  pointer-events: none;
  z-index: -1;
}

.app__header {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

h1 {
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0;
  background: linear-gradient(120deg, #1d4727, #3d7a3b 55%, #6fbf73);
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
}

.todo-form__label {
  font-size: 0.95rem;
  color: rgba(30, 60, 43, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.todo-form__controls {
  display: flex;
  gap: 14px;
}

.todo-form input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(93, 140, 108, 0.4);
  background: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  color: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.todo-form input::placeholder {
  color: rgba(40, 71, 52, 0.45);
}

.todo-form input:focus {
  outline: none;
  border-color: #5a9c6f;
  box-shadow: 0 0 0 5px rgba(115, 196, 144, 0.25);
  transform: translateY(-1px);
}

button {
  cursor: pointer;
  border: none;
  border-radius: 16px;
  padding: 13px 22px;
  font-weight: 600;
  font-size: 1rem;
  background: linear-gradient(135deg, #2f6a3d, #5fb36a 55%, #7fd48b);
  color: #f7fff8;
  box-shadow: 0 14px 30px rgba(60, 110, 68, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 20px 36px rgba(55, 97, 63, 0.28);
  filter: brightness(1.04);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 12px 26px rgba(55, 97, 63, 0.24);
}

button.secondary {
  align-self: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(207, 230, 203, 0.45));
  color: #2f5233;
  border: 1px solid rgba(95, 161, 108, 0.5);
  padding-inline: 30px;
  backdrop-filter: blur(6px);
}

button.secondary:hover {
  filter: brightness(1.06);
}

.todo-list {
  background: linear-gradient(160deg, rgba(248, 255, 248, 0.92), rgba(222, 239, 220, 0.96));
  border-radius: 22px;
  padding: 12px;
  border: 1px solid rgba(116, 169, 121, 0.25);
  max-height: min(55vh, 440px);
  overflow-y: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
}

.todo-list::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(168, 212, 176, 0.16), transparent 65%);
  pointer-events: none;
}

#todo-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.94), rgba(239, 252, 239, 0.92));
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(68, 110, 78, 0.08);
  border: 1px solid rgba(126, 178, 137, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.todo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(60, 104, 71, 0.12);
}

.todo-item label {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  cursor: pointer;
}

.todo-item__checkbox {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid #5a9c6f;
  background-color: rgba(255, 255, 255, 0.8);
  accent-color: #3f8a53;
}

.todo-item__label {
  flex: 1;
  word-break: break-word;
}

.todo-item.completed {
  background: linear-gradient(120deg, rgba(236, 250, 236, 0.95), rgba(218, 240, 216, 0.92));
  border-color: rgba(118, 177, 126, 0.45);
}

.todo-item.completed .todo-item__label {
  text-decoration: line-through;
  color: rgba(63, 102, 72, 0.65);
}

.todo-item__delete {
  background: none;
  border: none;
  color: #ef5350;
  font-size: 1.2rem;
  padding: 6px 10px;
  line-height: 1;
  border-radius: 10px;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.todo-item__delete:hover {
  background-color: rgba(239, 83, 80, 0.12);
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .app {
    padding: 24px;
  }

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

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

.todo-item--empty {
  justify-content: center;
  color: rgba(42, 74, 54, 0.7);
  font-style: italic;
  box-shadow: none;
  background: none;
  border: none;
}
