/* ==========================================================================
   فِت لايف (FitLife) - Luxury iOS Arabic Fitness Design System
   ========================================================================== */

:root {
  --bg-black: #06090e;
  --bg-primary: #0a0e17;
  --bg-secondary: #121824;
  --bg-tertiary: #1a2232;
  --card-bg: rgba(20, 27, 41, 0.72);
  --card-hover: rgba(28, 38, 58, 0.85);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-highlight: rgba(255, 255, 255, 0.12);

  /* Accents */
  --neon-lime: #00F076;
  --neon-lime-glow: rgba(0, 240, 118, 0.28);
  --neon-cyan: #00C8FF;
  --neon-cyan-glow: rgba(0, 200, 255, 0.25);
  --neon-coral: #FF3B69;
  --neon-coral-glow: rgba(255, 59, 105, 0.25);
  --neon-amber: #FFB300;

  /* Typography */
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  /* Radii & Shadows */
  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --shadow-neon: 0 0 25px var(--neon-lime-glow);

  /* iPhone Safe Areas */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --nav-height: 72px;
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-black);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Arabic", "SF Pro Display", "Segoe UI", Roboto, "Cairo", sans-serif;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at 50% 0%, #152238 0%, #06090e 65%);
}

/* App Container (Phone-First Viewport on Desktop & Native on iOS) */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
  padding-bottom: calc(var(--nav-height) + var(--sab) + 24px);
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}

/* Header & Status Bar */
.app-header {
  padding: calc(var(--sat) + 16px) 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--neon-lime), var(--neon-cyan));
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--neon-lime);
  font-size: 1.1rem;
}

.greeting-text h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.greeting-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 77, 77, 0.12);
  border: 1px solid rgba(255, 77, 77, 0.25);
  border-radius: var(--radius-full);
  color: #FF5A5A;
  font-size: 0.82rem;
  font-weight: 700;
}

.streak-pill svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Main Content Views */
.tab-view {
  display: none;
  padding: 16px 20px 24px;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tab-view.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Activity Rings Section (Apple Fitness Inspired) */
.rings-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.rings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.rings-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-lime);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--neon-lime);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.rings-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rings-svg-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
}

.rings-svg-wrapper svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.ring-bg {
  fill: none;
  stroke-width: 10;
  opacity: 0.18;
}

.ring-fg {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-calories-fg { stroke: var(--neon-coral); }
.ring-calories-bg { stroke: var(--neon-coral); }
.ring-time-fg { stroke: var(--neon-lime); }
.ring-time-bg { stroke: var(--neon-lime); }
.ring-workouts-fg { stroke: var(--neon-cyan); }
.ring-workouts-bg { stroke: var(--neon-cyan); }

.rings-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--neon-lime);
}

.rings-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

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

.metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.metric-color-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.metric-val {
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric-val span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-right: 2px;
}

/* Hero Workout of the Day */
.hero-workout {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-workout:active {
  transform: scale(0.98);
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.4s ease;
}

.hero-workout:hover .hero-bg-img {
  transform: scale(1.05);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,14,23,0.1) 0%, rgba(10,14,23,0.6) 40%, rgba(10,14,23,0.95) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-tag {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 240, 118, 0.2);
  border: 1px solid var(--neon-lime);
  color: var(--neon-lime);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: #E2E8F0;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-meta svg {
  width: 14px;
  height: 14px;
  fill: var(--neon-lime);
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 2px;
}

.section-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.section-action {
  font-size: 0.82rem;
  color: var(--neon-cyan);
  font-weight: 600;
  cursor: pointer;
}

/* Programs Grid / Cards */
.programs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.program-card {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--glass-border);
  background: var(--card-bg);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.program-card:active {
  transform: scale(0.985);
  border-color: var(--neon-lime);
}

.program-thumb {
  width: 120px;
  min-height: 105px;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.program-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.program-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  flex: 1;
}

.program-badge {
  font-size: 0.72rem;
  color: var(--neon-lime);
  font-weight: 700;
}

.program-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.program-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* Quick Health Habit Widgets */
.habits-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.habit-card {
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

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

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

.habit-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.water-icon { background: rgba(0, 200, 255, 0.15); color: var(--neon-cyan); }
.weight-icon { background: rgba(255, 179, 0, 0.15); color: var(--neon-amber); }

.habit-value {
  font-size: 1.35rem;
  font-weight: 800;
}

.habit-value span {
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--text-muted);
}

.water-progress-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.water-fill {
  height: 100%;
  width: 60%;
  background: linear-gradient(90deg, var(--neon-cyan), #38BDF8);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.add-water-btn {
  border: none;
  background: rgba(0, 200, 255, 0.15);
  color: var(--neon-cyan);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s;
}

.add-water-btn:active {
  background: var(--neon-cyan);
  color: #000;
}

/* Category Filter Pills (Horizontal Scroll) */
.category-filter-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-filter-scroller::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-pill.active {
  background: var(--neon-lime);
  color: #000000;
  font-weight: 800;
  box-shadow: 0 4px 14px var(--neon-lime-glow);
  border-color: var(--neon-lime);
}

/* Exercise Cards List */
.exercise-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exercise-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.exercise-card:active {
  transform: scale(0.985);
  background: var(--card-hover);
}

.exercise-preview-box {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.exercise-preview-box img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.exercise-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exercise-info h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

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

.exercise-meta-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  margin-top: 2px;
}

.tag-badge {
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.tag-badge.volt {
  background: rgba(0, 240, 118, 0.12);
  color: var(--neon-lime);
}

/* Meals & Nutrition Cards */
.meals-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meal-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
}

.meal-card-cover {
  width: 100%;
  height: 140px;
  position: relative;
}

.meal-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meal-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,14,23,0) 0%, rgba(10,14,23,0.85) 100%);
}

