/* ============================================
   TAREAS DIARIAS - CHILD-FRIENDLY TASK MANAGER
   ============================================ */

/* Hero Section */
.hero-section {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 0;
  opacity: 0.95;
}

.emoji-icon {
  font-size: 3rem;
  display: inline-block;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Progress Dashboard */
.progress-dashboard {
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(240, 147, 251, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(240, 147, 251, 0.4);
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* Tasks Section */
.tasks-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--bs-body-color);
}

.btn-parent {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border: none;
  color: white;
  font-size: 1.25rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
  transition: all 0.3s ease;
}

.btn-parent:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 16px rgba(79, 172, 254, 0.6);
  color: white;
}

/* Tasks Container */
.tasks-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-card {
  background: var(--bs-body-bg);
  border: 3px solid var(--bs-border-color);
  border-radius: 20px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.task-card:hover {
  transform: translateX(5px);
  border-color: #667eea;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.task-card.completed {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  border-color: #4ade80;
  opacity: 0.7;
}

.task-card.completed .task-name {
  text-decoration: line-through;
  opacity: 0.6;
}

.task-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.task-checkbox {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border: 4px solid #cbd5e1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all 0.3s ease;
  background: white;
}

.task-card:hover .task-checkbox {
  border-color: #667eea;
  transform: scale(1.1);
}

.task-card.completed .task-checkbox {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  border-color: #22c55e;
}

.task-info {
  flex: 1;
}

.task-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.task-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-body-color);
  margin-bottom: 0;
  line-height: 1.2;
}

/* Completion Animation */
@keyframes taskComplete {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.task-card.completing {
  animation: taskComplete 0.5s ease;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-body-color);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 1.1rem;
  color: var(--bs-secondary-color);
}

/* Reset Button */
.btn-reset {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  border: none;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(250, 112, 154, 0.4);
  transition: all 0.3s ease;
}

.btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(250, 112, 154, 0.6);
  color: white;
}

/* Celebration Modal */
.celebration-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.celebration-modal.show {
  display: flex;
}

.celebration-content {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  padding: 3rem 2rem;
  border-radius: 30px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: celebrationBounce 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes celebrationBounce {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.celebration-stars {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: starRotate 2s infinite;
}

@keyframes starRotate {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-10deg);
  }

  75% {
    transform: rotate(10deg);
  }
}

.celebration-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.celebration-message {
  font-size: 1.25rem;
  color: white;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.btn-celebration {
  background: white;
  color: #f5576c;
  border: none;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 1rem 3rem;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.btn-celebration:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  color: #f5576c;
}

/* Parent Mode Modal */
.pin-input {
  font-size: 2rem;
  letter-spacing: 1rem;
  font-weight: 700;
}

/* ========================================
   PARENT CONTROLS - MODERN UX/UI
   ======================================== */

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.section-header i {
  font-size: 1.25rem;
  color: var(--bs-primary);
}

.section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--bs-body-color);
}

.section-description {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

/* Quick Start Templates */
.quick-start-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-radius: 16px;
  padding: 1.5rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.template-card {
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.template-card:hover {
  transform: translateY(-4px);
  border-color: var(--bs-primary);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.template-card:hover::before {
  opacity: 0.1;
}

.template-card:active {
  transform: translateY(-2px);
}

.template-emoji {
  font-size: 2rem;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.template-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bs-body-color);
  z-index: 1;
}

/* Divider */
.parent-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  font-weight: 500;
}

.parent-divider::before,
.parent-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--bs-border-color);
}

.parent-divider span {
  padding: 0 1rem;
}

