@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  --primary-color: #4a90e2;
  --secondary-color: #50e3c2;
  --danger-color: #e94e77;
  --background-color: #f5f7fa;
  --text-color: #34495e;
  --border-radius: 8px;
  --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
}

.container {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  max-width: 600px;
  margin: 40px auto;
}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-weight: 500;
}

.input-container {
  display: flex;
  margin-bottom: 1rem;
}

#taskInput,
.edit-input,
.subtask-input {
  flex-grow: 1;
  padding: 0.75rem;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size: 1rem;
}

#addButton,
.add-subtask-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

#addButton:hover,
.add-subtask-btn:hover {
  background-color: #357ab8;
}

ul {
  list-style-type: none;
  padding: 0;
}

.task,
.subtask {
  background-color: #fff;
  margin: 0.75rem 0;
  padding: 1rem;
  border-radius: var(--border-radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--box-shadow);
  transition: box-shadow 0.3s ease;
}

.task:hover,
.subtask:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.subtask {
  display: flex;
  background-color: #f8f9fb;
  flex-direction: column;
  align-items: start;
}

.task-text,
.subtask-text {
  flex-grow: 1;
  margin-right: 0.5rem;
}

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

.task-actions,
.subtask-actions {
  display: flex;
  gap: 0.5rem;
}

.subtask-actions {
  margin-top: 1rem;
  width: 100%;
  justify-content: end;
}

.task-actions button,
.subtask-actions button {
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  transition: background-color 0.3s ease;
}

.completeButton {
  background-color: var(--secondary-color);
}

.completeButton:hover {
  background-color: #3ebd98;
}

.editButton {
  background-color: var(--primary-color);
}

.editButton:hover {
  background-color: #357ab8;
}

.removeButton {
  background-color: var(--danger-color);
}

.removeButton:hover {
  background-color: #d4426d;
}

.subtasks-container {
  margin-top: 0.5rem;
}

.add-subtask-container {
  display: flex;
  margin-top: 1rem;
}

footer {
  background-color: #2c3e50;
  color: white;
  padding: 2rem 0;
  text-align: center;
}

footer .footer-container {
  display: flex;
  flex-direction: column;
}

footer h3 {
  color: #ecf0f1;
  margin-bottom: 1rem;
}

footer p,
footer a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
  margin: 0.5rem 0;
}

footer a:hover {
  color: #ecf0f1;
}

footer .social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

footer .social-icons a {
  color: #bdc3c7;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

footer .social-icons a:hover {
  color: #ecf0f1;
}

.footer-logo {
  font-size: 2rem;
  font-weight: bold;
  color: #ecf0f1;
}
