* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

body {
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  padding-top: 50px;
  padding-bottom: 50px;
}

.container {
  width: 100%;
  max-width: 500px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin: 0 15px;
}

h1 {
  text-align: center;
  color: #4a4a4a;
  margin-bottom: 20px;
}

.todo-input {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  gap: 10px;
  align-items: center;
}

#task-input {
  flex: 1 1 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  min-width: 0;
}

#task-date {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 16px;
  min-width: 0;
}

#priority-select {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 16px;
  min-width: 0;
}

#add-task {
  padding: 10px 15px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  flex: 0 0 auto;
}

h3 {
  margin-bottom: 10px;
  text-align: center;
}

.filters {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-btn {
  margin: 0 5px;
  padding: 5px 10px;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.filter-btn.active {
  background-color: #4caf50;
  color: white;
  border-color: #4caf50;
}

#task-list {
  list-style-type: none;
  margin-bottom: 20px;
}

/* User Info Container */
.user-info-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #a0a0a0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  gap: 10px;
}

/* Profile Info */
.profile-info {
  flex: 1 1 60%;
}

.profile-info h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #ffffff;
}

.profile-info p {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: 0.9rem;
}

/* Time Info */
.time-info {
  flex: 1 1 40%;
  text-align: right;
  color: #ffffff;
}

#current-date {
  font-weight: bold;
  margin-bottom: 5px;
}

#current-time {
  font-size: 0.9rem;
}

/* Task Items */
.task-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
  position: relative;
  gap: 5px;
}

.task-item-top {
  display: flex;
  width: 100%;
  align-items: center;
}

.task-item-bottom {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

.priority-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

.priority-low {
  background-color: #28a745; /* Green */
}

.priority-medium {
  background-color: #ffc107; /* Yellow */
}

.priority-high {
  background-color: #dc3545; /* Red */
}

.task-text {
  flex-grow: 1;
  margin: 0 10px;
  word-break: break-word;
}

.task-text.completed {
  text-decoration: line-through;
  color: #888;
}

.task-checkbox {
  margin-right: 10px;
}

.task-actions {
  display: flex;
  gap: 5px;
}

.delete-btn, .edit-btn {
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8rem;
}

.delete-btn {
  background-color: #f44336;
}

.edit-btn {
  background-color: #2196F3;
}

.priority-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-right: 10px;
  color: white;
  font-weight: bold;
}

.low {
  background-color: #28a745;
}

.medium {
  background-color: #ffc107;
  color: #333;
}

.high {
  background-color: #dc3545;
}

.todo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#clear-completed {
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
}

/* Edit modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-modal {
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.save-btn {
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 15px;
  cursor: pointer;
}

.cancel-btn {
  background-color: #ccc;
  color: black;
  border: none;
  border-radius: 4px;
  padding: 8px 15px;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .user-info-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .time-info {
    text-align: left;
    margin-top: 10px;
  }
  
  .task-actions {
    margin-top: 5px;
  }
  
  .todo-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
