* {
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f9fc;
}

.app-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 500px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.date-wrapper {
  position: relative;
}

.date-wrapper input[type="date"] {
  width: 42px;
  padding: 10px;
  opacity: 0;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.date-wrapper i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #e3f2fd;
  border-radius: 10px;
  color: #555;
  pointer-events: none;
}

.glass {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 20px;
}

.app-title {
  margin-bottom: 15px;
  font-weight: 600;
}

.task-form {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

/* Specific colors for task text based on priority */
.task-text.high {
  color: #ff4d4d;
  font-weight: 500; /* Optional: make high priority slightly bolder */
}

.task-text.medium {
  color: #ffa500; /* A slightly darker orange for better readability on white */
}

.task-text.low {
  color: #3399ff;
}

.task-text.none {
  color: #333; /* Standard dark grey/black */
}

/* Ensure the strike-through still looks okay */
.taskItem.completed .task-text {
  text-decoration: line-through;
  color: #aaa !important; /* Force a light grey when finished */
  opacity: 0.6;
}

.task-form input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.icon-btn,
.add-btn {
  border: none;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  background: #e3f2fd;
}

.icon-btn.high i {
  color: #ff4d4d;
}
.icon-btn.medium i {
  color: #ffcc00;
}
.icon-btn.low i {
  color: #3399ff;
}

.catContainer {
  margin-bottom: 20px;
}

.catContainer:not(:last-child) {
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 10px;
}

.catContainer h3 {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #555;
}

.taskList {
  list-style: none;
  padding: 0;
}

.taskItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.taskItem.completed span {
  text-decoration: line-through;
  opacity: 0.6;
}

.taskItem button {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
}

#priorityModal {
  position: absolute;
  margin: 0;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 15px; /* Added padding to give the X some room */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 160px;
}

/* Close Button Styling */
.close-btn {
  position: absolute;
  top: 5px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1rem;
  color: #888;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
}

.close-btn:hover {
  color: #ff4d4d; /* Changes to red on hover */
}

/* Optional: Make the backdrop invisible so it doesn't block clicks */
#priorityModal::backdrop {
  background: transparent;
}

.priority-options input {
  display: none;
}

.priority-options i {
  font-size: 1.4rem;
  padding: 8px;
  cursor: pointer;
}

.priority-options .high {
  color: #ff4d4d;
}
.priority-options .medium {
  color: #ffcc00;
}
.priority-options .low {
  color: #3399ff;
}
.priority-options .none {
  color: #ccc;
}
