/* ========================================
   WORKOUT ENHANCEMENTS - PREMIUM CYBERPUNK
   ======================================== */

/* ========================================
   1. NEOMORPHIC CHECKBOXES WITH PROGRESS RINGS
   ======================================== */

.exercise-checkbox-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.set-checkbox-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.set-checkboxes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.exercise-checkbox {
  width: 48px;
  height: 48px;
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Neomorphic base */
.exercise-checkbox::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(20, 20, 30, 0.8), rgba(10, 10, 15, 0.9));
  border-radius: 12px;
  box-shadow: 
    -4px -4px 8px rgba(255, 255, 255, 0.03),
    4px 4px 8px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 107, 53, 0.2);
  transition: all 0.3s ease;
}

/* Progress ring */
.exercise-checkbox::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  padding: 2px;
  background: conic-gradient(
    from 0deg,
    var(--neon-orange) 0%,
    var(--neon-orange) 0%,
    transparent 0%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Hover state */
.exercise-checkbox:hover::before {
  box-shadow: 
    -6px -6px 12px rgba(255, 255, 255, 0.05),
    6px 6px 12px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 107, 53, 0.4),
    0 0 20px rgba(255, 107, 53, 0.2);
  transform: translateY(-2px);
}

.exercise-checkbox:hover::after {
  opacity: 0.3;
  background: conic-gradient(
    from 0deg,
    var(--neon-orange) 0%,
    var(--neon-blue) 100%
  );
}

/* Checked state - pressed inward */
.exercise-checkbox.checked::before {
  background: linear-gradient(145deg, rgba(10, 10, 15, 0.9), rgba(20, 20, 30, 0.8));
  box-shadow: 
    inset 4px 4px 8px rgba(0, 0, 0, 0.6),
    inset -4px -4px 8px rgba(255, 255, 255, 0.02),
    0 0 20px rgba(255, 107, 53, 0.4);
}

.exercise-checkbox.checked::after {
  opacity: 1;
  background: conic-gradient(
    from 0deg,
    var(--neon-orange) 0%,
    var(--neon-blue) 50%,
    var(--neon-purple) 100%
  );
  animation: progressRing 0.6s ease-out forwards;
}

@keyframes progressRing {
  from {
    background: conic-gradient(
      from 0deg,
      var(--neon-orange) 0%,
      transparent 0%
    );
  }
  to {
    background: conic-gradient(
      from 0deg,
      var(--neon-orange) 0%,
      var(--neon-blue) 50%,
      var(--neon-purple) 100%
    );
  }
}

/* Checkmark icon */
.exercise-checkbox .checkbox-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: transparent;
  transition: all 0.3s ease;
  z-index: 1;
}

.exercise-checkbox.checked .checkbox-inner {
  color: var(--neon-orange);
  text-shadow: 0 0 10px var(--neon-orange);
  animation: checkBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* Ripple effect on click */
.exercise-checkbox.ripple::before {
  animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
  0% {
    box-shadow: 
      0 0 0 0 rgba(255, 107, 53, 0.7),
      -4px -4px 8px rgba(255, 255, 255, 0.03),
      4px 4px 8px rgba(0, 0, 0, 0.5);
  }
  100% {
    box-shadow: 
      0 0 0 20px rgba(255, 107, 53, 0),
      -4px -4px 8px rgba(255, 255, 255, 0.03),
      4px 4px 8px rgba(0, 0, 0, 0.5);
  }
}

/* ========================================
   2. PULSATING MUSCLE BADGES WITH ICONS
   ======================================== */

.muscle-highlight-container {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.muscle-highlight-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
  animation: muscleGlow 4s ease-in-out infinite;
}

@keyframes muscleGlow {
  0%, 100% { transform: translate(0, 0); opacity: 0.3; }
  50% { transform: translate(10%, 10%); opacity: 0.6; }
}

.muscle-highlight-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.muscle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.muscle-tag {
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Color coding by muscle group */
.muscle-tag[data-muscle="chest"],
.muscle-tag[data-muscle="triceps"] {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 140, 90, 0.15));
  border: 2px solid rgba(255, 107, 53, 0.4);
  color: #ff8c5a;
}

