body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
}

header {
  background: #4CAF50;
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 22px;
}

nav {
  display: flex;
  justify-content: space-around;
  background: #ffffff;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

nav button {
  padding: 10px 15px;
  border: none;
  background: #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}

nav button:hover {
  background: #ccc;
}

.screen {
  display: none;
  padding: 20px;
}

.screen.active {
  display: block;
}

#dayCheckboxes {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 15px 0;
  padding: 12px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 10px;
}

#dayCheckboxes label {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
}

#dayCheckboxes label:hover {
  background: #e8e8e8;
}

#dayCheckboxes input[type="checkbox"] {
  transform: scale(1.4);
  cursor: pointer;
}

#addChoreForm input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

#addChoreForm button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #4CAF50;
  color: white;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#addChoreForm button[type="submit"]:hover {
  background: #43a047;
}

#suggestedChores {
  margin-bottom: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ddd;
}

#suggestedChores h3 {
  margin: 0 0 15px 0;
  color: #4CAF50;
}

.chore-category {
  margin-bottom: 12px;
}

.chore-category h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #666;
}

.chore-category button {
  padding: 6px 12px;
  margin: 3px;
  border: 1px solid #4CAF50;
  background: #fff;
  color: #4CAF50;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
}

.chore-category button:hover {
  background: #4CAF50;
  color: white;
}

.chore-card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chore-card-header {
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chore-avatar {
  font-size: 32px;
}

.chore-name {
  font-size: 20px;
  font-weight: bold;
}

.chore-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chore-info {
  font-size: 16px;
  font-weight: 600;
}

.chore-details {
  font-size: 14px;
  color: #555;
}

.chore-actions {
  display: flex;
  gap: 10px;
}

.completed-by {
  font-size: 12px;
  color: #888;
  font-style: italic;
  margin-left: 5px;
}

body.dark-mode .completed-by {
  color: #aaa;
}

.guidance-card {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.guidance-card h3 {
  margin-top: 0;
  color: #2e7d32;
}

.guidance-card ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.guidance-card li {
  margin-bottom: 8px;
  line-height: 1.5;
}

body.dark-mode .guidance-card {
  background: #1b3a1f;
  border-color: #2e7d32;
}

body.dark-mode .guidance-card h3 {
  color: #81c784;
}

.empty-state {
  text-align: center;
  padding: 30px 20px;
  color: #666;
}

.empty-state p {
  margin: 10px 0;
  line-height: 1.5;
}

body.dark-mode .empty-state {
  color: #aaa;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.green {
  background: green;
}

.red {
  background: red;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.dashboard-card h3 {
  margin-top: 0;
}

.dashboard-header {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dashboard-avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-avatar {
  font-size: 32px;
}

.dashboard-name {
  font-size: 20px;
  font-weight: bold;
}

.dashboard-overdue-badge {
  background: #ff4d4d;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  display: inline-block;
  margin-left: 2px;
}

body.dark-mode .dashboard-name {
  color: #fff;
}

.dashboard-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-card li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
}

.dashboard-card li:last-child {
  border-bottom: none;
}

.household-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.household-item button {
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  background: #fff;
}

.household-item button:hover {
  background: #f0f0f0;
}

.household-item button.active-household {
  background: #4CAF50;
  color: white;
  border-color: #4CAF50;
}

.household-item button.delete-household {
  background: #ff5252;
  color: white;
  border-color: #ff5252;
}

.household-item button.delete-household:hover {
  background: #e04545;
}

#addHouseholdBtn {
  margin-top: 15px;
  padding: 12px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

#addHouseholdBtn:hover {
  background: #43a047;
}

#themeToggleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0;
  padding: 10px 12px;
  background: #f7f7f7;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 16px;
  font-weight: 600;
}

#themeToggleRow input[type="checkbox"] {
  transform: scale(1.3);
  cursor: pointer;
}

body.dark-mode {
  background: #121212;
  color: #f5f5f5;
}

body.dark-mode header {
  background: #1e1e1e;
}

body.dark-mode nav {
  background: #1f1f1f;
  border-bottom-color: #333;
}

body.dark-mode nav button {
  background: #333;
  color: #f5f5f5;
}

body.dark-mode nav button:hover {
  background: #444;
}

body.dark-mode .screen {
  background: #121212;
}

body.dark-mode .chore-card,
body.dark-mode .dashboard-card {
  background: #1e1e1e;
  border-color: #444;
}

body.dark-mode #dayCheckboxes {
  background: #1f1f1f;
  border-color: #444;
}

body.dark-mode #dayCheckboxes label {
  background: #2a2a2a;
  border-color: #444;
  color: #f5f5f5;
}

body.dark-mode #addChoreForm input[type="text"] {
  background: #1f1f1f;
  border-color: #444;
  color: #f5f5f5;
}

body.dark-mode #addChoreForm button[type="submit"] {
  background: #388e3c;
}

body.dark-mode #suggestedChores {
  background: #1e1e1e;
  border-color: #444;
}

body.dark-mode .chore-category {
  background: #1f1f1f;
  border-color: #444;
}

body.dark-mode .chore-category button {
  background: #2a2a2a;
  border-color: #444;
  color: #f5f5f5;
}

body.dark-mode .chore-category button:hover {
  background: #3a3a3a;
}

body.dark-mode #themeToggleRow {
  background: #1f1f1f;
  border-color: #444;
}

body.dark-mode .household-item button {
  background: #2a2a2a;
  border-color: #444;
  color: #f5f5f5;
}

body.dark-mode .household-item button:hover {
  background: #3a3a3a;
}

body.dark-mode .chore-details {
  color: #aaa;
}

body.dark-mode .chore-name {
  color: #fff;
}

