/* ==========================================================================
   Mahan English (ماهان اینگلیش) — Gamified UI Components (Blue Theme)
   Version: 0.2.1 (Phase 2 — 3D Isometric Winding Path & Replaceable Props)
   ========================================================================== */

/* Cards */
.mahan-card {
  background: var(--mahan-surface);
  border: 1.5px solid var(--mahan-border);
  border-radius: var(--mahan-radius-lg);
  padding: 16px;
  box-shadow: var(--mahan-shadow-xs);
  margin-bottom: 14px;
}

.mahan-card--blue {
  background: linear-gradient(135deg, var(--mahan-primary-500) 0%, var(--mahan-primary-700) 100%);
  border-color: var(--mahan-primary-600);
  color: var(--mahan-text-inverse);
}

/* Tactile 3D Gamified Buttons */
.mahan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: var(--mahan-radius-md);
  font-family: var(--mahan-font-fa);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 90ms ease, box-shadow 90ms ease, background 140ms ease;
  text-decoration: none;
  user-select: none;
}

.mahan-btn--block {
  width: 100%;
}

.mahan-btn--primary {
  background: var(--mahan-primary-500);
  color: #FFFFFF;
  box-shadow: 0 4px 0 var(--mahan-primary-700);
}

.mahan-btn--primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--mahan-primary-700);
}

.mahan-btn--success {
  background: var(--mahan-success-500);
  color: #FFFFFF;
  box-shadow: 0 4px 0 var(--mahan-success-700);
}

.mahan-btn--success:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--mahan-success-700);
}

.mahan-btn--outline {
  background: var(--mahan-surface);
  color: var(--mahan-primary-700);
  border-color: var(--mahan-border-strong);
  box-shadow: 0 3px 0 var(--mahan-border);
}

.mahan-btn--outline:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--mahan-border);
}

/* HUD Stat Pills */
.mahan-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--mahan-radius-pill);
  font-size: 12px;
  font-weight: 800;
  background: var(--mahan-bg-subtle);
  color: var(--mahan-primary-800);
}

.mahan-stat-pill--streak {
  background: var(--mahan-warning-50);
  color: var(--mahan-warning-700);
}

.mahan-stat-pill--hearts {
  background: var(--mahan-danger-50);
  color: var(--mahan-danger-700);
}

.mahan-stat-pill--xp {
  background: var(--mahan-primary-50);
  color: var(--mahan-primary-700);
}

/* Progress Bars */
.mahan-progress {
  width: 100%;
  height: 12px;
  background: var(--mahan-bg-subtle);
  border-radius: var(--mahan-radius-pill);
  overflow: hidden;
}

.mahan-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--mahan-primary-400), var(--mahan-primary-500));
  border-radius: var(--mahan-radius-pill);
  transition: width 320ms var(--mahan-ease);
}

/* ==========================================================================
   3D Isometric Winding Learning Path & Replaceable PNG/SVG Props
   ========================================================================== */

.mahan-path-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 18px 8px 26px;
}

