/* =============================================================================
   Coach — Design System
   Dark, calm, premium — glassmorphism, micro-animations, mobile-first
   ============================================================================= */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2233;
  --bg-card: rgba(30, 41, 59, 0.45);
  --bg-card-hover: rgba(30, 41, 59, 0.65);
  --bg-card-active: rgba(56, 189, 248, 0.08);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-hover: rgba(255, 255, 255, 0.14);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  --accent-primary: #38bdf8;
  --accent-secondary: #818cf8;
  --accent-warm: #fb923c;
  --accent-success: #34d399;
  --accent-danger: #f87171;
  --accent-rest: #a78bfa;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #38bdf8, #818cf8);
  --gradient-warm: linear-gradient(135deg, #fb923c, #f59e0b);
  --gradient-success: linear-gradient(135deg, #34d399, #10b981);
  --gradient-cool: linear-gradient(135deg, #818cf8, #a78bfa);
  --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
                 radial-gradient(ellipse at 80% 20%, rgba(129, 140, 248, 0.04) 0%, transparent 50%);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow-blue: 0 0 24px rgba(56, 189, 248, 0.15);
  --shadow-glow-green: 0 0 24px rgba(52, 211, 153, 0.15);
  --shadow-glow-warm: 0 0 24px rgba(251, 146, 60, 0.15);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);

  /* Font */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-bg);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* --- Typography --- */
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem;  font-weight: 600; line-height: 1.4; }
.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent-primary); }
.text-success { color: var(--accent-success); }
.text-warm { color: var(--accent-warm); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.page {
  min-height: 100vh;
  padding-bottom: var(--space-3xl);
}

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-md);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__logo {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-glow-blue);
}

.header__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header__nav {
  display: flex;
  gap: var(--space-sm);
}

.header__back {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.header__back:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  text-decoration: none;
}

/* --- Greeting --- */
.greeting {
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s var(--ease-out);
}

.greeting__hello {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: var(--space-xs);
}

.greeting__title {
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.greeting__subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: var(--space-xs);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card--clickable { cursor: pointer; }

.card--active {
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: var(--shadow-glow-blue);
}

.card--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  background: var(--bg-tertiary);
}

.card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.card__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-top: var(--space-sm);
}

.card__badge--active {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-success);
}

.card__badge--soon {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
}

/* --- Module Grid --- */
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* --- Section --- */
.section {
  margin-bottom: var(--space-xl);
}

.section__title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* --- Fitness Dashboard --- */
.today-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.5s var(--ease-out);
}

.today-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.today-card__icon {
  font-size: 2.5rem;
  line-height: 1;
}

.today-card__info { flex: 1; }

.today-card__day {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.today-card__session {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.today-card__meta {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.today-card__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow-blue);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(56, 189, 248, 0.25);
}

.btn--primary:active { transform: translateY(0); }

.btn--secondary {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

.btn--secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
}

.btn--ghost {
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
}

.btn--ghost:hover { color: var(--text-primary); background: var(--bg-card); }

.btn--danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--accent-danger);
}

.btn--danger:hover { background: rgba(248, 113, 113, 0.25); }

.btn--full { width: 100%; }

.btn--sm {
  font-size: 0.85rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
}

.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
  font-size: 1.2rem;
}

/* --- Weekly Calendar --- */
.week-strip {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.week-strip__day {
  flex: 1;
  text-align: center;
  padding: var(--space-sm) var(--space-xs);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  cursor: default;
  transition: all var(--transition-fast);
}

.week-strip__day--today {
  border-color: var(--accent-primary);
  background: var(--bg-card-active);
  box-shadow: var(--shadow-glow-blue);
}

.week-strip__day--done {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.06);
}

.week-strip__day--rest {
  opacity: 0.5;
}

.week-strip__label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.week-strip__icon {
  font-size: 1rem;
}

.week-strip__check {
  color: var(--accent-success);
}

/* --- Progress Section --- */
.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin: var(--space-sm) 0;
}

.progress-bar__fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.8s var(--ease-out);
}

.progress-weeks {
  display: flex;
  gap: var(--space-sm);
}

.progress-weeks__item {
  flex: 1;
  text-align: center;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.progress-weeks__item--current {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--bg-card-active);
}

.progress-weeks__item--done {
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--accent-success);
}

.progress-weeks__label { font-weight: 600; }
.progress-weeks__focus { font-size: 0.65rem; margin-top: 2px; }

/* --- Stats --- */
.stats-row {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

.stat-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  backdrop-filter: blur(8px);
}

