/* ==========================================================================
   CHILD PATHSHALA - PROGRESSIVE LEVELS QUEST STUDIO ENGINE
   Theme: Mountain Trail Quest, Unlocking Gateways, Star Mastery & Phonics
   ========================================================================== */

:root {
  --lv-bg: #090e1a;
  --lv-card: #131c2e;
  --lv-border: #23334d;
  --lv-primary: #38bdf8;
  --lv-gold: #f59e0b;
  --lv-green: #10b981;
  --lv-rose: #f43f5e;
  --lv-purple: #8b5cf6;
}

.lv-wrapper {
  background: radial-gradient(circle at 50% 15%, #1e1b4b 0%, #090e1a 70%);
  border-radius: 26px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  padding: 1.5rem;
  max-width: 840px;
  margin: 0 auto;
  font-family: system-ui, -apple-system, sans-serif;
  position: relative;
  overflow: hidden;
}

/* Level Stepper / Quest Map Track */
.lv-quest-map {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.25rem 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.lv-map-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

/* Connecting trail line behind steps */
.lv-map-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 4px;
  background: #1e293b;
  transform: translateY(-50%);
  z-index: 1;
}

.lv-step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lv-step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;
  border: 3px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #94a3b8;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lv-step-node.completed .lv-step-circle {
  background: #064e3b;
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.lv-step-node.active .lv-step-circle {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
  transform: scale(1.18);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  animation: lvPulse 1s ease infinite alternate;
}

@keyframes lvPulse {
  0% { transform: scale(1.12); }
  100% { transform: scale(1.22); }
}

.lv-step-node.locked .lv-step-circle {
  background: #0f172a;
  border-color: #334155;
  color: #475569;
  opacity: 0.6;
}

.lv-step-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.lv-step-node.active .lv-step-label {
  color: #38bdf8;
}

/* Quest HUD bar */
.lv-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.lv-hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Active Level Question Arena */
.lv-question-card {
  background: rgba(19, 28, 46, 0.95);
  border: 1px solid var(--lv-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  margin-bottom: 1.25rem;
  text-align: center;
}

.lv-question-prompt {
  font-size: clamp(1.25rem, 3.5vw, 1.85rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem;
}

.lv-question-hint {
  font-size: 0.92rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 0.25rem;
  border: 1px solid rgba(255,255,255,0.06);
}

/* MCQ Options Grid */
.lv-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

@media (max-width: 580px) {
  .lv-options-grid {
    grid-template-columns: 1fr;
  }
}

.lv-opt-btn {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #334155;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.lv-opt-btn:hover:not(:disabled) {
  border-color: var(--lv-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
}

.lv-opt-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.lv-opt-btn.correct {
  background: linear-gradient(180deg, #059669 0%, #064e3b 100%);
  border-color: #34d399;
  box-shadow: 0 0 25px rgba(52, 211, 153, 0.5);
}

.lv-opt-btn.wrong {
  background: linear-gradient(180deg, #dc2626 0%, #7f1d1d 100%);
  border-color: #f87171;
  box-shadow: 0 0 25px rgba(248, 113, 113, 0.4);
}

/* Spelling / Text Input Item */
.lv-spelling-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  max-width: 480px;
  margin: 1.5rem auto 0.5rem;
}

.lv-spelling-input {
  flex-grow: 1;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.lv-spelling-input:focus {
  border-color: var(--lv-primary);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.lv-btn-check {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #042f2e;
  font-weight: 800;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s;
}

.lv-btn-check:active {
  transform: scale(0.95);
}

/* Gateway Level Transition Modal / Banner */
.lv-gateway-modal {
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #10b981;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  animation: lvBounceIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lvBounceIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.lv-stars-row {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Post-Quest Trophy Hall */
.lv-hall-wrap {
  text-align: center;
  padding: 2rem 1rem;
}

.lv-hall-trophy {
  font-size: 4rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .lv-wrapper {
    padding: 1rem 0.75rem;
    border-radius: 18px;
  }
  .lv-map-steps {
    gap: 4px;
  }
  .lv-step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  .lv-step-name {
    font-size: 0.68rem;
  }
  .lv-opt-btn {
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
    min-height: 52px;
  }
  .lv-prompt-text {
    font-size: 1.25rem;
  }
  .lv-spelling-form {
    flex-direction: column;
    gap: 8px;
  }
  .lv-spelling-input {
    width: 100%;
    box-sizing: border-box;
  }
  .lv-btn-check {
    width: 100%;
  }
}
