* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.habit-form {
  display: flex;
  margin-bottom: 30px;
}

#habit-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 16px;
}

#add-habit {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

#add-habit:hover {
  background-color: #2980b9;
}

.habits-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.calendar-header {
  display: flex;
  background-color: #2c3e50;
  color: white;
  padding: 15px;
}

.habit-name {
  flex: 1;
  font-weight: bold;
}

.days-container {
  display: flex;
  flex: 2;
}

.day {
  flex: 1;
  text-align: center;
}

.habit-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.habit-title {
  flex: 1;
  font-weight: 500;
}

.habit-days {
  display: flex;
  flex: 2;
}

.day-check {
  flex: 1;
  text-align: center;
}

.day-check input {
  cursor: pointer;
}

.delete-btn {
  margin-left: 15px;
  color: #e74c3c;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 16px;
}

.stats {
  margin-top: 40px;
  text-align: center;
}

.stats h2 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.stat-card {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 150px;
}

.stat-card h3 {
  color: #7f8c8d;
  font-size: 16px;
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
}

@media (max-width: 768px) {
  .habit-form {
    flex-direction: column;
  }

  #habit-input {
    border-radius: 4px;
    margin-bottom: 10px;
  }

  #add-habit {
    border-radius: 4px;
  }

  .calendar-header {
    flex-direction: column;
  }

  .habit-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .habit-title {
    margin-bottom: 10px;
  }

  .stats-container {
    flex-direction: column;
    align-items: center;
  }
}
