* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(108, 45, 130, 0.25), transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(26, 58, 107, 0.30), transparent 50%),
    linear-gradient(180deg, #06061a 0%, #0d1137 60%, #0a0e2e 100%);
  color: #e0d8f8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.home-btn {
  align-self: flex-start;
  background: linear-gradient(90deg,#8b5cf6,#6d28d9);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139,92,246,0.25);
  margin-bottom: 20px;
}

.app {
  width: 100%;
  max-width: 640px;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

header h1 {
  font-size: 2.2rem;
  color: #e040fb;
  letter-spacing: 2px;
}

.subtitle {
  color: #a098c8;
  font-size: 0.95rem;
  margin-top: 4px;
}

/* List selector */
.list-selector {
  background: rgba(20, 18, 50, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.list-selector label {
  display: block;
  font-size: 0.9rem;
  color: #a098c8;
  margin-bottom: 8px;
}

.list-name-row {
  display: flex;
  gap: 10px;
}

.list-name-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  background: rgba(10, 8, 30, 0.7);
  color: #e0d8f8;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.list-name-row input:focus {
  border-color: #8b5cf6;
}

.list-name-row input::placeholder {
  color: #605888;
}

.list-name-row button {
  padding: 10px 20px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}

.list-name-row button:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Lists area */
.lists-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  text-align: center;
  color: #605888;
  font-size: 1rem;
  padding: 40px 0;
}

/* List card */
.list-card {
  background: rgba(20, 18, 50, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 14px;
  overflow: hidden;
}

.list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}

.list-card-header h3 {
  font-size: 1.05rem;
  color: #e8e0ff;
}

.list-card-header .list-count {
  font-size: 0.8rem;
  color: #8070b0;
}

.delete-list-btn {
  background: none;
  border: none;
  color: #8070b0;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 6px;
  transition: color 0.15s;
}

.delete-list-btn:hover {
  color: #ff6b6b;
}

/* Items area */
.list-items {
  padding: 10px 18px 14px;
}

.add-item-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.add-item-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  background: rgba(10, 8, 30, 0.5);
  color: #e0d8f8;
  font-size: 0.9rem;
  outline: none;
}

.add-item-row input:focus {
  border-color: #8b5cf6;
}

.add-item-row input::placeholder {
  color: #504878;
}

.add-item-row button {
  padding: 8px 14px;
  background: linear-gradient(135deg, #06d6a0, #05b888);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s;
}

.add-item-row button:hover {
  transform: scale(1.05);
}

.item-list {
  list-style: none;
}

.item-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.07);
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.item-list li .item-check {
  width: 18px;
  height: 18px;
  accent-color: #06d6a0;
  cursor: pointer;
  flex-shrink: 0;
}

.item-list li .item-text {
  flex: 1;
  font-size: 0.92rem;
  color: #e0d8f8;
  word-break: break-word;
}

.item-list li .item-text.done {
  text-decoration: line-through;
  color: #605888;
}

.item-list li .delete-item-btn {
  background: none;
  border: none;
  color: #605888;
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.item-list li .delete-item-btn:hover {
  color: #ff6b6b;
}

/* Responsive */
@media (max-width: 500px) {
  .list-name-row {
    flex-direction: column;
  }
  .app { padding: 0 4px; }
}
