.full-page-card.exercise-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem 1.2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background: var(--color-bg-alt);
    color: var(--color-text);
}

/* ویدیو */
/* ویدیو داخل کارت */
.item-video {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--video-bg);
}

.reel-video {
  width: 100%;
  display: block;
  max-height: 200;
}

/* کنترل‌های ویدیو داخل کارت */
.video-controls {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
}

.video-btn {
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* مودال ویدیو – تمام صفحه */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.video-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.reel-video-modal {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* کنترل‌های مودال */
.video-modal-controls {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.5rem 0.7rem 0.7rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.video-modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.video-modal-main-controls {
  display: flex;
  gap: 0.35rem;
}

/* پروگرس بار ویدیو */
.video-progress-container {
  width: 100%;
}

#videoProgress {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: var(--video-progress-bg);
  outline: none;
}

/* استایل انگشتک رنج */
#videoProgress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--video-progress-fill);
  cursor: pointer;
}

#videoProgress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--video-progress-fill);
  cursor: pointer;
}


/* متن‌ها */
.title {
    margin-top: 0.3rem;
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
}

.sets-info,
.target-info {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* متادیتای حرکت – جمع‌وجور */
.exercise-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.4rem;
    font-size: 0.8rem;
}

.meta-item {
    padding: 0.45rem 0.5rem;
    border-radius: 10px;
    background: var(--color-bg);
    border: var(--border);
    text-align: right;
}

.meta-item .label {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-secondary);
}

.meta-item .value {
    font-weight: 600;
    color: var(--color-text);
}

/* کارت تایمر */
.timer-card {
    margin-top: 0.4rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: var(--color-bg);
    border: var(--border);
    text-align: right;
    font-size: 0.85rem;
}

.timer-card h5 {
    margin-bottom: 0.4rem;
    color: var(--color-text);
    font-size: 0.9rem;
}

.timer-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.2rem;
    color: var(--color-text-secondary);
}

/* نمایش تایمر */
/* نمایش تایمر */
.timer-display {
    margin-top: 0.3rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-text);
    transition: color 0.2s ease, transform 0.2s ease;
}

/* ۱۵ ثانیه آخر – هشدار نارنجی */
.timer-display.warning {
    color: var(--color-warning);
    animation: pulse-warning 1s infinite;
}

/* ۵ ثانیه آخر – هشدار قرمز */
.timer-display.danger {
    color: var(--color-error);
    animation: pulse-danger 0.5s infinite;
}

/* انیمیشن‌ها */
@keyframes pulse-warning {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}

@keyframes pulse-danger {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}


/* دکمه‌های تایمر */
.timer-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.45rem;
    justify-content: space-between;
}

/* دکمه‌ها */
.btn {
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-secondary {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: var(--border);
}

.btn-success {
    background: var(--color-success);
    color: var(--color-white);
}

.btn-link {
    background: transparent;
    color: var(--color-accent);
}

/* جزئیات – مخفی تا وقتی دکمه رو بزنی */
.exercise-details {
    text-align: right;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    max-height: 999px;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.exercise-details.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.exercise-details h5 {
    margin-top: 0.4rem;
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
    color: var(--color-text);
}

.exercise-details ol,
.exercise-details ul {
    padding-right: 1rem;
    margin-bottom: 0.3rem;
}

/* فوتر */
.exercise-footer {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: var(--border);
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

/* وقتی حرکت رو done می‌کنی */
.exercise-page.done {
    border: var(--border-3-primary-light);
}




/* Global Audio Player */
.global-audio-player {
  position: sticky;
  top: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1.5fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.9rem;
  background: var(--navbar-bg);
  border-bottom: var(--border);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* بخش عنوان ترک */
.audio-main-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audio-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.audio-subtitle {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* دکمه‌های وسط (کنترل اصلی) */
.audio-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.audio-btn {
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.45rem;
  font-size: 0.8rem;
  cursor: pointer;
  background: var(--color-bg);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.audio-btn.primary {
  background: var(--color-primary);
  color: var(--color-white);
}

/* بخش راست: تایم + پروگرس + ولوم */
.audio-right {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.audio-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--color-text-secondary);
}

#audioProgress {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: var(--video-progress-bg);
  outline: none;
}

#audioProgress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--video-progress-fill);
  cursor: pointer;
}

#audioProgress::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--video-progress-fill);
  cursor: pointer;
}

.audio-volume-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

#audioVolume {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: var(--video-progress-bg);
  outline: none;
}

#audioVolume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--video-progress-fill);
  cursor: pointer;
}

#audioVolume::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--video-progress-fill);
  cursor: pointer;
}

/* ریسپانسیو – روی موبایل، کمی فشرده‌تر */
@media (max-width: 480px) {
  .global-audio-player {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 0.3rem;
  }

  .audio-center {
    grid-column: 2;
  }

  .audio-right {
    grid-column: 1 / span 2;
  }

  .audio-subtitle {
    display: none;
  }
}
