* {
  box-sizing: border-box;
}

:root {
  --bg: #06100c;
  --panel: #0c1a14;
  --panel-border: rgba(80, 255, 170, 0.18);
  --accent: #4dffa3;
  --accent-soft: rgba(77, 255, 163, 0.14);
  --text: #eafff2;
  --text-dim: #7f9d8f;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(77, 255, 163, 0.10), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(77, 255, 163, 0.08), transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(77, 255, 163, 0.06), transparent 45%),
    var(--bg);
  color: var(--text);
  margin: 0;
  padding: clamp(20px, 6vw, 60px) 16px;
  min-height: 100vh;
}

main {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--panel), #081310);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: clamp(18px, 5vw, 28px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(77, 255, 163, 0.06);
}

h1 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(77, 255, 163, 0.25);
}

.subtitle {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.add-form {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.add-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  font-size: 16px;
  background: #05100b;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.add-form input::placeholder {
  color: var(--text-dim);
}

.add-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.add-form button {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #2be08a, var(--accent));
  color: #04120b;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 0 20px rgba(77, 255, 163, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.add-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(77, 255, 163, 0.5);
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.todo-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.todo-list li:last-child {
  border-bottom: none;
}

.todo-list li.empty {
  color: var(--text-dim);
  justify-content: center;
  padding: 24px 0;
}

.toggle-form, .delete-form {
  margin: 0;
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  padding: 10px;
  margin: -10px;
  cursor: pointer;
  filter: grayscale(1) brightness(1.4);
}

li.done .toggle-btn {
  filter: none;
}

.title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  color: var(--text);
  word-break: break-word;
}

li.done .title {
  text-decoration: line-through;
  color: var(--text-dim);
}

.delete-btn {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 12px;
  padding: 10px;
  margin: -10px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.delete-btn:hover {
  opacity: 1;
}

@media (max-width: 380px) {
  .add-form {
    flex-direction: column;
  }

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