/* ═══════════════════════════════════════════════════════
   FITFORGE — DESIGN SYSTEM
   Palette: Volcanic Glass | Tone: Industrial / Raw Energy
═══════════════════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  --bg-base:       #111111;
  --bg-surface:    #1A1A1A;
  --bg-elevated:   #222222;
  --bg-card:       #1E1E1E;
  --border:        #2E2E2E;
  --border-bright: #3A3A3A;

  --text-primary:  #F0EDE8;
  --text-secondary:#A09890;
  --text-muted:    #5A5550;

  --accent:        #FF6B2B;
  --accent-soft:   #FF8C55;
  --accent-glow:   rgba(255, 107, 43, 0.18);
  --accent-dim:    rgba(255, 107, 43, 0.08);
  --warm:          #FFB088;

  --green:         #4ADE80;
  --green-dim:     rgba(74, 222, 128, 0.12);
  --red:           #F87171;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --shadow-card:   0 2px 16px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 24px rgba(255,107,43,0.25);

  --font-main:     'Outfit', sans-serif;

  --nav-h:         68px;
  --header-h:      60px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font-main); cursor: pointer; border: none; background: none; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 4px; }

/* ═══════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(17,17,17,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.header-inner {
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.logo-accent { color: var(--accent); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.streak-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-soft);
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   BOTTOM NAV
═══════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(17,17,17,0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}
.nav-item::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.nav-item.active { color: var(--accent); }
.nav-item.active::before { transform: scaleX(1); }
.nav-item svg { transition: transform 0.2s; }
.nav-item.active svg { transform: scale(1.1); }

/* ═══════════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════════ */
.app-main {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 16px) 16px calc(var(--nav-h) + 20px);
  min-height: 100vh;
}

/* ─── VIEWS ─── */
.view { display: none; animation: fadeSlideUp 0.35s ease; }
.view.active { display: block; }

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

/* ─── VIEW HEADER ─── */
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.view-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.view-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}
.workout-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.meta-tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.meta-tag.accent { background: var(--accent-dim); border-color: rgba(255,107,43,0.25); color: var(--accent-soft); }

/* ═══════════════════════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════════════════════ */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.progress-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  border-radius: 6px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 0 8px rgba(255,107,43,0.5);
}
.progress-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   EXERCISE CARDS (TODAY VIEW)
═══════════════════════════════════════════════════════ */
.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
  animation: cardIn 0.4s ease both;
}
.exercise-card:nth-child(1) { animation-delay: 0.05s; }
.exercise-card:nth-child(2) { animation-delay: 0.10s; }
.exercise-card:nth-child(3) { animation-delay: 0.15s; }
.exercise-card:nth-child(4) { animation-delay: 0.20s; }
.exercise-card:nth-child(5) { animation-delay: 0.25s; }
.exercise-card:nth-child(6) { animation-delay: 0.30s; }

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

.exercise-card.completed {
  border-color: rgba(74,222,128,0.3);
  background: linear-gradient(135deg, #1E1E1E, #1A2420);
}
.exercise-card.expanded { border-color: var(--accent); box-shadow: var(--shadow-glow); }

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  user-select: none;
}
.card-thumb {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255,107,43,0.15));
}
.card-info { flex: 1; min-width: 0; }
.card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-video {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  transition: all 0.2s;
}
.btn-video:hover { background: var(--accent); color: #fff; box-shadow: var(--shadow-glow); }
.btn-video svg { margin-left: 2px; }

.check-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  color: transparent;
}
.exercise-card.completed .check-circle {
  background: var(--green);
  border-color: var(--green);
  color: #0A1F02;
  transform: scale(1.1);
}

/* Card Body (expanded) */
.card-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  animation: expandIn 0.25s ease;
}
.exercise-card.expanded .card-body { display: block; }

@keyframes expandIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sets Tracker */
.sets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
}
.sets-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sets-summary {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-soft);
}

.sets-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.set-row {
  display: grid;
  grid-template-columns: 28px 1fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.set-row.set-done {
  background: var(--green-dim);
  border-color: rgba(74,222,128,0.25);
}
.set-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}
.set-input-wrap { display: flex; flex-direction: column; gap: 2px; }
.set-input-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.set-input {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 5px 8px;
  width: 100%;
  text-align: center;
  transition: border-color 0.2s;
}
.set-input:focus { outline: none; border-color: var(--accent); }
.set-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn-log-set {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}
.btn-log-set:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.1); }
.set-row.set-done .btn-log-set {
  background: var(--green);
  border-color: var(--green);
  color: #0A1F02;
}

