/* Daily Streak System Styling */
/* Gamified retention mechanic - users come back daily */

.streak-badge {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.streak-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak-icon {
  font-size: 24px;
  animation: flameFlicker 2s ease-in-out infinite;
}

.streak-number {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.streak-label {
  font-size: 12px;
  opacity: 0.9;
  white-space: nowrap;
}

/* Popup animations */
.streak-popup {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

.streak-popup.show {
  top: 100px;
}

.streak-popup-content {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  color: white;
  padding: 24px 40px;
  border-radius: 20px;
  box-shadow: 
    0 20px 60px rgba(255, 107, 107, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  text-align: center;
  min-width: 300px;
}

.streak-popup.record .streak-popup-content {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  box-shadow: 0 20px 60px rgba(255, 215, 0, 0.6);
}

.streak-popup.broken .streak-popup-content {
  background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
  box-shadow: 0 20px 60px rgba(107, 114, 128, 0.4);
}

.streak-popup-icon {
  font-size: 56px;
  margin-bottom: 12px;
  animation: iconBounce 0.8s ease infinite;
}

.streak-popup-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

.streak-popup-message {
  font-size: 15px;
  opacity: 0.95;
  font-weight: 500;
}

/* Modal for streak details */
.streak-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.streak-modal-content {
  background: white;
  padding: 40px;
  border-radius: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: slideUp 0.3s ease;
}

.streak-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 32px;
  color: #9CA3AF;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.streak-modal-close:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.streak-modal h2 {
  font-size: 32px;
  margin: 0 0 32px 0;
  text-align: center;
  color: #1F2937;
}

.streak-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.streak-stat {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  border-radius: 16px;
  border: 2px solid #E5E7EB;
}

.streak-stat-number {
  font-size: 36px;
  font-weight: 800;
  color: #FF6B6B;
  margin-bottom: 8px;
  line-height: 1;
}

.streak-stat-label {
  font-size: 13px;
  color: #6B7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.streak-modal-message {
  text-align: center;
  color: #6B7280;
  font-size: 15px;
  margin: 0;
}

/* Animations */
@keyframes flameFlicker {
  0%, 100% {
    transform: scale(1) rotate(-5deg);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.2);
  }
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.05);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive */
@media (max-width: 640px) {
  .streak-badge {
    top: 12px !important;
    right: 12px !important;
    padding: 10px 16px !important;
  }
  
  .streak-icon {
    font-size: 20px;
  }
  
  .streak-number {
    font-size: 18px;
  }
  
  .streak-label {
    font-size: 11px;
  }
  
  .streak-popup.show {
    top: 80px;
  }
  
  .streak-popup-content {
    padding: 20px 32px;
    min-width: 260px;
  }
  
  .streak-popup-title {
    font-size: 20px;
  }
  
  .streak-modal-content {
    padding: 32px 24px;
  }
  
  .streak-modal h2 {
    font-size: 26px;
  }
  
  .streak-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .streak-stat {
    padding: 16px;
  }
  
  .streak-stat-number {
    font-size: 32px;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .streak-modal-content {
    background: #1F2937;
    color: white;
  }
  
  .streak-modal h2 {
    color: white;
  }
  
  .streak-stat {
    background: linear-gradient(135deg, #374151 0%, #2D3748 100%);
    border-color: #4B5563;
  }
  
  .streak-stat-label {
    color: #9CA3AF;
  }
  
  .streak-modal-message {
    color: #D1D5DB;
  }
  
  .streak-modal-close {
    color: #6B7280;
  }
  
  .streak-modal-close:hover {
    background: #374151;
    color: #E5E7EB;
  }
}
