* {
    margin: 0;
    padding: 0;
    font-family: 'Times New Roman', Times, serif;
}

h1, h3 {
    padding: 20px;
    text-align: center;
}

#projects h2, #todos h2 {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    font-weight: bold;
    text-align: center;
    text-decoration: underline;
}


div {
    margin: 5px
}

#main-app {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 20px;
}

#projects, #todos {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    min-height: 300px;
}

.todo-item {
    cursor: pointer;
}

.active-project-item {
    padding: 10px;
    background-color: #1976d2;
    color: white;
    font-weight: bold;
}

.priority {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.priority-low {
  color: green;
}

.priority-medium {
  color: orange;
}

.priority-high {
  color: red;
}

button {
    padding: 10px 20px;
    margin: 5px;
    color: black;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#add-project-btn {
    background-color: aqua;
}

#add-todo-button {
    background-color: aquamarine;
}

#update-todo {
    background-color: #28a745;
    color: white;
}

#cancel-modal {
    background-color: #dc3545;
    color: white;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  color: #333;
  user-select: none;
}

.checkbox-label input {
  display: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #666;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-label input:checked + .custom-checkbox {
  background-color: #4caf50;
  border-color: #4caf50;
}

.checkbox-label input:checked + .custom-checkbox::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.project-item {
    padding: 10px;
    margin: 5px 0;
    background-color: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
}

.project-item:hover {
    background-color: #d0e6ff;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin: 4px 0;
    border-bottom: 1px solid #ccc;
}

.todo-details p {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.todo-details strong {
    color: #333;
}

.edit-button-item {
    background-color: #ffc107;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-button-item {
    background-color: #dc3545;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: white;
}

#add-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.view-button-item {
    background-color: #17a2b8;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: white;
}

.modal-overlay {
  position: fixed; left:0; top:0; right:0; bottom:0;
  background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}

.modal-overlay.hidden { 
    display: none; 
}
.modal {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  min-width: 320px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
#modal-form input, #modal-form textarea, #modal-form select {
  margin-bottom: 1rem;
  width: 100%;
  padding: .6em;
  font-size: 1rem;
}
.modal-buttons {
  display: flex; gap: 1em; justify-content: flex-end;
}

@media (max-width: 700px) {
    #main-app {
        flex-direction: column;
    }
}

.todo-item.completed span {
    text-decoration: line-through;
    color: #aaa;
}