.mahan-path-row {
  position: relative;
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Winding S-Curve Horizontal Offsets */
.mahan-offset-c  { transform: translateX(0); }
.mahan-offset-r1 { transform: translateX(36px); }
.mahan-offset-r2 { transform: translateX(68px); }
.mahan-offset-l1 { transform: translateX(-36px); }
.mahan-offset-l2 { transform: translateX(-68px); }

/* 3D Extruded Isometric Puck Node */
.mahan-puck-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.mahan-puck {
  position: relative;
  width: 74px;
  height: 62px;
  border-radius: 50%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.mahan-puck::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 14px;
  right: 14px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.mahan-puck--completed {
  background: linear-gradient(180deg, #3894FF 0%, #1D7AFC 100%);
  color: #FFFFFF;
  box-shadow: 0 9px 0 #0B55BF, 0 14px 20px rgba(15, 98, 214, 0.24);
}

.mahan-puck--completed:active {
  transform: translateY(5px);
  box-shadow: 0 4px 0 #0B55BF;
}

.mahan-puck--practice {
  background: linear-gradient(180deg, #FCD34D 0%, #F59E0B 100%);
  color: #78350F;
  box-shadow: 0 9px 0 #B45309, 0 14px 20px rgba(217, 119, 6, 0.24);
}

.mahan-puck--active {
  background: linear-gradient(180deg, #4B96FF 0%, #1D7AFC 100%);
  color: #FFFFFF;
  box-shadow: 0 9px 0 #0A46A3, 0 0 0 10px rgba(29, 122, 252, 0.16);
}

.mahan-puck--active:active {
  transform: translateY(5px);
  box-shadow: 0 4px 0 #0A46A3, 0 0 0 8px rgba(29, 122, 252, 0.14);
}

.mahan-puck--locked {
  background: linear-gradient(180deg, #E8EEF6 0%, #D4DFEE 100%);
  color: #8CA0BA;
  box-shadow: 0 8px 0 #B6C5DA;
  cursor: not-allowed;
}

/* Stacked Milestone Locked Puck (like multi-disc stack in reference) */
.mahan-puck--stacked {
  background: linear-gradient(180deg, #E8EEF6 0%, #D4DFEE 100%);
  color: #8CA0BA;
  box-shadow:
    0 7px 0 #B6C5DA,
    0 11px 0 #DCE5F2,
    0 18px 0 #AEBFD6;
  cursor: not-allowed;
}

/* Active Outer Ring & Bouncing "شروع!" Callout Bubble */
.mahan-active-ring {
  position: relative;
  padding: 10px;
  border-radius: 50%;
  border: 6px solid #D9EAFF;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgba(29, 122, 252, 0.16);
}

.mahan-start-bubble {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mahan-primary-600);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15, 98, 214, 0.32);
  animation: mahan-bounce 1.8s ease-in-out infinite;
  z-index: 5;
}

.mahan-start-bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 7px 0 7px;
  border-style: solid;
  border-color: var(--mahan-primary-600) transparent transparent transparent;
}

/* Admin-Replaceable Side-of-Path Scene Props (PNG / WebP / SVG) */
.mahan-prop-slot {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  z-index: 1;
}

.mahan-prop-slot--left  { left: 10px; }
.mahan-prop-slot--right { right: 10px; }

.mahan-prop-img {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(11, 31, 58, 0.12));
  transition: transform 180ms var(--mahan-ease);
}

.mahan-prop-img:hover {
  transform: scale(1.06);
}

.mahan-chest-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.mahan-path-node-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--mahan-text-secondary);
  margin-top: 12px;
  text-align: center;
}

/* Exercise Option Tiles */
.mahan-option-tile {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: var(--mahan-surface);
  border: 2px solid var(--mahan-border);
  border-radius: var(--mahan-radius-md);
  box-shadow: 0 3px 0 var(--mahan-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color 140ms ease, background 140ms ease, transform 90ms ease;
}

.mahan-option-tile.is-selected {
  background: var(--mahan-primary-50);
  border-color: var(--mahan-primary-500);
  box-shadow: 0 3px 0 var(--mahan-primary-500);
}

.mahan-option-tile.is-correct {
  background: var(--mahan-success-50);
  border-color: var(--mahan-success-500);
  box-shadow: 0 3px 0 var(--mahan-success-600);
}

.mahan-option-tile.is-wrong {
  background: var(--mahan-danger-50);
  border-color: var(--mahan-danger-500);
  box-shadow: 0 3px 0 var(--mahan-danger-600);
}

/* Word Bank Chips */
.mahan-word-chip {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--mahan-radius-sm);
  border: 2px solid var(--mahan-border);
  background: var(--mahan-surface);
  box-shadow: 0 3px 0 var(--mahan-border);
  font-family: var(--mahan-font-en);
  font-size: 15px;
  font-weight: 600;
  color: var(--mahan-text-primary);
  cursor: pointer;
}

/* Feedback Banner */
.mahan-feedback {
  border-radius: var(--mahan-radius-lg);
  padding: 14px 16px;
  margin-top: 12px;
  font-size: 13px;
}

.mahan-feedback--correct {
  background: var(--mahan-success-50);
  border: 1.5px solid var(--mahan-success-500);
  color: var(--mahan-success-700);
}

.mahan-feedback--wrong {
  background: var(--mahan-danger-50);
  border: 1.5px solid var(--mahan-danger-500);
  color: var(--mahan-danger-700);
}

/* Jalali Date Pill */
.mahan-jalali-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--mahan-radius-pill);
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 700;
}

@keyframes mahan-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}
