/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:       #10131a;
  --surface:  #1a1f2e;
  --surface2: #222840;
  --accent:   #d4f53c;
  --accent2:  #f0c040;
  --text:     #f0f2f8;
  --muted:    #8b93b0;
  --border:   #2a3050;
  --red:      #ff4c5e;
  --green:    #3dd68c;
}

/* ─── Reset & base ───────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  overscroll-behavior: none;
}

/* ─── Safe area (notched iPhones) ────────────────────────────────────────── */
.safe-top    { padding-top: env(safe-area-inset-top, 0px); }
.safe-bottom { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); }

/* ─── Header hero ────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, #0d1117 0%, var(--bg) 100%);
}

/* ─── Day nav pills ──────────────────────────────────────────────────────── */
.day-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: all .2s ease;
  letter-spacing: .3px;
}

.day-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d1117;
}

/* ─── Workout card ───────────────────────────────────────────────────────── */
.workout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: opacity .3s;
}

.workout-header-band {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}

/* ─── Exercise row ───────────────────────────────────────────────────────── */
.exercise-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.exercise-row:last-child { border-bottom: none; }
.exercise-row:active      { background: rgba(212, 245, 60, .05); }
.exercise-row.done        { background: rgba(61, 214, 140, .06); }

/* ─── Exercise thumbnail ─────────────────────────────────────────────────── */
.ex-thumb {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.ex-thumb-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--surface2);
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* ─── Sets badge ─────────────────────────────────────────────────────────── */
.sets-badge {
  position: absolute;
  bottom: 10px;
  left: 14px;
  background: rgba(212, 245, 60, .15);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: .4px;
}

/* ─── Check circle ───────────────────────────────────────────────────────── */
.check-circle {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}

.exercise-row.done .check-circle {
  background: var(--green);
  border-color: var(--green);
}

/* ─── Cardio card ────────────────────────────────────────────────────────── */
.cardio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
}

.cardio-band {
  background: linear-gradient(135deg, #ff4c5e 0%, #ff8c4c 100%);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cardio-body {
  padding: 14px 16px;
  transition: opacity .3s;
}

.cardio-card.done .cardio-body          { opacity: .4; }
.cardio-card.done .check-circle-cardio  { background: white; }

.check-circle-cardio {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}

/* ─── Progress bar ───────────────────────────────────────────────────────── */
.progress-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 9999px;
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

/* ─── Finish button ──────────────────────────────────────────────────────── */
.btn-finish {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent);
  color: #0d1117;
  border: none;
  transition: all .15s;
  letter-spacing: .3px;
}

.btn-finish:active       { transform: scale(.97); opacity: .9; }
.btn-finish.completed    { background: var(--surface2); color: var(--muted); cursor: default; }

/* ─── Bottom bar ─────────────────────────────────────────────────────────── */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}

/* ─── Muscle tag ─────────────────────────────────────────────────────────── */
.muscle-tag {
  display: inline-block;
  background: rgba(212, 245, 60, .12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  letter-spacing: .8px;
  text-transform: uppercase;
}

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

.animate-slide { animation: slideUp .3s ease both; }

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

.fade-in { animation: fadeIn .25s ease both; }

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.no-scrollbar               { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.divider { height: 1px; background: var(--border); margin: 0; }

/* ─── Rest day ───────────────────────────────────────────────────────────── */
.rest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 24px;
  text-align: center;
}