.muscle-tag[data-muscle="back"],
.muscle-tag[data-muscle="biceps"] {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.15));
  border: 2px solid rgba(102, 126, 234, 0.4);
  color: #667eea;
}

.muscle-tag[data-muscle="legs"],
.muscle-tag[data-muscle="quads"],
.muscle-tag[data-muscle="hamstrings"],
.muscle-tag[data-muscle="glutes"],
.muscle-tag[data-muscle="calves"] {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.15));
  border: 2px solid rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

.muscle-tag[data-muscle="shoulders"] {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
  border: 2px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

/* Default for unmatched */
.muscle-tag:not([data-muscle]) {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 140, 90, 0.15));
  border: 2px solid rgba(255, 107, 53, 0.4);
  color: #ff8c5a;
}

/* Pulsating glow effect */
.muscle-tag::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: inherit;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.muscle-tag:hover::before {
  opacity: 0.6;
  animation: tagPulse 1.5s ease-in-out infinite;
}

@keyframes tagPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Hover effect */
.muscle-tag:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Icon inside badge */
.muscle-tag::after {
  content: '💪';
  font-size: 1rem;
  filter: grayscale(0);
  transition: transform 0.3s ease;
}

.muscle-tag:hover::after {
  transform: scale(1.2) rotate(10deg);
}

/* Specific icons for muscle groups */
.muscle-tag[data-muscle="chest"]::after { content: '🦾'; }
.muscle-tag[data-muscle="back"]::after { content: '🏋️'; }
.muscle-tag[data-muscle="legs"]::after { content: '🦵'; }
.muscle-tag[data-muscle="shoulders"]::after { content: '💪'; }
.muscle-tag[data-muscle="biceps"]::after { content: '💪'; }
.muscle-tag[data-muscle="triceps"]::after { content: '🔥'; }

/* ========================================
   3. 3D GRADIENT CONFETTI WITH SHAPES
   ======================================== */

.confetti-particle {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  animation: confettiFall3D 1.5s ease-out forwards;
}

/* Different shapes */
.confetti-particle.square {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--neon-orange), var(--neon-blue));
  box-shadow: 0 0 10px currentColor;
}

.confetti-particle.circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  box-shadow: 0 0 10px currentColor;
}

.confetti-particle.triangle {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 12px solid var(--neon-orange);
  filter: drop-shadow(0 0 8px var(--neon-orange));
}

.confetti-particle.star {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--neon-purple);
  position: relative;
  filter: drop-shadow(0 0 8px var(--neon-purple));
}

.confetti-particle.star::before {
  content: '';
  position: absolute;
  top: 3px;
  left: -5px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--neon-purple);
}

.confetti-particle.heart {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #ff1ae0, #ff6b9d);
  transform: rotate(45deg);
  box-shadow: 0 0 10px #ff1ae0;
}

.confetti-particle.heart::before,
.confetti-particle.heart::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #ff1ae0, #ff6b9d);
  border-radius: 50%;
}

.confetti-particle.heart::before {
  top: -6px;
  left: 0;
}

.confetti-particle.heart::after {
  top: 0;
  left: -6px;
}

/* 3D rotation animation */
@keyframes confettiFall3D {
  0% {
    transform: translate(0, 0) rotate(0deg) rotateY(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: 
      translate(var(--vx, 0), calc(var(--vy, 0) + 150px)) 
      rotate(720deg) 
      rotateY(360deg) 
      scale(0.5);
    opacity: 0;
  }
}

/* Explosive burst effect */
.confetti-burst {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

.confetti-burst::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.4) 0%, transparent 70%);
  animation: burstExplosion 0.6s ease-out;
}

