* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.18), transparent 30%),
    #eef2ff;
  color: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

body > div {
  width: min(100%, 720px);
  padding: 2rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.12);
  position: relative;
  overflow: hidden;
}

body > div::before,
body > div::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
}

body > div::before {
  width: 180px;
  height: 180px;
  top: -60px;
  right: -50px;
  background: rgba(99, 102, 241, 0.18);
}

body > div::after {
  width: 140px;
  height: 140px;
  bottom: -55px;
  left: -40px;
  background: rgba(249, 115, 22, 0.16);
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.05;
  text-align: center;
  color: #1e293b;
}

#taskInput {
  width: 100%;
  padding: 1.05rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 18px;
  background-color: rgba(248, 250, 252, 0.95);
  color: #0f172a;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#taskInput:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
  transform: translateY(-1px);
}

#addBtn {
  width: 100%;
  padding: 1rem 1.15rem;
  margin-top: 1rem;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.18);
  transition: transform 0.2s ease, filter 0.2s ease;
}

#addBtn:hover,
#addBtn:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.05);
}

#message {
  min-height: 2.4rem;
  margin: 1.25rem 0 0;
  padding: 1rem 1.2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(236, 249, 255, 0.95), rgba(241, 245, 249, 0.92));
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #391dd8;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.08);
}

p {
  margin: 0.75rem 0 0;
  color: #475569;
  text-align: center;
  font-size: 0.95rem;
}

#taskList {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

#taskList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

#taskList li span {
  max-width: 100%;
  color: #ffffff;
  border-radius: 10px;
  font-weight: 700;
  word-break: break-word;
  background-color:#4f46e5;
}

#taskList li button {
  min-width: 3.5rem;
  padding: 0.85rem 0.95rem;
  border: none;
  border-radius: 14px;
  background-color: #10b981;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#taskList li button:hover {
  transform: translateY(-1px);
  background-color: #059669;
}

#taskList li input {
  width: 75%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  background-color: rgba(248, 250, 252, 0.95);
  color: #0f172a;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#taskList li input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

@media (max-width: 640px) {
  body {
    padding: 1rem;
  }

  body > div {
    padding: 1.5rem;
  }

  #taskList li {
    flex-direction: column;
    align-items: stretch;
  }

  #taskList li button {
    width: 100%;
  }
}

