
body {
  font-family: Arial, sans-serif;
  margin: 0;
  
  background-color: #f5f1eb;
  color: #222;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background-color: #1a1a1a;
  color: #f9f9f9;
}

.app {
  padding: 1rem;
  text-align: center;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2.5rem;
  margin: 0.5rem 0;
  text-align: center;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* Soft divider line between title and instructions */
header::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(139, 125, 107, 0.3), transparent);
}

body.dark header::after {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

#instructions {
  margin: 1rem auto;
  max-width: 600px;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  font-size: 1rem;
}

body.dark #instructions {
  background: rgba(0, 0, 0, 0.4);
}

.xp-tracker {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === Habit Container Layout === */
#habit-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-content: center;
  margin-top: 2rem;
  gap: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

/* === Category Cards Colors === */
.category-card.health {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  border-left: 4px solid #9c27b0;
}

.category-card.productivity {
  background: linear-gradient(135deg, #e0f2f1, #b2dfdb);
  border-left: 4px solid #00695c;
}

.category-card.learning {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-left: 4px solid #1976d2;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Dark mode adjustments */
body.dark .category-card.health {
  background: linear-gradient(135deg, #4a148c, #6a1b9a);
  color: #fff;
}

body.dark .category-card.productivity {
  background: linear-gradient(135deg, #004d40, #00695c);
  color: #fff;
}

body.dark .category-card.learning {
  background: linear-gradient(135deg, #0d47a1, #1565c0);
  color: #fff;
}

/* === Badges Styling === */
#badges {
  margin: 2rem auto;
  max-width: 600px;
  text-align: center;
}

.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
  align-items: center;
}

.badge-card {
  padding: 1rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
  text-align: center;
  width: 150px;
  flex-shrink: 0;
}

.badge-card.locked {
  opacity: 0.5;
  background: #f5f5f5;
}

body.dark .badge-card {
  background: #2a2a2a;

}
.category-section.productivity .habit-chip.active {
  background: #009688;
  color: #fff;
  border-color: #009688;
}


body.dark .badge-card.locked {
  background: #1a1a1a;
}

.badge-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.badge-label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

.badge-status {
  font-size: 0.8rem;
  color: #666;
}

body.dark .badge-status {
  color: #aaa;
}

.badge-description {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

body.dark .badge-description {
  color: #ccc;
}

/* === Category Cards Styling === */
.category-card {
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.15);
  background: #fff;
  transition: all 0.3s;
  min-height: 220px;
  max-width: 350px;
  width: 100%;
}

body.dark .category-card {
  background: #2a2a2a;
}

.category-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  text-align: center;
}

.habits {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* === Habit Buttons === */
.habit-btn {
  display: block;
  margin: 0.4rem auto;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  min-width: 200px;
}

.habit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.habit-btn.active {
  background: #4caf50;
  color: #fff;
  border-color: #4caf50;
  transform: scale(1.02);
}

body.dark .habit-btn {
  background: #333;
  color: #eee;
  border-color: #555;
}

body.dark .habit-btn.active {
  background: #4caf50;
  color: #fff;
}

/* === Notifications === */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #4caf50;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}
