/* ─── Navixar — "Let's Take A Break" Intervals ───
   1. Shared break framing
   2. The Junction (crossing sim + ADAS question)
   3. You Be The Model (labelling game)
   Stages stay dark in light mode — they're game panels.
*/

/* ── 1. Shared ── */
.break-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px dashed rgba(255, 183, 77, 0.6); border-radius: 20px;
  padding: 8px 18px; margin-bottom: 20px;
  font: 700 12px/1 'Space Grotesk', sans-serif; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--marigold, #FFD700);
  background: rgba(255, 183, 77, 0.06);
}
.break-stage {
  position: relative; margin-top: 40px; padding: 0 !important; overflow: hidden;
  background: #0d0a1c !important; border-color: rgba(255,183,77,.35) !important;
  min-height: 440px;
}
/* CRITICAL: our display rules must not defeat the hidden attribute —
   otherwise quiz/end overlays cover the games from page load */
.break-stage [hidden] { display: none !important; }
.brk-continue {
  display: inline-block; margin-top: 8px; padding: 13px 28px; border-radius: 26px;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #ff9933, #ffd700);
  color: #1a0533; font: 700 14px/1 'Space Grotesk', sans-serif; letter-spacing: .5px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.brk-continue:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,153,51,.35); }
.brk-continue em { font-style: normal; opacity: .7; font-weight: 600; }

/* ── 2. The Junction ── */
#jxCanvas { display: block; width: 100%; height: 520px; touch-action: none; }
.jx-hud {
  position: absolute; top: 14px; left: 16px; right: 16px;
  display: flex; justify-content: space-between; pointer-events: none;
  font: 700 12px/1 'Space Grotesk', sans-serif; letter-spacing: 1px;
}
#jxNear { color: #ff453a; }
#jxGoalLbl { color: #30d158; }
.jx-quiz {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
  padding: 32px; gap: 18px;
  background: rgba(5, 3, 15, 0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.jxq-title { font: 700 clamp(18px, 2.4vw, 26px)/1.3 'Space Grotesk', sans-serif; color: #ffd700; }
.jxq-q { font-size: clamp(15px, 1.8vw, 19px); line-height: 1.5; color: #fdfbf7; max-width: 620px; }
.jxq-q em { color: #ff9933; font-style: normal; font-weight: 700; }
.jxq-opts { display: grid; grid-template-columns: repeat(2, minmax(180px, 240px)); gap: 12px; }
.jxq-opts button {
  padding: 14px 18px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05);
  color: #fdfbf7; font: 600 14px/1.3 Inter, sans-serif; transition: all .25s ease;
}
.jxq-opts button:hover { border-color: #ff9933; background: rgba(255,153,51,.1); }
.jxq-opts button.right { border-color: #30d158; background: rgba(48,209,88,.15); color: #7be29a; }
.jxq-opts button.wrong { border-color: #ff453a; background: rgba(255,69,58,.1); color: #ff8a80; opacity: .7; }
.jxq-reveal p { max-width: 640px; font-size: 15px; line-height: 1.7; color: #fdfbf7; margin-bottom: 16px; }
.jxq-reveal strong { color: #ffd700; }

/* ── 3. You Be The Model ── */
#lbStage { min-height: 480px; }
.lb-road {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 70px, rgba(255,255,255,.09) 70px 74px),
    linear-gradient(180deg, #171130 0%, #241a44 45%, #171130 100%);
}
.lb-road::before, .lb-road::after {
  content: ''; position: absolute; left: 0; right: 0; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,215,0,.35) 0 26px, transparent 26px 52px);
}
.lb-road::before { top: 12%; }
.lb-road::after { bottom: 12%; }
.lb-hud {
  position: absolute; top: 14px; left: 16px; right: 16px; z-index: 5;
  display: flex; justify-content: space-between; pointer-events: none;
  font: 700 12px/1 'Space Grotesk', sans-serif; letter-spacing: 1px;
}
#lbScore { color: #30d158; }
#lbTimer { color: #ffd700; }
#lbMissed { color: #ff453a; }
.lb-item {
  position: absolute; z-index: 3; cursor: pointer; user-select: none;
  font-size: 44px; line-height: 1; padding: 8px; will-change: transform;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.6));
  transition: none;
}
.lb-item.tagged { cursor: default; }
.lb-item.tagged::before {
  content: ''; position: absolute; inset: 0;
  border: 2px solid #30d158; border-radius: 6px;
  box-shadow: 0 0 18px rgba(48,209,88,.5);
}
.lb-item.tagged::after {
  content: attr(data-label) ' ✓'; position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; padding: 3px 8px; border-radius: 5px;
  background: rgba(48,209,88,.9); color: #04120a;
  font: 800 10px/1 'Space Grotesk', sans-serif; letter-spacing: 1px;
}
.lb-item.gone { opacity: 0; transition: opacity .5s ease .6s; }
.lb-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; justify-content: center; align-items: center; text-align: center;
  background: rgba(5, 3, 15, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lb-end-card { max-width: 640px; padding: 32px; }
.lb-end-card p { font-size: 15px; line-height: 1.7; color: #fdfbf7; margin: 14px 0 20px; }
.lb-end-card strong { color: #ffd700; }

/* light mode: break stages remain dark game-panels; only the eyebrow adapts */
html[data-theme="light"] .break-eyebrow { background: rgba(217, 154, 0, 0.1); }

@media (max-width: 780px) {
  #jxCanvas { height: 420px; }
  .jxq-opts { grid-template-columns: 1fr 1fr; }
  .lb-item { font-size: 34px; }
}
