/* Goals Overview Page Styles */

/* Animations */
@keyframes celebrate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes confetti-fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(10px) rotate(360deg); opacity: 0; }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3),
                0 0 40px rgba(40, 167, 69, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(40, 167, 69, 0.5),
                0 0 60px rgba(40, 167, 69, 0.2);
  }
}

/* Goals Header */
.goals-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #a855f7 100%);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.25);
}

.goals-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}


.goals-header-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.goals-header-icon i {
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.goals-add-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  color: white !important;
  border-radius: 25px !important;
  padding: 0.6rem 1.5rem !important;
  font-weight: 600 !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease !important;
}

.goals-add-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Week Navigation */
.goals-week-nav {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.goals-week-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white !important;
  border: 2px solid #dee2e6 !important;
  color: #495057 !important;
  transition: all 0.3s ease !important;
}

.goals-week-nav-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  border-color: transparent !important;
  color: white !important;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.goals-week-nav-btn:disabled {
  opacity: 0.4;
}

.goals-week-label {
  font-weight: 600;
  color: #2d3748;
  font-size: 1.1rem;
  padding: 0.5rem 1.5rem;
  background: white;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Period Group Section */
.goals-period-section {
  margin-bottom: 2.5rem;
}

.goals-period-header {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.08), transparent);
  border-left: 4px solid;
  border-image: linear-gradient(180deg, #667eea, #764ba2) 1;
  border-radius: 0 8px 8px 0;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.goals-period-header i {
  color: #667eea;
}

/* Goal Cards */
.goal-card {
  border-radius: 16px;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.goal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: background 0.3s ease;
}

.goal-card:hover {
  transform: translateY(-4px);
}

/* In Progress Goal Card */
.goal-card-progress {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.goal-card-progress::before {
  background: linear-gradient(135deg, #a5b4fc, #c4b5fd);
}

.goal-card-progress:hover {
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

/* Achieved Goal Card */
.goal-card-achieved {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  box-shadow:
    0 4px 15px rgba(134, 239, 172, 0.2),
    0 0 0 1px rgba(134, 239, 172, 0.3);
}

.goal-card-achieved::before {
  background: linear-gradient(135deg, #86efac, #6ee7b7);
}

.goal-card-achieved:hover {
  box-shadow:
    0 6px 20px rgba(134, 239, 172, 0.25),
    0 0 0 1px rgba(134, 239, 172, 0.4);
}

/* Goal Card Content */
.goal-card-body {
  padding: 1.25rem;
  position: relative;
  z-index: 1;
}

.goal-card-title {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0;
  font-size: 1rem;
}

.goal-card-achieved .goal-card-title {
  color: #166534;
}

.goal-card-period {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.75rem;
}

/* Achievement Badge */
.goal-achieved-badge {
  background: #86efac !important;
  color: #166534 !important;
  border: none !important;
  font-weight: 600;
  padding: 0.35em 0.75em !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
}

.goal-achieved-badge i {
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

/* Progress Bar */
.goal-progress {
  height: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.goal-progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

.goal-progress-bar-active {
  background: linear-gradient(90deg, #a5b4fc, #c4b5fd);
}

.goal-progress-bar-achieved {
  background: linear-gradient(90deg, #86efac, #6ee7b7);
}

/* Goal Stats */
.goal-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.goal-stats-count {
  color: #495057;
  font-weight: 500;
}

.goal-stats-percentage {
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.goal-stats-percentage-active {
  background: rgba(165, 180, 252, 0.2);
  color: #6366f1;
}

.goal-stats-percentage-achieved {
  background: rgba(134, 239, 172, 0.3);
  color: #166534;
}

/* Celebration Icon for Achieved */
.goal-celebration-icon {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  background: #86efac;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(134, 239, 172, 0.4);
  z-index: 2;
}

.goal-celebration-icon i {
  color: #166534;
}

/* Empty State */
.goals-empty-state {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  border: 2px dashed #dee2e6;
}

.goals-empty-icon {
  width: 100px;
  height: 100px;
  background: rgba(165, 180, 252, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.goals-empty-icon i {
  font-size: 3rem;
  color: #818cf8;
}

.goals-empty-title {
  color: #2d3748;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.goals-empty-text {
  color: #6c757d;
  margin-bottom: 1.5rem;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.goals-empty-btn {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  border: none !important;
  border-radius: 25px !important;
  padding: 0.75rem 2rem !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.goals-empty-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Summary Stats Banner */
.goals-summary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border-radius: 16px;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(10px);
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.goals-summary-stat {
  text-align: center;
}

.goals-summary-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.goals-summary-label {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 576px) {
  .goals-header {
    padding: 1.5rem;
    text-align: center;
  }

  .goals-header-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
  }

  .goals-week-nav {
    padding: 0.75rem 1rem;
  }

  .goals-week-label {
    font-size: 0.95rem;
    padding: 0.4rem 1rem;
  }

  .goal-card-body {
    padding: 1rem;
  }

  .goals-summary {
    gap: 1rem;
    justify-content: center;
  }
}
