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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", sans-serif;
  background: #f4f6f9;
  min-height: 100vh;
  padding: 16px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

header {
  background: #3a7bd5;
  color: white;
  border-radius: 12px;
  padding: 20px 20px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(58, 123, 213, 0.3);
}

header h1 {
  font-size: 1.3rem;
  font-weight: 700;
}

.subtitle {
  font-size: 0.85rem;
  margin-top: 4px;
  opacity: 0.85;
}

.add-section {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.input-row {
  display: flex;
  gap: 8px;
}

#item-input {
  flex: 1;
  border: 2px solid #e0e6ef;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

#item-input:focus {
  border-color: #3a7bd5;
}

#add-btn {
  background: #3a7bd5;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

#add-btn:hover {
  background: #2d65bc;
}

.list-section {
  background: white;
  border-radius: 12px;
  padding: 8px 0;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  min-height: 60px;
}

#checklist {
  list-style: none;
}

.check-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f3f8;
  gap: 12px;
  transition: background 0.15s;
}

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

.check-item:hover {
  background: #f7f9fc;
}

.check-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #3a7bd5;
  cursor: pointer;
  flex-shrink: 0;
}

.item-label {
  flex: 1;
  font-size: 1rem;
  cursor: pointer;
  word-break: break-all;
  transition: color 0.2s;
}

.check-item.checked .item-label {
  text-decoration: line-through;
  color: #aaa;
}

.delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.delete-btn:hover {
  color: #e74c3c;
  background: #ffeaea;
}

.empty-msg {
  text-align: center;
  color: #bbb;
  font-size: 0.9rem;
  padding: 24px 16px;
  display: none;
}

.action-section {
  display: flex;
  gap: 8px;
}

#reset-btn,
#clear-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

#reset-btn {
  background: #e8f0fd;
  color: #3a7bd5;
}

#reset-btn:hover {
  background: #d0e2f8;
}

#clear-btn {
  background: #fdecea;
  color: #e74c3c;
}

#clear-btn:hover {
  background: #fad5d1;
}

@media (max-width: 400px) {
  header h1 {
    font-size: 1.1rem;
  }

  .action-section {
    flex-direction: column;
  }
}
