/* ========================================
   WORKOUT ENHANCEMENTS - WOW FEATURES
   ======================================== */

/* ========================================
   1. WORKOUT TIMER & REST TIMER
   ======================================== */

.workout-timer-container {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--neon-orange);
  border-radius: 16px;
  padding: 20px;
  min-width: 200px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.4);
  animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.timer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-display {
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, var(--neon-orange), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  font-family: 'Courier New', monospace;
}

.timer-display.rest-mode {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.timer-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.timer-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-orange), var(--neon-blue));
  border-radius: 4px;
  transition: width 1s linear;
  box-shadow: 0 0 10px var(--neon-orange);
}

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

.timer-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.timer-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timer-btn-start {
  background: linear-gradient(135deg, var(--neon-orange), #ff8c5a);
  color: #000;
}

.timer-btn-pause {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.timer-btn-reset {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.timer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ========================================
   2. WORKOUT PROGRESS TRACKER
   ======================================== */

.workout-progress-bar {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 2px solid var(--neon-orange);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-orange);
}

.progress-bar-container {
  flex: 1;
  max-width: 400px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-orange), var(--neon-blue));
  border-radius: 6px;
  transition: width 0.5s ease;
  box-shadow: 0 0 12px var(--neon-orange);
}

.progress-stats {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
}

.progress-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}

.progress-stat-value {
  color: var(--neon-orange);
  font-weight: 700;
}

/* ========================================
   3. EXERCISE CHECKBOXES
   ======================================== */

.exercise-checkbox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.exercise-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--neon-orange);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background: transparent;
}

.exercise-checkbox:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--neon-orange);
}

.exercise-checkbox.checked {
  background: linear-gradient(135deg, var(--neon-orange), var(--neon-blue));
  border-color: var(--neon-blue);
}

.exercise-checkbox.checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 16px;
  font-weight: 900;
}

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

.set-checkbox-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ========================================
   4. CONFETTI ANIMATION
   ======================================== */

.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.workout-complete-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(0, 0, 0, 0.95);
  border: 3px solid var(--neon-orange);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  z-index: 10000;
  min-width: 400px;
  box-shadow: 0 16px 64px rgba(255, 107, 53, 0.6);
  animation: modalPop 0.5s ease forwards;
}

@keyframes modalPop {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.complete-icon {
  font-size: 5rem;
  margin-bottom: 24px;
  animation: bounce 1s ease infinite;
}

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

.complete-title {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-orange), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.complete-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 24px 0;
}

.complete-stat {
  text-align: center;
}

.complete-stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--neon-orange);
}

.complete-stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* ========================================
   5. INTERACTIVE EXERCISE CARDS
   ======================================== */

.exercise-card {
  position: relative;
  cursor: grab;
  transition: all 0.3s ease;
}

.exercise-card:active {
  cursor: grabbing;
}

.exercise-card.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  max-width: 1200px;
  height: 90vh;
  z-index: 10000;
  overflow-y: auto;
}

.exercise-card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.exercise-card-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.exercise-expand-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--neon-orange);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--neon-orange);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.exercise-expand-btn:hover {
  background: var(--neon-orange);
  color: #000;
  transform: scale(1.05);
}

.exercise-notes {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.exercise-notes-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 8px;
  outline: none;
  resize: vertical;
  min-height: 60px;
}

.exercise-notes-input::placeholder {
  color: var(--text-secondary);
}

.exercise-rating {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.rating-star {
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.2);
}

.rating-star:hover,
.rating-star.active {
  color: var(--neon-orange);
  transform: scale(1.2);
}

/* ========================================
   6. REAL-TIME STATS
   ======================================== */

.workout-stats-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--neon-blue);
  border-radius: 16px;
  padding: 20px;
  min-width: 250px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ff6b35, #ff8c5a);
  color: #000;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 8px;
}

.pr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  animation: pulse 2s ease infinite;
}

/* ========================================
   7. MUSCLE GROUP HIGHLIGHTS
   ======================================== */

.muscle-highlight-container {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.muscle-highlight-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.muscle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.muscle-tag {
  padding: 6px 12px;
  background: rgba(255, 107, 53, 0.2);
  border: 1px solid var(--neon-orange);
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--neon-orange);
  font-weight: 600;
  animation: glow 2s ease infinite;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--neon-orange);
  }
  50% {
    box-shadow: 0 0 15px var(--neon-orange);
  }
}

