:root {
  --bg-deep: #070a12;
  --bg-surface: #0e1526;
  --bg-card: #141d33;
  --bg-card-hover: #19243f;
  --bg-card-active: #1d2a4a;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(245, 158, 11, 0.35);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-amber: #f59e0b;
  --accent-amber-light: #fbbf24;
  --accent-amber-glow: rgba(245, 158, 11, 0.2);
  
  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);

  --accent-sky: #0ea5e9;
  --accent-sky-light: #38bdf8;
  --accent-sky-glow: rgba(14, 165, 233, 0.2);

  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 120px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #253352;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #3b4d75;
}

/* Container */
.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 21, 38, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--accent-amber-glow);
  color: #070a12;
  flex-shrink: 0;
}

.brand-logo svg {
  width: 24px;
  height: 24px;
}

.brand-meta h1 {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: var(--accent-amber-glow);
  color: var(--accent-amber-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-label:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-icon-label:active {
  transform: scale(0.96);
}

.btn-icon-label svg {
  width: 16px;
  height: 16px;
}

.btn-dicas svg {
  color: var(--accent-emerald-light);
}

.btn-calc svg {
  color: var(--accent-sky-light);
}

/* Workout Routine Tabs (Treino 1, 2, 3) */
.workout-nav {
  padding-bottom: 10px;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #090e1a;
  padding: 5px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
}

.tab-btn:hover {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-medium);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.tab-btn-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-treino1 { background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald-glow); }
.dot-treino2 { background: var(--accent-sky); box-shadow: 0 0 8px var(--accent-sky-glow); }
.dot-treino3 { background: var(--accent-amber); box-shadow: 0 0 8px var(--accent-amber-glow); }

.tab-btn-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Header Live Progress */
.progress-strip {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-emerald) 0%, var(--accent-sky) 50%, var(--accent-amber) 100%);
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Main Content Area */
.main-content {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Routine Hero Banner */
.routine-hero {
  background: linear-gradient(135deg, #131c31 0%, #0d1527 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.routine-hero-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-amber-glow) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(30px);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 640px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-emerald { background: var(--accent-emerald-glow); color: var(--accent-emerald-light); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-sky { background: var(--accent-sky-glow); color: var(--accent-sky-light); border: 1px solid rgba(14, 165, 233, 0.3); }
.badge-amber { background: var(--accent-amber-glow); color: var(--accent-amber-light); border: 1px solid rgba(245, 158, 11, 0.3); }

.hero-duration {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-duration svg {
  width: 14px;
  height: 14px;
}

.hero-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 4px;
  color: #fff;
}

.hero-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 580px;
  line-height: 1.45;
}

.hero-stats-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 14, 26, 0.7);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val-group {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-num {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--accent-amber);
  font-family: var(--font-mono);
}

.stat-total {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 700;
}

.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.btn-reset-day {
  background: transparent;
  border: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.btn-reset-day:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

.btn-reset-day svg {
  width: 14px;
  height: 14px;
}

/* Warmup Cardio Card (10m Esteira) */
.warmup-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(14, 21, 38, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .warmup-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.warmup-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.warmup-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-emerald-glow);
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald-light);
  flex-shrink: 0;
}

.warmup-icon-badge svg {
  width: 24px;
  height: 24px;
}

.warmup-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--accent-emerald);
  color: #070a12;
}

.warmup-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 3px;
  color: #fff;
}

.warmup-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.warmup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .warmup-actions {
    display: flex;
  }
}

.btn-warmup-timer {
  background: var(--accent-emerald);
  color: #070a12;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-emerald-glow);
  transition: all 0.2s;
}

.btn-warmup-timer:hover {
  background: var(--accent-emerald-light);
  transform: translateY(-1px);
}

.btn-warmup-check {
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-warmup-check.checked {
  background: var(--accent-emerald);
  color: #070a12;
  border-color: var(--accent-emerald);
  font-weight: 900;
}

/* Control Bar: Search & Filter */
.control-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 640px) {
  .control-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.search-wrapper {
  position: relative;
  width: 100%;
}

@media (min-width: 640px) {
  .search-wrapper {
    max-width: 280px;
  }
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 9px 14px 9px 36px;
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s;
}

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

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.pill-btn:hover {
  color: var(--text-main);
  border-color: var(--border-medium);
}

.pill-btn.active {
  background: var(--bg-card);
  color: #fff;
  border-color: var(--accent-amber);
}

/* Exercises List & Cards */
.exercises-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.exercise-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.exercise-card.completed {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
}

.exercise-card.superset {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, var(--bg-card) 100%);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-title-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.exercise-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: #0d1526;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exercise-card.completed .exercise-number {
  background: var(--accent-emerald);
  color: #070a12;
  border-color: var(--accent-emerald);
}

