/* PUPPY WIDGET - Addictive Gamification Styles */

/* Main widget container - floating in bottom right */
#puppy-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.puppy-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  width: 300px;
  color: white;
  animation: slideIn 0.5s ease-out;
}

.puppy-container.puppy-urgent {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  animation: urgentPulse 2s ease-in-out infinite;
}

/* Minimize button */
.puppy-minimize {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.puppy-minimize:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

/* Puppy display */
.puppy-display {
  text-align: center;
  margin-bottom: 15px;
}

.puppy-emoji {
  font-size: 80px;
  margin: 10px 0;
  animation: float 3s ease-in-out infinite;
}

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

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.puppy-name {
  font-size: 24px;
  font-weight: bold;
  margin: 5px 0;
}

.puppy-stage {
  font-size: 14px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Progress bar */
.puppy-progress {
  margin: 15px 0;
}

.progress-bar {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  height: 30px;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease-out;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.progress-label {
  text-align: center;
  font-size: 11px;
  margin-top: 5px;
  opacity: 0.9;
}

/* Actions */
.puppy-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}

.feed-button {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border: none;
  border-radius: 12px;
  padding: 15px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.feed-button:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.feed-button.pulse {
  animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
  50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(245,87,108,0.5); }
}

.feed-button.disabled {
  background: rgba(255,255,255,0.2);
  cursor: not-allowed;
  animation: none;
}

.subscribe-button {
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  border: none;
  border-radius: 12px;
  padding: 15px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.subscribe-button.glow {
  animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(255,216,155,0.3); }
  50% { box-shadow: 0 6px 30px rgba(255,216,155,0.8); }
}

.subscribe-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255,216,155,0.6);
}

/* Stats */
.puppy-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 15px 0;
  padding: 15px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
}

.stat-label {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 2px;
}

/* Trial warning */
.trial-warning {
  background: rgba(255,200,0,0.2);
  border: 2px solid rgba(255,200,0,0.5);
  border-radius: 10px;
  padding: 12px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: warningPulse 2s ease-in-out infinite;
}

.trial-warning.critical {
  background: rgba(255,0,0,0.2);
  border-color: rgba(255,0,0,0.5);
  animation: criticalPulse 1s ease-in-out infinite;
}

@keyframes warningPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes criticalPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.02); }
}

.warning-icon {
  font-size: 24px;
}

.warning-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.4;
}

/* Message */
.puppy-message {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  opacity: 0.9;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  margin-top: 10px;
}

/* Celebration overlay */
.celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.celebration.hidden {
  display: none;
}

.celebration-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  animation: scaleIn 0.5s ease-out;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.celebration-content.welcome {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.celebration-emoji {
  font-size: 100px;
  margin: 20px 0;
  animation: celebrationBounce 0.6s ease-out;
}

@keyframes celebrationBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.celebration-title {
  font-size: 36px;
  font-weight: bold;
  margin: 20px 0 10px;
  color: #667eea;
}

.celebration-content.welcome .celebration-title {
  color: white;
}

.celebration-subtitle {
  font-size: 24px;
  margin: 10px 0;
  color: #764ba2;
}

.celebration-content.welcome .celebration-subtitle {
  color: rgba(255,255,255,0.9);
}

.celebration-message {
  font-size: 16px;
  line-height: 1.6;
  margin: 20px 0;
  color: #666;
}

.celebration-content.welcome .celebration-message {
  color: rgba(255,255,255,0.9);
}

.celebration-content button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s;
}

.celebration-content.welcome button {
  background: white;
  color: #667eea;
}

.celebration-content button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Floating points animation */
#puppy-points-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

.floating-points {
  position: absolute;
  bottom: 100px;
  right: 180px;
  font-size: 32px;
  font-weight: bold;
  color: #4facfe;
  animation: floatUp 2s ease-out forwards;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

@keyframes floatUp {
  0% { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% { 
    opacity: 0;
    transform: translateY(-100px) scale(1.5);
  }
}

/* Confetti */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #ff0000;
  top: -10px;
  z-index: 9999;
  animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes urgentPulse {
  0%, 100% { 
    box-shadow: 0 10px 40px rgba(255,107,107,0.3);
  }
  50% { 
    box-shadow: 0 15px 60px rgba(255,107,107,0.6);
  }
}

/* Hidden state */
.hidden {
  display: none !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
  #puppy-widget {
    bottom: 10px;
    right: 10px;
  }
  
  .puppy-container {
    width: 280px;
    padding: 15px;
  }
  
  .puppy-emoji {
    font-size: 60px;
  }
  
  .celebration-content {
    margin: 20px;
    padding: 30px 20px;
  }
}