.stat-card__value {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* --- Workout View --- */
.workout-view {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.workout-view[hidden] { display: none; }

.workout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
}

.workout-header__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.workout-progress-bar {
  height: 3px;
  background: var(--bg-tertiary);
  position: relative;
}

.workout-progress-bar__fill {
  position: absolute;
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.5s var(--ease-out);
}

.workout-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.workout-exercise__visual {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--glass-border);
}

.workout-exercise__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workout-exercise__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.workout-exercise__instruction {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.workout-exercise__reps {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
}

/* --- Timer Ring --- */
.timer-ring {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto var(--space-lg);
}

.timer-ring__svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-ring__bg {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 6;
}

.timer-ring__progress {
  fill: none;
  stroke: url(#timer-gradient);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s linear;
}

.timer-ring__time {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-ring__digits {
  font-size: 3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.timer-ring__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Workout Controls --- */
.workout-controls {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  margin-top: auto;
}

.workout-next {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  width: 100%;
  max-width: 400px;
}

.workout-next__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.workout-next__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* --- Rest Screen --- */
.rest-screen {
  text-align: center;
}

.rest-screen__title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-rest);
  margin-bottom: var(--space-sm);
}

.rest-screen__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Breathing Circle --- */
.breathing-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.breathing-overlay[hidden] { display: none; }

.breathing-circle {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-full);
  border: 3px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 4s var(--ease-out), border-color 0.5s;
  box-shadow: var(--shadow-glow-blue);
  margin-bottom: var(--space-xl);
}

.breathing-circle--inhale {
  transform: scale(1.35);
  border-color: var(--accent-primary);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.25);
}

.breathing-circle--exhale {
  transform: scale(0.85);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 40px rgba(129, 140, 248, 0.2);
  transition-duration: 6s;
}

.breathing-phase {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: opacity 0.4s;
}

.breathing-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-lg);
}

.breathing-controls {
  margin-top: var(--space-2xl);
}

/* --- Completion Screen --- */
.completion {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  animation: fadeInUp 0.6s var(--ease-out);
}

.completion__icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  animation: celebrateIn 0.8s var(--ease-out);
}

.completion__title {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

.completion__message {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.completion__stats {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

/* --- History --- */
.history-list {
  list-style: none;
}

.history-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--glass-border);
}

.history-item__icon { font-size: 1.3rem; }

.history-item__info { flex: 1; }

.history-item__session {
  font-size: 0.9rem;
  font-weight: 500;
}

.history-item__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-item__week {
  font-size: 0.75rem;
  color: var(--accent-primary);
  font-weight: 600;
}

/* --- Action Row --- */
.action-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: var(--space-xl) 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* --- Utility: Hidden --- */
[hidden] { display: none !important; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes celebrateIn {
  0%   { opacity: 0; transform: scale(0.3) rotate(-10deg); }
  60%  { transform: scale(1.2) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

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

.anim-fade-in { animation: fadeIn 0.4s var(--ease-out); }
.anim-fade-in-up { animation: fadeInUp 0.5s var(--ease-out); }
.anim-slide-in { animation: slideInRight 0.4s var(--ease-out); }
.anim-pulse { animation: pulse 2s ease-in-out infinite; }

/* Stagger children animations */
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.18s; }
.stagger > *:nth-child(5) { animation-delay: 0.24s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* --- Exercise Catalog --- */
.exercise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  animation: fadeInUp 0.4s var(--ease-out) both;
}

.exercise-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.exercise-card__visual {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-sm);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exercise-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exercise-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.exercise-card__type {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.category-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
}

.category-badge--core {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
}

.category-badge--upper-body {
  background: rgba(251, 146, 60, 0.12);
  color: var(--accent-warm);
}

.category-badge--lower-body {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-success);
}

.category-badge--cooldown {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-rest);
}

/* Exercise Detail View */
.exercise-detail {
  animation: fadeInUp 0.4s var(--ease-out);
}

.exercise-detail__visual {
  width: 140px;
  height: 140px;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--glass-border);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exercise-detail__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exercise-detail__name {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.exercise-detail__instruction {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.exercise-detail__meta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.exercise-detail__meta-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  min-width: 90px;
}

.exercise-detail__meta-value {
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.exercise-detail__meta-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.muscle-tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: center;
}

.muscle-tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

/* --- Responsive --- */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .container { padding: 0 var(--space-md); }
  .module-grid { grid-template-columns: 1fr; }
  .timer-ring { width: 170px; height: 170px; }
  .timer-ring__digits { font-size: 2.5rem; }
  .workout-exercise__name { font-size: 1.3rem; }
  .week-strip__label { font-size: 0.55rem; }
}

@media (min-width: 768px) {
  .container { max-width: 720px; }
  h1 { font-size: 2rem; }
  .module-grid { grid-template-columns: 1fr 1fr 1fr; }
}