.exercise-card.superset .exercise-number {
  background: var(--accent-amber);
  color: #070a12;
  border-color: var(--accent-amber);
}

.card-titles {
  flex: 1;
}

.card-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.badge-slot {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: #090e1a;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.badge-target {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.exercise-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.card-target-params {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.reps-tag {
  font-size: 0.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-amber-light);
  background: var(--accent-amber-glow);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.rest-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Smart Swap Button */
.btn-swap {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-amber-light);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-swap:hover {
  background: var(--accent-amber);
  color: #070a12;
  transform: translateY(-1px);
}

.btn-swap svg {
  width: 14px;
  height: 14px;
}

/* Card Visual Body: Biomechanics, Animation & Anatomy */
.card-visual-body {
  margin-top: 14px;
  background: #090e1c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 580px) {
  .card-visual-body {
    flex-direction: row;
    align-items: center;
  }
}

/* Animation / GIF Showcase Area (Fundo Branco sem cortes) */
.animation-showcase {
  width: 124px;
  height: 124px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  flex-shrink: 0;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.animation-showcase:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--accent-emerald);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.animation-showcase .zoom-hint-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.animation-showcase:hover .zoom-hint-btn {
  opacity: 1;
  transform: scale(1.1);
  background: var(--accent-emerald);
  color: #070a12;
}

.exercise-gif-media {
  width: 100%;
  height: 98px;
  object-fit: contain;
  background: #ffffff;
  display: block;
}

.cadence-badge {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-emerald-light);
  display: flex;
  align-items: center;
  gap: 4px;
  background: #090e1a;
  width: 100%;
  justify-content: center;
  padding: 4px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cadence-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulseNeon 1.5s infinite;
}

@keyframes pulseNeon {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Description & Muscle Targets */
.exercise-meta-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exercise-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.muscle-tags-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.muscle-pill {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.muscle-pill.primary {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald-light);
  font-weight: 700;
}

/* Pro Cue Tip */
.pro-cue-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.pro-cue-bar strong {
  color: var(--accent-amber);
  flex-shrink: 0;
}

/* Sets Tracking Grid (3 Sets with Reps & Weight) */
.sets-tracker-section {
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sets-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sets-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.previous-log-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.previous-log-tag strong {
  color: var(--accent-sky-light);
}

.sets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.set-box {
  background: #090e1c;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.set-box.completed {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.08);
}

.set-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.set-number-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
}

.btn-check-set {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-check-set svg {
  width: 16px;
  height: 16px;
}

.set-box.completed .btn-check-set {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #070a12;
}

/* Weight & Reps Stepper */
.set-inputs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.stepper-btn {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 900;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stepper-btn:hover {
  background: var(--bg-card-hover);
  color: var(--accent-amber);
}

.weight-input-box {
  flex: 1;
  position: relative;
  text-align: center;
}

.weight-input {
  width: 100%;
  background: #060912;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.78rem;
  text-align: center;
  padding: 4px 2px;
  outline: none;
}

.weight-input:focus {
  border-color: var(--accent-amber);
}

.reps-input-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
  font-weight: 600;
}

/* Floating Rest Timer Dock */
.timer-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  z-index: 60;
  background: rgba(14, 21, 38, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timer-dock.pulse-ring {
  border-color: var(--accent-amber);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}

.timer-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timer-display-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-amber-glow);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-amber-light);
  flex-shrink: 0;
}

.timer-icon-circle svg {
  width: 20px;
  height: 20px;
}

.timer-digits {
  display: flex;
  flex-direction: column;
}

.timer-clock {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}

.timer-state-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.timer-state-label.running {
  color: var(--accent-amber-light);
}

.timer-state-label.finished {
  color: var(--accent-emerald-light);
}

.timer-buttons-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-preset {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  padding: 6px 9px;
  border-radius: var(--radius-md);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-preset:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-timer-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-amber);
  color: #070a12;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-amber-glow);
  transition: all 0.2s;
}

.btn-timer-toggle:hover {
  background: var(--accent-amber-light);
  transform: scale(1.05);
}

.btn-timer-toggle svg {
  width: 18px;
  height: 18px;
}