body.dark-mode .chore-avatar {
  filter: brightness(1.1);
}

.overdue {
  border: 2px solid red !important;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}

.overdue-badge {
  display: inline-block;
  background: red;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 6px;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.member-item span {
  font-size: 15px;
}

.member-avatar {
  font-size: 24px;
  margin-right: 10px;
}

.member-name {
  font-weight: bold;
  margin-right: 10px;
}

.member-role {
  color: #666;
  font-size: 13px;
}

body.dark-mode .member-role {
  color: #aaa;
}

.member-actions {
  display: flex;
  gap: 8px;
}

.member-actions button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  background: #f4f4f4;
}

.member-actions button:hover {
  background: #e8e8e8;
}

.member-actions button.delete-member {
  background: #ff5252;
  color: white;
  border-color: #ff5252;
}

.member-actions button.delete-member:hover {
  background: #e04545;
}

#addMemberBtn {
  margin-top: 10px;
  padding: 12px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

#addMemberBtn:hover {
  background: #43a047;
}

body.dark-mode .member-item {
  background: #1e1e1e;
  border-color: #444;
}

body.dark-mode .member-actions button {
  background: #2a2a2a;
  border-color: #444;
  color: #f5f5f5;
}

body.dark-mode .member-actions button:hover {
  background: #3a3a3a;
}

#profile-select {
  text-align: center;
  padding: 40px 20px;
}

#profile-select h2 {
  margin-bottom: 30px;
}

#profileList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.profile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 30px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.profile-btn:hover {
  border-color: #4CAF50;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.profile-btn .avatar {
  font-size: 48px;
  margin-bottom: 10px;
}

.profile-btn div:not(.avatar):not(.stars) {
  font-size: 16px;
  font-weight: 500;
}

.stars {
  font-size: 14px;
  margin-top: 4px;
  opacity: 0.9;
}

body.dark-mode .stars {
  color: #fff;
}

body.dark-mode .profile-btn {
  background: #1e1e1e;
  border-color: #444;
  color: #f5f5f5;
}

body.dark-mode .profile-btn:hover {
  border-color: #4CAF50;
}

#switchProfileBtn {
  margin-top: 10px;
  padding: 12px 20px;
  background: #ff9800;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

#switchProfileBtn:hover {
  background: #f57c00;
}

#assignedToWrapper {
  margin: 10px 0;
}

#assignedToWrapper label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

#assignedTo {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

body.dark-mode #assignedTo {
  background: #1e1e1e;
  border-color: #444;
  color: #f5f5f5;
}

#weeklyContainer {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.week-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.dark-mode .week-row {
  background: #222;
}

.week-day-header {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.today-row {
  border: 2px solid #4caf50;
  background: #e8f5e9 !important;
}

body.dark-mode .today-row {
  background: #1b3a1b !important;
  border-color: #4caf50;
}

.week-chore-assigned {
  font-size: 12px;
  color: #666;
}

body.dark-mode .week-chore-assigned {
  color: #aaa;
}

.week-chore-item.completed {
  opacity: 0.6;
  text-decoration: line-through;
}

.week-chore-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f2f2;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

body.dark-mode .week-chore-item {
  background: #333;
}

.week-chore-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-chore-avatar {
  font-size: 20px;
}

.week-chore-name {
  font-weight: bold;
}

.week-due-today {
  background: #ff4d4d;
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  display: inline-block;
}

.modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  text-align: center;
}

.modal-content h3 {
  margin-bottom: 10px;
}

#emojiGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  font-size: 28px;
  margin: 15px 0;
}

#emojiGrid span {
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

#emojiGrid span:hover {
  background: #eee;
}

#closeEmojiPicker {
  padding: 10px 20px;
  border: none;
  background: #f44336;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

#closeEmojiPicker:hover {
  background: #d32f2f;
}

body.dark-mode .modal-content {
  background: #222;
  color: white;
}

body.dark-mode #emojiGrid span:hover {
  background: #444;
}

#incentivesControls {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#incentivesControls button {
  padding: 12px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

#incentivesControls button:hover {
  background: #43a047;
}

#incentivesList {
  margin-top: 20px;
}

.incentive-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 10px;
}

body.dark-mode .incentive-card {
  background: #1e1e1e;
  border-color: #444;
}

.rewardOption {
  margin: 5px;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  background: #f9f9f9;
  font-size: 14px;
}

.rewardOption:hover {
  border-color: #4CAF50;
}

.rewardOption.selected {
  border-color: #4CAF50;
  background: #e8f5e9;
}

body.dark-mode .rewardOption {
  background: #333;
  border-color: #555;
  color: #fff;
}

body.dark-mode .rewardOption.selected {
  background: #2e5c31;
  border-color: #4CAF50;
}

#suggestedRewards {
  margin: 10px 0;
}

#customRewardContainer input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 10px;
  box-sizing: border-box;
}

#rewardGoalInput {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 5px;
  box-sizing: border-box;
}

#incentiveMemberSelect {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 5px;
}

#saveIncentiveBtn {
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
  margin-right: 10px;
}

#closeIncentiveModal {
  padding: 10px 20px;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
}

.progressBar {
  width: 100%;
  background: #ddd;
  border-radius: 8px;
  height: 10px;
  margin-top: 6px;
  overflow: hidden;
}

.progressFill {
  height: 100%;
  background: #4CAF50;
  width: 0%;
  transition: width 0.4s;
}

.incentiveCompleted {
  color: #4CAF50;
  font-weight: bold;
  margin-top: 6px;
}

body.dark-mode .progressBar {
  background: #444;
}

body.dark-mode .progressFill {
  background: #66ff66;
}


@keyframes popupFade {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

