/**
 * Daily Missions System Styles
 * Floating badge button + Quest panel
 */

/* ===== MISSIONS BUTTON ===== */

/* Active state (незавършени quests) - GLOW EFFECT */
#daily-missions-btn.has-incomplete {
  animation: missionsPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.8))
          drop-shadow(0 0 16px rgba(192, 132, 252, 0.6));
}

/* Badge counter */
#missions-badge {
  animation: badgePulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.9);
}

/* Badge glow при incomplete */
#missions-badge.incomplete {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  animation: badgeGlowRed 1.5s ease-in-out infinite;
}

/* ===== ANIMATIONS ===== */

/* Pulse effect за button */
@keyframes missionsPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.8))
            drop-shadow(0 0 16px rgba(192, 132, 252, 0.6));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 1))
            drop-shadow(0 0 35px rgba(192, 132, 252, 0.9))
            drop-shadow(0 0 50px rgba(240, 171, 252, 0.7));
  }
}

/* Badge counter pulse */
@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Red glow за incomplete badge */
@keyframes badgeGlowRed {
  0%, 100% {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  }
  50% {
    box-shadow: 0 0 20px rgba(239, 68, 68, 1),
                0 0 30px rgba(220, 38, 38, 0.8);
  }
}

/* ===== MISSIONS PANEL ===== */

#daily-missions-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: all 0.3s ease-out;
  max-width: 450px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

#daily-missions-panel.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* Panel overlay */
.missions-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.missions-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Panel content */
.missions-content {
  background: linear-gradient(135deg, 
    rgba(31, 31, 58, 0.95) 0%,
    rgba(45, 27, 78, 0.95) 100%);
  border: 2px solid rgba(168, 85, 247, 0.5);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(168, 85, 247, 0.3),
    inset 0 0 20px rgba(168, 85, 247, 0.1);
}

/* Header */
.missions-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
}

.missions-title {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #a855f7, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.missions-timer {
  color: #e9d5ff;
  font-size: 0.9rem;
}

/* Quest list */
.quest-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Individual quest */
.quest-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.quest-item:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.5);
}

/* Completed quest */
.quest-item.completed {
  opacity: 0.6;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Quest checkbox */
.quest-checkbox {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Quest text */
.quest-text {
  flex: 1;
  color: #e9d5ff;
  font-size: 0.9rem;
}

.quest-title {
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
}

.quest-progress {
  font-size: 0.8rem;
  color: #c084fc;
}

/* Quest reward */
.quest-reward {
  color: #fbbf24;
  font-weight: bold;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Progress bar */
.missions-progress {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(168, 85, 247, 0.3);
}

.progress-label {
  color: #e9d5ff;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.progress-bar-container {
  width: 100%;
  height: 20px;
  background: linear-gradient(to right, 
    rgba(88, 28, 135, 0.3), 
    rgba(107, 33, 168, 0.3)
  );
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    #a855f7,
    #c084fc,
    #e9d5ff,
    #c084fc,
    #a855f7
  );
  background-size: 200% 100%;
  border-radius: 10px;
  box-shadow: 
    0 0 10px rgba(168, 85, 247, 0.8),
    0 0 20px rgba(192, 132, 252, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transition: width 0.5s ease-out;
  animation: liquidFlow 3s linear infinite;
}

/* Completion bonus */
.completion-bonus {
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, 
    rgba(168, 85, 247, 0.2),
    rgba(236, 72, 153, 0.2)
  );
  border: 2px solid rgba(251, 191, 36, 0.5);
  border-radius: 12px;
  text-align: center;
}

.bonus-title {
  color: #fbbf24;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.bonus-rewards {
  color: #e9d5ff;
  font-size: 0.85rem;
}

/* Completion bonus claimed */
.completion-bonus.claimed {
  background: linear-gradient(135deg, 
    rgba(16, 185, 129, 0.2),
    rgba(5, 150, 105, 0.2)
  );
  border-color: rgba(16, 185, 129, 0.5);
}

/* Close button */
.missions-close-btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.missions-close-btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(168, 85, 247, 0.5);
}

/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 640px) {
  .missions-content {
    padding: 1rem;
  }
  
  .missions-title {
    font-size: 1.25rem;
  }
  
  .quest-item {
    padding: 0.5rem;
  }
  
  .quest-text {
    font-size: 0.8rem;
  }
  
  .quest-reward {
    font-size: 0.75rem;
  }
}