/* Task Creation Section */
.task-creation-section {
  background: var(--bs-body-bg);
  border: 2px dashed var(--bs-border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Modern Form Groups */
.form-group-modern {
  position: relative;
}

.form-label-modern {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bs-body-color);
  margin-bottom: 0.75rem;
}

.form-label-modern i {
  color: var(--bs-primary);
}

/* Emoji Selector Button */
.emoji-selector-btn {
  width: 100%;
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.emoji-selector-btn:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.emoji-selector-btn:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.selected-emoji {
  font-size: 2.5rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.selector-label {
  flex: 1;
  text-align: left;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  font-weight: 500;
}

.emoji-selector-btn i {
  color: var(--bs-secondary-color);
  transition: transform 0.3s ease;
}

.emoji-selector-btn:hover i {
  transform: translateY(2px);
}

/* Modern Text Input */
.form-control-modern {
  width: 100%;
  border: 2px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.form-control-modern:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control-modern::placeholder {
  color: var(--bs-secondary-color);
  opacity: 0.7;
}

.char-counter {
  position: absolute;
  right: 1rem;
  bottom: -1.5rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

/* Add Task Button */
.btn-add-task {
  width: 100%;
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.btn-add-task:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 222, 128, 0.4);
}

.btn-add-task:active {
  transform: translateY(0);
}

.btn-add-task i {
  font-size: 1.25rem;
}

/* Tasks List Section */
.tasks-list-section {
  background: var(--bs-body-bg);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--bs-border-color);
}

.task-count-badge {
  background: var(--bs-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  margin-left: auto;
}

.parent-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.parent-tasks-list::-webkit-scrollbar {
  width: 6px;
}

.parent-tasks-list::-webkit-scrollbar-track {
  background: transparent;
}

.parent-tasks-list::-webkit-scrollbar-thumb {
  background: var(--bs-border-color);
  border-radius: 3px;
}

.parent-tasks-list::-webkit-scrollbar-thumb:hover {
  background: var(--bs-secondary-color);
}

.parent-task-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.parent-task-item:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.parent-task-emoji {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.parent-task-name {
  flex: 1;
  font-weight: 600;
  color: var(--bs-body-color);
  margin: 0;
  word-break: break-word;
}

.btn-delete-task {
  background: transparent;
  border: 1px solid var(--bs-border-color);
  color: var(--bs-danger);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-delete-task:hover {
  background: var(--bs-danger);
  color: white;
  border-color: var(--bs-danger);
  transform: scale(1.05);
}

.empty-tasks-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--bs-secondary-color);
}

.empty-tasks-message i {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 1rem;
  display: block;
}

.empty-tasks-message p {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-tasks-message small {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Advanced Options */
.advanced-options {
  border-top: 1px solid var(--bs-border-color);
  padding-top: 1rem;
}

.options-toggle {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.options-toggle:hover {
  color: var(--bs-primary);
}

.options-toggle i:first-child {
  font-size: 1rem;
}

.options-toggle span {
  flex: 1;
  text-align: left;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.options-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.options-content {
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--bs-body-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.option-title i {
  color: var(--bs-primary);
}

.option-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-option {
  flex: 1;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  color: var(--bs-body-color);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-option:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  background: rgba(102, 126, 234, 0.05);
}

.btn-option-secondary {
  width: 100%;
  background: transparent;
  border: 1px solid var(--bs-border-color);
  color: var(--bs-body-color);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-option-secondary:hover {
  border-color: var(--bs-warning);
  color: var(--bs-warning);
  background: rgba(255, 193, 7, 0.05);
}

/* Emoji Input Wrapper - Legacy Support */
.emoji-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.emoji-input-wrapper input {
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.emoji-input-wrapper button {
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  font-size: 1.25rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
}

/* Emoji Picker Container */
.emoji-picker-container {
  position: relative;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  padding: 1rem;
  margin-top: 0.75rem;
}

.emoji-picker-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.emoji-category {
  margin-bottom: 0.5rem;
}

.emoji-category-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.25rem;
}

.emoji-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.emoji-btn:hover {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.emoji-btn:active {
  transform: scale(1.1);
}

/* Scrollbar styling for emoji picker */
.emoji-picker-container::-webkit-scrollbar {
  width: 8px;
}

.emoji-picker-container::-webkit-scrollbar-track {
  background: var(--bs-body-bg);
  border-radius: 4px;
}

.emoji-picker-container::-webkit-scrollbar-thumb {
  background: var(--bs-border-color);
  border-radius: 4px;
}

.emoji-picker-container::-webkit-scrollbar-thumb:hover {
  background: var(--bs-secondary-color);
}

#parentTasksList .list-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.parent-task-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.parent-task-emoji {
  font-size: 1.5rem;
}

.parent-task-name {
  font-weight: 600;
  margin: 0;
}

.btn-delete-task {
  background: #ef4444;
  border: none;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.btn-delete-task:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* QR Camera */
.qr-camera-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

#qrVideo {
  width: 100%;
  height: auto;
  display: block;
}

#qrCodeContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 256px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .emoji-icon {
    font-size: 2rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .task-checkbox {
    width: 50px;
    height: 50px;
    min-width: 50px;
    font-size: 1.5rem;
  }

  .task-emoji {
    font-size: 2rem;
  }

  .task-name {
    font-size: 1.25rem;
  }

  .celebration-title {
    font-size: 2rem;
  }

  .celebration-stars {
    font-size: 4rem;
  }

  .emoji-grid {
    grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
  }

  .emoji-btn {
    width: 35px;
    height: 35px;
    font-size: 1.25rem;
  }

  .emoji-picker-container {
    max-height: 250px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .task-checkbox {
    background: var(--bs-dark);
    border-color: var(--bs-border-color);
  }

  .task-card.completed .task-checkbox {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  }

  .emoji-picker-container {
    background: var(--bs-dark);
    border-color: var(--bs-border-color);
  }

  .emoji-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: var(--bs-primary);
  }
}