:root {
  --bg-base: #0b0f19;
  --bg-surface: #111827;
  --bg-elevated: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(56, 189, 248, 0.3);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --danger: #ef4444;
  --cardio-amber: #f97316;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html.light {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(2, 132, 199, 0.3);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.15);
  --accent: #059669;
  --accent-glow: rgba(5, 150, 105, 0.15);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Header & Navigation */
header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0f19;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-main);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--border-accent);
  background: var(--primary-glow);
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: #0b0f19;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

/* Global Profile Banner */
.profile-banner {
  max-width: 1400px;
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
  width: 100%;
}

.profile-card {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.profile-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.metric-pill {
  display: flex;
  flex-direction: column;
}

.metric-pill .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
}

.metric-pill .value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-highlight {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-alert {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Main Container & Tab System */
main {
  max-width: 1400px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: thin;
}

.nav-tab {
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-tab:hover {
  color: var(--text-main);
  background: var(--bg-elevated);
  border-color: var(--border-accent);
}

.nav-tab.active {
  background: var(--primary);
  color: #0b0f19;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-tab .tab-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  font-weight: 700;
}

.nav-tab.active .tab-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #0b0f19;
}

/* Floating / Sticky Timer Widget */
.timer-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.timer-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timer-clock {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.timer-presets {
  display: flex;
  gap: 0.4rem;
}

.timer-preset-btn {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.timer-preset-btn:hover {
  color: var(--primary);
  border-color: var(--border-accent);
}

.timer-controls {
  display: flex;
  gap: 0.5rem;
}

/* Day Content View */
.day-view {
  display: none;
}

.day-view.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

.day-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.day-title-wrap h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.day-title-wrap p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.day-progress-wrap {
  min-width: 240px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.progress-bar-bg {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  width: 0%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section / Phase Cards */
.phase-section {
  margin-bottom: 2rem;
}

.phase-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.phase-title-bar h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phase-time-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--primary);
  border: 1px solid var(--border-accent);
}

/* Superset Container */
.superset-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.superset-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

/* Grid of Exercises */
.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Exercise Card */
.exercise-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.exercise-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* Visual Animation Stage */
.anim-stage {
  position: relative;
  width: 100%;
  height: 240px;
  background: radial-gradient(circle at center, #1b253b 0%, #080c14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.anim-stage img {
  width: 100%;
  height: 100%;
  max-width: 210px;
  max-height: 210px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease;
}

.anim-stage:hover img {
  transform: scale(1.04);
}

.anim-badge-overlay {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(15, 23, 42, 0.85);
  color: #38bdf8;
  backdrop-filter: blur(8px);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.anim-controls-overlay {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.anim-ctrl-btn {
  background: transparent;
  border: none;
  color: #f8fafc;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.15s;
}

.anim-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.frame-dots {
  position: absolute;
  bottom: 0.7rem;
  left: 0.7rem;
  display: flex;
  gap: 0.3rem;
  background: rgba(15, 23, 42, 0.85);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.frame-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
}

.frame-dot.active {
  background: #38bdf8;
  transform: scale(1.3);
}

/* Exercise Card Body */
.exercise-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.85rem;
}

.exercise-header-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.exercise-header-title h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.exercise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-muscle {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.tag-equip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.prescription-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  font-size: 0.78rem;
}

.pres-item .label {
  color: var(--text-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
}

.pres-item .val {
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.1rem;
}

.weight-hint {
  grid-column: 1 / -1;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font-size: 0.72rem;
  color: #fbbf24;
  font-weight: 600;
}

.cues-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  border-left: 2px solid var(--border-accent);
  padding-left: 0.6rem;
  font-style: italic;
}

/* Series Tracker Checkboxes */
.series-tracker {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.series-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.series-checks {
  display: flex;
  gap: 0.5rem;
}

.set-checkbox-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.set-checkbox-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.set-checkbox-btn.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
  transform: scale(1.05);
}

/* Dedicated Cardio Finisher Section: Caminadora o Alternativa */
.cardio-finisher-card {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.cardio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.cardio-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cardio-title h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cardio-amber);
}

.cardio-nav-pills {
  display: flex;
  background: var(--bg-elevated);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 0.25rem;
}

.cardio-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.cardio-pill.active {
  background: var(--cardio-amber);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.cardio-option-pane {
  display: none;
}

.cardio-option-pane.active {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

@media (max-width: 768px) {
  .cardio-option-pane.active {
    grid-template-columns: 1fr;
  }
}

.cardio-visual {
  background: radial-gradient(circle at center, #1b253b 0%, #080c14 100%);
  border-radius: var(--radius-md);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.4);
}

.cardio-visual img {
  width: 100%;
  height: 100%;
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.cardio-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.cardio-details h5 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.cardio-protocol-box {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  border: 1px solid var(--border-subtle);
}

.cardio-protocol-box p {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-main);
}

.cardio-benefit-box {
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  line-height: 1.4;
  font-weight: 600;
}

/* Exercise Catalog View */
.catalog-filters {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-input-wrap {
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border 0.15s;
}

.search-input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1rem;
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  color: var(--text-main);
  border-color: var(--border-accent);
}

.filter-pill.active {
  background: var(--primary);
  color: #0b0f19;
  border-color: var(--primary);
}

/* Educational / Guide View */
.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.guide-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.25rem 0 0.5rem;
}

.guide-card p, .guide-card li {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.guide-card ul {
  padding-left: 1.25rem;
}

.biomechanic-alert {
  background: rgba(56, 189, 248, 0.08);
  border-left: 4px solid var(--primary);
  padding: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1rem 0;
}

.biomechanic-alert strong {
  color: var(--primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Modal for Detailed Exercise Inspection */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-close-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.modal-close-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.modal-stage {
  background: radial-gradient(circle at center, #1b253b 0%, #080c14 100%);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.modal-stage img {
  width: 100%;
  height: 100%;
  max-width: 280px;
  max-height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Footer */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  margin-top: auto;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-card {
    grid-template-columns: 1fr;
  }
  .exercise-grid {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  header, .timer-bar, .nav-tabs, .anim-controls-overlay, .series-checks, .catalog-filters, .modal-backdrop {
    display: none !important;
  }
  .day-view {
    display: block !important;
    page-break-after: always;
  }
  .exercise-card {
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }
  .anim-stage {
    height: 180px !important;
  }
}
