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

body {
  background: linear-gradient(to bottom, #1e1e2f, #12121c);
  color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

header {
  margin-bottom: 30px;
  text-align: center;
}

header h1 {
  color: #9b5de5;
  font-size: 2.2rem;
}

.timer-container {
  background-color: #2b2b3f;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  height: 300px;
}

.mode-buttons,
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.mode-buttons {
  margin-bottom: 20px;
}

.controls {
  margin-top: 30px;
}

.mode-buttons button,
.controls button {
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  background-color: #9a5de53b;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.mode-buttons button.active,
.mode-buttons button:hover,
.controls button:hover {
  background-color: #9b5de5;
}

.controls button.disable {
  background-color: #505050;
  pointer-events: none;
  opacity: 0.5;
}

.timer span {
  font-size: 5rem;
  color: #00f5d4;
  font-weight: bold;
}

main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin-top: 20px;
}

aside,
section.tasks {
  background-color: #232334;
  padding: 20px;
  border-radius: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

aside #new-folder {
  margin-bottom: 20px;
}

ul {
  list-style: none;
  flex-grow: 1;
  overflow-y: auto;
  padding-left: 0;
}

li.folder-item {
  padding: 5px 10px;
  border-radius: 6px;
  margin-bottom: 5px;
  background-color: transparent;
  transition: background 0.2s;
}

li.folder-item:hover{
  background-color: #3f3f5fa1;
}

li.folder-item.active {
  background-color: #3f3f5f;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.folder-toggle {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  transition: transform 0.2s ease;
}

.folder-toggle.open i {
  transform: rotate(90deg);
  color: #00f5d4;
}

.folder-name {
  color: #fff;
  flex: 1;
  user-select: none;
}

.actions i {
  margin-left: 10px;
  cursor: pointer;
  color: #ccc;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.actions i:hover {
  color: #fff;
}

ul.subfolders {
  display: none;
}


ul.subfolders.open {
  display: block;
}

#task-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
}

#task-form {
  display: none;
  margin-bottom: 15px;
}

input[type="text"] {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background-color: #2e2e3f;
  color: white;
  width: 70%;
  margin-right: 10px;
}

input[type="text"]:focus {
  outline: 1px solid #00f5d4;
}

button.add {
  background-color: #00bbf9af;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button.add:hover {
  background-color: #00bbf9;
}

#task-list li {
  background-color: #2e2e3f;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}

li.completed span.task-name {
  text-decoration: line-through;
  color: gray;
}

.task-deadline {
  font-size: 0.8rem;
  color: #aaa;
  margin-left: 10px;
  font-style: italic;
  user-select: none;
}

.priority-alta {
  border-left: 5px solid red;
}

.priority-media {
  border-left: 5px solid orange;
}

.priority-baixa {
  border-left: 5px solid green;
}

.filter-group {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.filter-group button {
  background-color: #3f3f5f;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.filter-group button.active,
.filter-group button:hover {
  background-color: #9b5de5;
}

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

.modal.hidden {
  display: none;
}

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

.modal-content h2 {
  margin-bottom: 15px;
  color: #f5f5f5;
}

.modal-content input[type="date"] {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background-color: #2e2e3f;
  color: white;
  width: 100%;
  margin-bottom: 15px;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-buttons button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  color: white;
}

#confirm-deadline {
  background-color: #00bbf9;
}

#cancel-deadline {
  background-color: #9b5de5;
}

.priority-options {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 10px;
}

.priority-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  color: white;
  transition: background-color 0.3s;
}

.priority-btn[data-priority="alta"] {
  background-color: #e63946; 
}

.priority-btn[data-priority="alta"]:hover {
  background-color: #d62828;
}

.priority-btn[data-priority="media"] {
  background-color: #f4a261; 
}

.priority-btn[data-priority="media"]:hover {
  background-color: #e76f51;
}

.priority-btn[data-priority="baixa"] {
  background-color: #2a9d8f;
}

.priority-btn[data-priority="baixa"]:hover {
  background-color: #21867a;
}

#cancel-priority {
  width: 100%;
  background-color: #9b5de5;
  color: white;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

#cancel-priority:hover {
  background-color: #7a42c8;
}

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

.modal.hidden {
  display: none;
}

.modal-content {
  background: #232334;
  padding: 20px 30px;
  border-radius: 12px;
  width: 320px;
  max-width: 90vw;
  text-align: center;
  color: #f5f5f5;
}

.modal-content h2 {
  margin-bottom: 15px;
  font-weight: 600;
}

.modal-content input[type="text"],
.modal-content input[type="date"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background-color: #2e2e3f;
  color: white;
  font-size: 1rem;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.modal-buttons button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  color: white;
  background-color: #9b5de5;
}

.modal-buttons button:hover {
  background-color: #7a42c8;
}

.priority-options {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 10px;
}

.priority-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  color: white;
  transition: background-color 0.3s;
}

.priority-btn[data-priority="alta"] {
  background-color: #e63946;
}

.priority-btn[data-priority="alta"]:hover {
  background-color: #d62828;
}

.priority-btn[data-priority="media"] {
  background-color: #f4a261; 
}

.priority-btn[data-priority="media"]:hover {
  background-color: #e76f51;
}

.priority-btn[data-priority="baixa"] {
  background-color: #2a9d8f;
}

.priority-btn[data-priority="baixa"]:hover {
  background-color: #21867a;
}

#cancel-priority {
  width: 100%;
  background-color: #9b5de5;
  color: white;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

#cancel-priority:hover {
  background-color: #7a42c8;
}

@media (min-width: 768px) {
  main {
    flex-direction: row;
  }
}

/* Timer flash animation */
@keyframes flash {
  0%, 100% { background-color: #2b2b3f; }
  50% { background-color: #ff006e; }
}

.timer-flash {
  animation: flash 1s ease;
}