.meal-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--neon-lime);
  font-weight: 700;
  border: 1px solid rgba(0, 240, 118, 0.3);
}

.meal-card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.meal-title-row h4 {
  font-size: 1.1rem;
  font-weight: 800;
}

.meal-calories-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--neon-coral);
}

.macro-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.macro-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.macro-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}

.meal-recipes-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

.recipe-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recipe-item strong {
  font-size: 0.84rem;
  color: var(--text-primary);
}

.recipe-item span {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* BMI & Health Calculator Card */
.bmi-calculator-box {
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.slider-labels span:last-child {
  color: var(--neon-lime);
  font-size: 1.05rem;
  font-weight: 800;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--neon-lime);
  cursor: pointer;
  box-shadow: 0 0 12px var(--neon-lime-glow);
  border: 2px solid #FFFFFF;
}

.bmi-result-card {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bmi-score-number {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--neon-lime);
  line-height: 1;
}

.bmi-status-tag {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(0, 240, 118, 0.18);
  color: var(--neon-lime);
}

.bmi-advice-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
}

/* iOS Installation Banner */
.ios-install-banner {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.12), rgba(0, 240, 118, 0.08));
  border: 1px solid rgba(0, 200, 255, 0.25);
  cursor: pointer;
}

.install-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  flex-shrink: 0;
}

.install-text h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.install-text p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Modal Bottom Sheets (iOS Native Spring Feel) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  justify-content: center;
  align-items: flex-end;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  max-height: 90dvh;
  background: #0f1522;
  border-radius: 32px 32px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: calc(var(--sab) + 16px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.sheet-handle-bar {
  width: 42px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  margin: 12px auto 8px;
  flex-shrink: 0;
}

.sheet-header {
  padding: 10px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sheet-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.close-sheet-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.close-sheet-btn:active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sheet-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 2-Frame Animation Stage */
.anim-stage-container {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at center, rgba(0, 240, 118, 0.08) 0%, rgba(15, 21, 34, 0.8) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.anim-frame-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5));
}

.anim-loop-indicator {
  position: absolute;
  bottom: 10px;
  display: flex;
  gap: 6px;
}

.loop-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.loop-dot.active {
  background: var(--neon-lime);
  box-shadow: 0 0 8px var(--neon-lime);
  width: 18px;
}

/* Workout Active Player Modal */
.player-modal {
  position: fixed;
  inset: 0;
  background: #080c14;
  z-index: 120;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--sat) + 16px) 24px calc(var(--sab) + 24px);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-modal.open {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

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

.exit-player-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.player-progress-pill {
  font-size: 0.82rem;
  color: var(--neon-lime);
  font-weight: 800;
}

.player-center-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.player-timer-circle {
  width: 140px;
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.timer-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.player-exercise-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
}

.player-exercise-reps {
  font-size: 1rem;
  color: var(--neon-cyan);
  font-weight: 700;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.player-btn {
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.player-btn:active {
  transform: scale(0.92);
}

.player-btn-secondary {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.player-btn-primary {
  width: 74px;
  height: 74px;
  background: var(--neon-lime);
  color: #000;
  box-shadow: 0 0 28px var(--neon-lime-glow);
}

/* Floating iOS Bottom Dock Navigation */
.bottom-dock {
  position: fixed;
  bottom: calc(var(--sab) + 12px);
  width: calc(100% - 32px);
  max-width: 448px;
  height: var(--nav-height);
  border-radius: var(--radius-full);
  background: rgba(18, 24, 36, 0.78);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 50;
  left: 50%;
  transform: translateX(-50%);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  flex: 1;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.nav-item span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.nav-item.active {
  color: var(--neon-lime);
}

.nav-item.active svg {
  transform: translateY(-2px);
}

.nav-active-pill {
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--neon-lime);
  box-shadow: 0 0 8px var(--neon-lime);
  display: none;
}

.nav-item.active .nav-active-pill {
  display: block;
}

/* Toast Notifications */
.toast-msg {
  position: fixed;
  top: calc(var(--sat) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--neon-lime);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 150;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* Voice Coach Toggle Button */
.voice-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-toggle-btn.active {
  background: rgba(0, 240, 118, 0.18);
  border-color: var(--neon-lime);
  color: var(--neon-lime);
  box-shadow: 0 0 12px var(--neon-lime-glow);
}

/* Goal Cards Grid */
.goal-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.goal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.goal-card .goal-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.goal-card strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.goal-card small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.goal-card.active {
  background: rgba(0, 240, 118, 0.12);
  border-color: var(--neon-lime);
  box-shadow: 0 0 16px var(--neon-lime-glow);
}

.goal-card.active strong {
  color: var(--neon-lime);
}

/* Workout History List */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item-info strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.history-item-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.history-item-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.history-burn {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--neon-coral);
}

.history-time {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Achievements Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.achievement-badge {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  opacity: 0.45;
  filter: grayscale(0.8);
  transition: all 0.25s ease;
}

.achievement-badge.unlocked {
  opacity: 1;
  filter: grayscale(0);
  background: rgba(0, 200, 255, 0.08);
  border-color: rgba(0, 200, 255, 0.3);
  box-shadow: 0 4px 14px rgba(0, 200, 255, 0.15);
}

.achievement-badge .ach-icon {
  font-size: 1.6rem;
}

.achievement-badge strong {
  font-size: 0.82rem;
  color: var(--text-primary);
}

.achievement-badge small {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

