/* ==========================================================================
   CHILD PATHSHALA WORDFORK EXPEDITION STUDIO ENGINE CSS
   High-energy branching road & spelling junction adventure studio
   ========================================================================== */

:root {
  --wf-bg: #090e17;
  --wf-road: #1e293b;
  --wf-road-line: #f59e0b;
  --wf-branch-left: #06b6d4;
  --wf-branch-right: #ec4899;
  --wf-branch-center: #10b981;
  --wf-card-bg: rgba(15, 23, 42, 0.88);
  --wf-border: rgba(148, 163, 184, 0.2);
  --wf-text: #f8fafc;
}

.wf-wrapper {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  min-height: 600px;
  background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #090e17 80%);
  border: 1px solid var(--wf-border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 45px rgba(245, 158, 11, 0.15);
  color: var(--wf-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

/* Studio HUD Header */
.wf-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--wf-border);
}

.wf-expedition-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 9999px;
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wf-hud-stats {
  display: flex;
  gap: 10px;
}

.wf-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--wf-border);
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

/* Prompt Banner */
.wf-prompt-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 6px solid #f59e0b;
  border-radius: 18px;
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.wf-prompt-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.wf-prompt-sub {
  font-size: 0.92rem;
  color: #94a3b8;
}

/* Interactive Road Fork Visual Stage */
.wf-fork-stage {
  position: relative;
  width: 100%;
  height: 290px;
  background: radial-gradient(circle at 50% 100%, #1e293b 0%, #0a0f1d 75%);
  border: 1px solid var(--wf-border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.wf-svg-road {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Fork Junction Signposts */
.wf-branches-container {
  position: absolute;
  top: 24px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding: 0 40px;
  box-sizing: border-box;
  z-index: 5;
}

.wf-signpost {
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid var(--wf-branch-left);
  border-radius: 16px;
  padding: 12px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  min-width: 180px;
  backdrop-filter: blur(10px);
}

.wf-signpost.right-branch {
  border-color: var(--wf-branch-right);
}

.wf-signpost.active {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 15px 35px rgba(6, 182, 212, 0.4);
}

.wf-signpost.right-branch.active {
  box-shadow: 0 15px 35px rgba(236, 72, 153, 0.4);
}

.wf-signpost.completed {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.15) !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35) !important;
}

.wf-signpost-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.wf-word-display {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
}

.wf-word-display .stem {
  color: #fbbf24;
}

.wf-word-display .slot {
  display: inline-block;
  min-width: 24px;
  border-bottom: 3px solid #38bdf8;
  color: #38bdf8;
  text-align: center;
  margin: 0 2px;
}

/* Base Stem Platform (Bottom Center) */
.wf-stem-pedestal {
  position: relative;
  z-index: 6;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #fbbf24;
  border-radius: 9999px;
  padding: 10px 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.wf-stem-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.wf-stem-text {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 2px;
}

/* Active Clue Box */
.wf-clue-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--wf-border);
  border-radius: 18px;
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wf-clue-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wf-clue-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.wf-clue-text {
  font-size: 1.1rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.wf-clue-text strong {
  color: #38bdf8;
}

/* Letter Tile Pool */
.wf-tiles-section {
  text-align: center;
  margin-bottom: 24px;
}

.wf-tiles-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.wf-letter-tile {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  width: 58px;
  height: 64px;
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.wf-letter-tile:hover {
  border-color: #38bdf8;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.wf-letter-tile.disabled {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.95);
}

/* Action Controls Row */
.wf-actions-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.wf-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.wf-btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #042f2e;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}
.wf-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.6);
}

.wf-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--wf-border);
  color: #cbd5e1;
}
.wf-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* Victory Overlay */
.wf-victory-box {
  text-align: center;
  padding: 44px 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.95) 100%);
  border: 2px solid #fbbf24;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(245, 158, 11, 0.25);
  animation: wf-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@media (max-width: 640px) {
  .wf-branches-container {
    padding: 0 10px;
  }
  .wf-signpost {
    min-width: 130px;
    padding: 8px 12px;
  }
  .wf-word-display {
    font-size: 1.25rem;
  }
  .wf-letter-tile {
    width: 46px;
    height: 52px;
    font-size: 1.4rem;
  }
}