.card-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 8px 12px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   COMPLETE WORKOUT BUTTON
═══════════════════════════════════════════════════════ */
.complete-workout-wrap {
  margin-top: 24px;
  padding-bottom: 8px;
}
.btn-complete-workout {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #FF8C55);
  border-radius: var(--radius-lg);
  color: #fff;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(255,107,43,0.4);
}
.btn-complete-workout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,107,43,0.5);
}
.btn-complete-workout:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════════════
   REST DAY CARD
═══════════════════════════════════════════════════════ */
.rest-day-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-top: 8px;
}
.rest-icon { font-size: 3.5rem; margin-bottom: 16px; }
.rest-day-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.rest-day-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 24px; }
.rest-tips {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rest-tips span {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════
   SCHEDULE VIEW
═══════════════════════════════════════════════════════ */
.week-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.week-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s;
  animation: cardIn 0.4s ease both;
}
.week-day-card:hover { border-color: var(--border-bright); transform: translateX(4px); }
.week-day-card.today-card { border-color: var(--accent); background: linear-gradient(135deg, #1E1E1E, #221810); }
.week-day-card.completed-day { border-color: rgba(74,222,128,0.3); }
.week-day-card.rest-card { opacity: 0.6; cursor: default; }
.week-day-card.rest-card:hover { transform: none; }

.day-label-wrap { width: 44px; flex-shrink: 0; text-align: center; }
.day-abbr {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.day-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.today-card .day-num { color: var(--accent); }

.day-info { flex: 1; }
.day-workout-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.day-workout-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.day-status {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.day-status.done { background: var(--green-dim); color: var(--green); }
.day-status.today { background: var(--accent-dim); color: var(--accent); }
.day-status.upcoming { background: var(--bg-elevated); color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   PROGRESS VIEW
═══════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  animation: cardIn 0.4s ease both;
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }
.stat-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-heading {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: cardIn 0.3s ease both;
}
.history-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--green-dim);
  border: 1px solid rgba(74,222,128,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}
.history-info { flex: 1; }
.history-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.history-date { font-size: 0.75rem; color: var(--text-muted); }
.history-sets {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-soft);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state p { margin-top: 12px; font-size: 0.88rem; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════
   EXERCISES LIBRARY VIEW
═══════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
  cursor: pointer;
}
.filter-chip.active {
  background: var(--accent-dim);
  border-color: rgba(255,107,43,0.35);
  color: var(--accent-soft);
}

.exercise-library {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lib-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  animation: cardIn 0.4s ease both;
}
.lib-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.lib-thumb {
  height: 80px;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.lib-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(255,107,43,0.1));
}
.lib-body { padding: 12px; }
.lib-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.2;
}
.lib-muscle {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lib-play {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,107,43,0.85);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  z-index: 1;
}
.lib-play svg { margin-left: 2px; }

/* ═══════════════════════════════════════════════════════
   VIDEO MODAL
═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.modal-overlay.open .modal-card { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  z-index: 1;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

.modal-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}
.modal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.modal-body { padding: 20px; }
.modal-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.modal-muscle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.modal-tips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.tip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════
   CELEBRATION OVERLAY
═══════════════════════════════════════════════════════ */
.celebration-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(12px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.celebration-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255,107,43,0.4);
  border-radius: var(--radius-xl);
  padding: 40px 28px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 0 60px rgba(255,107,43,0.2);
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
.celebration-emoji {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: bounce 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
@keyframes bounce {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
.celebration-card h2 { font-size: 1.6rem; font-weight: 900; margin-bottom: 8px; }
.celebration-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }
.celebration-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}
.cel-stat { text-align: center; }
.cel-stat-val { font-size: 1.4rem; font-weight: 900; color: var(--accent); }
.cel-stat-lbl { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), #FF8C55);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(255,107,43,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,43,0.45); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .view-title { font-size: 1.5rem; }
  .exercise-library { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 480px) {
  .app-header, .bottom-nav { left: 50%; right: auto; transform: translateX(-50%); width: 480px; }
}