:root {
  --primary: #4a6fa5;
  --primary-dark: #3a5a8a;
  --secondary: #6c757d;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --light: #f8f9fa;
  --dark: #343a40;
  --white: #ffffff;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: #f5f7fa;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.app-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-light);
}

.app-header h1 {
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.subtitle {
  color: var(--gray);
  font-size: 1rem;
}

.task-creator {
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group input,
.input-group select {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.task-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.task-list {
  flex: 1;
  margin-bottom: 20px;
}

#taskContainer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item {
  background-color: var(--white);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.task-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.task-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.task-name {
  flex: 1;
  word-break: break-word;
}

.task-name.completed {
  text-decoration: line-through;
  color: var(--gray);
}

.task-priority {
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.priority-high {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger);
}

.priority-medium {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--warning);
}

.priority-low {
  background-color: rgba(23, 162, 184, 0.1);
  color: var(--info);
}

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

.btn {
  padding: 10px 15px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn:hover {
  opacity: 0.9;
}

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

.btn.primary:hover {
  background-color: var(--primary-dark);
}

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

.btn.success {
  background-color: var(--success);
  color: var(--white);
}

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

.btn.filter {
  background-color: transparent;
  color: var(--gray);
  border: 1px solid var(--gray-light);
}

.btn.filter.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-icon {
  padding: 8px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  padding: 15px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer Styles */
.site-footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
}

.brand-logo i {
  font-size: 1.5rem;
}

.copyright small {
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.3s;
}

.footer-link:hover {
  opacity: 0.8;
}

.footer-link i {
  font-size: 1.2rem;
}

.footer-credits {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.credits-content {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.credits-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

.developer-name {
  font-weight: bold;
  margin-top: 0.2rem;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-credits {
    align-items: center;
  }

  .credits-content {
    text-align: center;
  }
}

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

.modal-content {
  background-color: var(--white);
  margin: 10% auto;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: modalopen 0.3s;
}

@keyframes modalopen {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 1.5rem;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--dark);
}

.modal h3 {
  margin-bottom: 20px;
  color: var(--primary);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.modal-input, .modal-select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Checkbox personalizado */
.task-checkbox-container {
  display: block;
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  user-select: none;
}

.task-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 4px;
}

.task-checkbox-container:hover input ~ .checkmark {
  background-color: var(--gray-light);
}

.task-checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.task-checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.task-checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
