/* Workout Program Selection Styles */

.workout-programs-screen {
  padding: 0;
}

.workout-programs-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.workout-programs-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.workout-programs-hero-content {
  position: relative;
  z-index: 1;
}

.workout-programs-hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.workout-programs-hero p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
}

.workout-programs-filters {
  padding: 16px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.workout-programs-filters::-webkit-scrollbar {
  display: none;
}

.program-filter-chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.program-filter-chip:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.program-filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.workout-programs-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .workout-programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.workout-program-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.workout-program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
}

.program-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.program-card-icon {
  font-size: 32px;
  margin-right: 12px;
}

.program-card-title-group {
  flex: 1;
}

.program-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.program-card-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.program-card-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.program-card-schedule {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.program-schedule-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.program-day-badge {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
}

.program-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.program-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.program-meta-icon {
  font-size: 16px;
}

.program-card-versions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.program-version-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.program-version-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.program-version-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.program-start-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.program-start-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
}

.program-start-btn:active {
  transform: scale(0.98);
}

.program-card-custom {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.program-card-custom .program-card-title,
.program-card-custom .program-card-description,
.program-card-custom .program-schedule-label,
.program-card-custom .program-meta-item {
  color: white;
}

.program-card-custom .program-card-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.program-card-custom .program-day-badge {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.program-card-custom .program-version-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.program-card-custom .program-version-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.program-card-custom .program-start-btn {
  background: white;
  color: #667eea;
}

.program-card-custom .program-start-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Program Detail Modal */
.program-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.program-detail-modal.active {
  display: flex;
}

.program-detail-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.program-detail-sheet {
  position: relative;
  background: var(--card-bg);
  border-radius: 24px 24px 0 0;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.program-detail-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 1;
}

.program-detail-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.program-detail-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.program-detail-body {
  padding: 24px;
}

.program-detail-section {
  margin-bottom: 24px;
}

.program-detail-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.program-day-preview {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.program-day-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.program-day-preview-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.program-day-preview-focus {
  font-size: 13px;
  color: var(--text-secondary);
}

.program-exercise-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.program-exercise-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.program-exercise-item:last-child {
  border-bottom: none;
}

.program-exercise-name {
  font-size: 14px;
  color: var(--text-primary);
}

.program-exercise-scheme {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.program-detail-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--card-bg);
}

.workout-programs-loading {
  padding: 48px 24px;
  text-align: center;
}

.workout-programs-loading .spinner {
  margin: 0 auto 16px;
}

.workout-programs-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary);
}

.workout-programs-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.workout-programs-empty-text {
  font-size: 16px;
  margin: 0;
}

/* Dark Luxury Styling for #screen-workout-programs */
#screen-workout-programs {
  background: #090d16 !important;
  color: #f1f5f9;
}

#screen-workout-programs .workout-program-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  padding: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#screen-workout-programs .workout-program-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(0, 240, 118, 0.3) !important;
  box-shadow: 0 12px 30px rgba(0, 240, 118, 0.1) !important;
}

#screen-workout-programs .program-card-title {
  color: #ffffff !important;
}

#screen-workout-programs .program-card-description {
  color: #94a3b8 !important;
}

#screen-workout-programs .program-card-badge {
  background: rgba(0, 240, 118, 0.12) !important;
  color: #00f076 !important;
  border: 1px solid rgba(0, 240, 118, 0.3) !important;
}

#screen-workout-programs .program-day-badge {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

#screen-workout-programs .program-meta-item {
  color: #94a3b8 !important;
}

#screen-workout-programs .program-card-versions {
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

#screen-workout-programs .program-version-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  cursor: pointer !important;
  font-size: 13px !important;
}

#screen-workout-programs .program-version-btn.active {
  background: rgba(0, 240, 118, 0.15) !important;
  color: #00f076 !important;
  border-color: #00f076 !important;
}

#screen-workout-programs .program-start-btn {
  background: #00f076 !important;
  color: #0b0f10 !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 12px !important;
  margin-top: 14px !important;
  box-shadow: 0 6px 20px rgba(0, 240, 118, 0.3) !important;
  cursor: pointer !important;
  width: 100% !important;
}