@keyframes burstExplosion {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* ========================================
   4. GLASSMORPHISM NOTIFICATIONS WITH PROGRESS BAR
   ======================================== */

.notification {
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: notificationSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: start;
  gap: 16px;
  position: relative;
  overflow: hidden;
  min-width: 320px;
}

/* Wave animation background */
.notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 107, 53, 0.1),
    transparent
  );
  animation: notificationWave 2s ease-in-out infinite;
}

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

@keyframes notificationSlideIn {
  0% {
    transform: translateX(400px) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

.notification.success {
  border-color: rgba(74, 222, 128, 0.3);
  box-shadow: 
    0 8px 32px rgba(74, 222, 128, 0.2),
    inset 0 1px 0 rgba(74, 222, 128, 0.2);
}

.notification.info {
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 
    0 8px 32px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(102, 126, 234, 0.2);
}

.notification.warning {
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 
    0 8px 32px rgba(251, 191, 36, 0.2),
    inset 0 1px 0 rgba(251, 191, 36, 0.2);
}

/* Icon with glow */
.notification-icon {
  font-size: 2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px currentColor);
  animation: iconPulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

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

.notification-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.notification-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notification-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Auto-close progress bar */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.notification-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-orange), var(--neon-blue));
  box-shadow: 0 0 10px var(--neon-orange);
  animation: progressBarShrink 3s linear forwards;
}

@keyframes progressBarShrink {
  from { width: 100%; }
  to { width: 0%; }
}

.notification.success .notification-progress-bar {
  background: linear-gradient(90deg, #4ade80, #22c55e);
  box-shadow: 0 0 10px #4ade80;
}

.notification.info .notification-progress-bar {
  background: linear-gradient(90deg, #667eea, #764ba2);
  box-shadow: 0 0 10px #667eea;
}

/* Close button */
.notification-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.notification-close:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: var(--neon-orange);
  color: var(--neon-orange);
  transform: rotate(90deg) scale(1.1);
}

/* ========================================
   5. 3D HOVER TRANSFORMS FOR WORKOUT CARDS
   ======================================== */

.exercise-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Hover 3D lift effect */
.exercise-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 107, 53, 0.2),
    0 0 30px rgba(255, 107, 53, 0.1);
}

/* Shine effect on hover */
.exercise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.exercise-card:hover::before {
  left: 100%;
}

/* Glow border on hover */
.exercise-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    var(--neon-orange),
    var(--neon-blue),
    var(--neon-purple)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  filter: blur(10px);
}

.exercise-card:hover::after {
  opacity: 0.3;
  animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.4; }
}

/* Tilt effect based on mouse position */
.exercise-card.tilt-active {
  transition: transform 0.1s ease-out;
}

/* ========================================
   6. ENHANCED EXERCISE CARD STYLING
   ======================================== */

.exercise-name {
  position: relative;
  display: inline-block;
}

.exercise-name::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-orange), var(--neon-blue));
  transition: width 0.3s ease;
}

.exercise-card:hover .exercise-name::after {
  width: 100%;
}

/* ========================================
   7. SOUND EFFECT INDICATORS (OPTIONAL)
   ======================================== */

.notification.with-sound::before {
  animation: notificationWave 2s ease-in-out infinite, soundPulse 0.5s ease-out;
}

@keyframes soundPulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.3; }
}

/* ========================================
   8. RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .exercise-checkbox {
    width: 40px;
    height: 40px;
  }
  
  .muscle-tag {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .notification {
    min-width: 280px;
    padding: 16px;
  }
  
  .exercise-card:hover {
    transform: translateY(-4px);
  }
}

/* ========================================
   9. ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .exercise-checkbox,
  .muscle-tag,
  .notification,
  .exercise-card {
    animation: none !important;
    transition: none !important;
  }
  
  .confetti-particle {
    display: none;
  }
}

/* Focus states for keyboard navigation */
.exercise-checkbox:focus-visible {
  outline: 3px solid var(--neon-orange);
  outline-offset: 4px;
}

.muscle-tag:focus-visible {
  outline: 2px solid var(--neon-orange);
  outline-offset: 2px;
}
