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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
}

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

header {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

header h1 {
  font-size: 1.6rem;
  color: #2e7d32;
  margin-bottom: 4px;
}

.today-label {
  font-size: 0.9rem;
  color: #888;
}

.add-section {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.add-section input {
  flex: 1;
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.add-section input:focus {
  border-color: #43a047;
}

.add-section button {
  padding: 12px 18px;
  background: #43a047;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.add-section button:hover {
  background: #2e7d32;
}

.habits-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.habit-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s;
}

.habit-item.checked {
  background: #e8f5e9;
}

.check-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #43a047;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  color: transparent;
}

.habit-item.checked .check-btn {
  background: #43a047;
  color: #fff;
}

.habit-info {
  flex: 1;
  min-width: 0;
}

.habit-name {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.habit-item.checked .habit-name {
  color: #2e7d32;
}

.habit-streak {
  font-size: 0.82rem;
  color: #888;
  margin-top: 2px;
}

.habit-item.checked .habit-streak {
  color: #43a047;
}

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

.delete-btn:hover {
  color: #e53935;
}

.empty-msg {
  text-align: center;
  color: #aaa;
  font-size: 0.95rem;
  padding: 32px 0;
}

@media (max-width: 400px) {
  header h1 {
    font-size: 1.3rem;
  }
  .add-section input,
  .add-section button {
    font-size: 0.95rem;
    padding: 10px 12px;
  }
}