.muscle-diagram {
  width: 100%;
  max-width: 300px;
  margin: 16px auto;
  position: relative;
}

.muscle-diagram svg {
  width: 100%;
  height: auto;
}

.muscle-area {
  fill: rgba(255, 255, 255, 0.1);
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 2;
  transition: all 0.3s ease;
}

.muscle-area.active {
  fill: rgba(255, 107, 53, 0.5);
  stroke: var(--neon-orange);
  stroke-width: 3;
  filter: drop-shadow(0 0 10px var(--neon-orange));
}

/* ========================================
   8. MUSIC INTEGRATION
   ======================================== */

.music-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--neon-purple);
  border-radius: 16px;
  padding: 16px;
  min-width: 280px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(118, 75, 162, 0.4);
}

.music-player-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.music-album-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
}

.music-info {
  flex: 1;
}

.music-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.music-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.music-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.music-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-btn:hover {
  background: var(--neon-purple);
  color: #000;
  transform: scale(1.1);
}

.music-btn-play {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  color: #000;
  font-size: 1.5rem;
}

.bpm-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.9rem;
}

.bpm-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon-purple);
  animation: bpmPulse 1s ease infinite;
}

@keyframes bpmPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

/* ========================================
   9. SMART NOTIFICATIONS
   ======================================== */

.notification-container {
  position: fixed;
  top: 140px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 350px;
}

.notification {
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--neon-orange);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
  animation: slideInRight 0.5s ease;
  display: flex;
  align-items: start;
  gap: 12px;
}

.notification.info {
  border-color: var(--neon-blue);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.notification.success {
  border-color: #4ade80;
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.4);
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.notification-close:hover {
  color: var(--text-primary);
  transform: scale(1.2);
}

/* ========================================
   10. SOCIAL SHARING
   ======================================== */

.share-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--neon-blue);
  border-radius: 24px;
  padding: 32px;
  z-index: 10000;
  min-width: 400px;
  box-shadow: 0 16px 64px rgba(102, 126, 234, 0.6);
}

.share-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.share-card-title {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-orange), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.share-card-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.share-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-btn-instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
}

.share-btn-facebook {
  background: #1877f2;
  color: #fff;
}

.share-btn-twitter {
  background: #1da1f2;
  color: #fff;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

/* ========================================
   11. NUTRITION ENHANCEMENTS
   ======================================== */

.meal-prep-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid var(--neon-orange);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: var(--neon-orange);
  margin-top: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.meal-prep-timer:hover {
  background: rgba(255, 107, 53, 0.2);
  transform: scale(1.05);
}

.shopping-list-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 16px;
}

.shopping-list-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.macro-tracker {
  margin-top: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.macro-tracker-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.macro-tracker-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.macro-tracker-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.macro-tracker-label {
  min-width: 80px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.macro-tracker-bar {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.macro-tracker-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #000;
}

.macro-tracker-fill.protein {
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.macro-tracker-fill.carbs {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

.macro-tracker-fill.fats {
  background: linear-gradient(90deg, #ff6b35, #ff8c5a);
}

/* ========================================
   12. RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .workout-timer-container,
  .workout-stats-panel,
  .music-player {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    margin: 16px auto;
    max-width: 100%;
  }

  .workout-progress-bar {
    flex-direction: column;
    height: auto;
    padding: 12px;
    gap: 12px;
  }

  .progress-bar-container {
    max-width: 100%;
  }

  .notification-container {
    left: 20px;
    right: 20px;
    max-width: calc(100% - 40px);
  }

  .share-modal,
  .workout-complete-modal {
    min-width: auto;
    width: 90%;
    padding: 24px;
  }

  .complete-stats {
    flex-direction: column;
    gap: 16px;
  }
}

/* ========================================
   13. ANIMATIONS & EFFECTS
   ======================================== */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
}

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

.fade-in-scale {
  animation: fadeInScale 0.5s ease;
}

/* ========================================
   14. ACCESSIBILITY
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
.exercise-checkbox:focus-visible {
  outline: 2px solid var(--neon-orange);
  outline-offset: 2px;
}