.btn-timer-reset {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-timer-reset:hover {
  color: #fff;
  border-color: var(--border-medium);
}

.btn-timer-reset svg {
  width: 14px;
  height: 14px;
}

/* Modal Backdrops & Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

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

.modal-title-group h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

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

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.btn-close-modal:hover {
  color: #fff;
}

.btn-close-modal svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Smart Swap Modal Cards */
.swap-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.swap-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.2s;
}

.swap-item-card:hover {
  border-color: var(--accent-amber);
  background: var(--bg-card-hover);
}

.swap-item-card.is-active {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.swap-item-thumb-box {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}

.swap-item-thumb-box:hover {
  transform: scale(1.05);
  border-color: var(--accent-emerald);
}

.swap-item-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.swap-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.swap-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.swap-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.badge-equipment {
  font-size: 0.65rem;
  font-weight: 700;
  background: #090e1a;
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.swap-reason {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.swap-advantage {
  font-size: 0.7rem;
  color: var(--accent-emerald-light);
  font-weight: 600;
}

.btn-choose-swap {
  margin-top: 4px;
  background: var(--accent-amber);
  color: #070a12;
  font-weight: 800;
  font-size: 0.74rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
}

.btn-choose-swap:hover {
  background: var(--accent-amber-light);
}

.swap-item-card.is-active .btn-choose-swap {
  background: var(--accent-emerald);
  color: #070a12;
}

/* Warmup & Mobility Content inside Modal */
.guide-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-emerald-glow);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald-light);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.step-content p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* ==========================================================================
   BIOMECHANICAL EXERCISE ANIMATIONS (High-End Dynamic Keyframes)
   ========================================================================== */
@keyframes animBenchPress {
  0%, 100% {
    transform: translateY(0px);
  }
  45% {
    transform: translateY(20px);
  }
  60% {
    transform: translateY(20px);
  }
  90% {
    transform: translateY(0px);
  }
}

@keyframes animSquatHinge {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(18px) rotate(-4deg);
  }
}

@keyframes animPulldown {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(22px);
  }
}

@keyframes animArmCurl {
  0%, 100% {
    transform: rotate(0deg);
  }
  45% {
    transform: rotate(-95deg);
  }
  60% {
    transform: rotate(-95deg);
  }
  95% {
    transform: rotate(0deg);
  }
}

@keyframes animTricepPush {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(85deg);
  }
}

@keyframes animFlyPec {
  0%, 100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.45);
  }
}

@keyframes animLatRaise {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-65deg);
  }
}

@keyframes animLegExt {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(70deg);
  }
}

.anim-press-bar {
  animation: animBenchPress 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.anim-squat-bar {
  animation: animSquatHinge 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: bottom center;
}

.anim-pulldown-bar {
  animation: animPulldown 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.anim-bicep-forearm {
  animation: animArmCurl 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: 32px 50px;
}

.anim-tricep-forearm {
  animation: animTricepPush 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: 40px 38px;
}

.anim-fly-arms {
  animation: animFlyPec 2.4s ease-in-out infinite;
  transform-origin: center center;
}

.anim-lateral-arm-l {
  animation: animLatRaise 2.4s ease-in-out infinite;
  transform-origin: 40px 36px;
}

.anim-lateral-arm-r {
  animation: animLatRaise 2.4s ease-in-out infinite alternate-reverse;
  transform-origin: 60px 36px;
}

.anim-leg-knee {
  animation: animLegExt 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: 58px 46px;
}

/* Neon glow muscle highlight classes */
.muscle-active-glow {
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.85));
}

.muscle-emerald-glow {
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.85));
}

/* ========================================================
   MODAL LIGHTBOX: GIF AMPLIADO COM FUNDO BRANCO
   ======================================================== */
.gif-lightbox-overlay {
  z-index: 9999;
  background: rgba(4, 7, 17, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gif-lightbox-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 20px;
  max-width: 480px;
  width: 92%;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.gif-lightbox-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.gif-lightbox-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gif-lightbox-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  align-self: flex-start;
}

.gif-lightbox-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.gif-lightbox-close {
  background: #f1f5f9;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.gif-lightbox-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

.gif-lightbox-canvas {
  background: #ffffff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: 380px;
}

.gif-lightbox-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #ffffff;
  display: block;
}

.gif-lightbox-footer {
  padding: 14px 20px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gif-lightbox-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.gif-lightbox-tip-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.gif-lightbox-tip-body {
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.45;
}

.gif-lightbox-tip-body strong {
  color: #0f172a;
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.gif-lightbox-tip-body p {
  margin: 0;
  color: #475569;
}

.gif-lightbox-esc-hint {
  font-size: 0.7rem;
  color: #94a3b8;
  text-align: center;
}

