/* ==========================================================================
   escape-room.css — OECTA Staff Room Escape Room Styles
   The School Year Chronicles (10 Monthly Seasonal Editions)
   OECTA Design System: #204164 Navy, #fea520 Amber, Inter + Manrope
   "No-Line" Rule: Tonal elevation shifts instead of 1px borders
   ========================================================================== */

.gc-escape-wrapper {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  color: #1e293b;
  position: relative;
}

/* ── Top Control & Status Bar ───────────────────────────────────────────── */
.gc-escape-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  padding: 14px 20px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(32, 65, 100, 0.08);
  margin-bottom: 14px;
}

.gc-escape-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gc-escape-month-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(32, 65, 100, 0.08);
  color: #204164;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gc-escape-scene-title-badge {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

/* ── Real Wall-Clock Stopwatch Display ─────────────────────────────────── */
.gc-escape-stopwatch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0f172a;
  color: #f8fafc;
  padding: 6px 16px;
  border-radius: 99px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.15);
}

.gc-stopwatch-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: gc-pulse-red 1.2s infinite ease-in-out;
}

@keyframes gc-pulse-red {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.gc-escape-stopwatch-text {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.gc-escape-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gc-escape-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #334155;
  border: none;
  border-radius: 10px;
  padding: 7px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.gc-escape-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

.gc-escape-btn--primary {
  background: #204164;
  color: #ffffff;
}

.gc-escape-btn--primary:hover {
  background: #173250;
  color: #ffffff;
}

.gc-escape-btn--amber {
  background: #f59e0b;
  color: #ffffff;
}

.gc-escape-btn--amber:hover {
  background: #d97706;
  color: #ffffff;
}

/* ── 8-Scene Stepper Bar ────────────────────────────────────────────────── */
.gc-escape-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 14px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.gc-escape-stepper::-webkit-scrollbar {
  display: none;
}

.gc-step-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  background: #ffffff;
  white-space: nowrap;
  border: none;
  cursor: default;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gc-step-node--active {
  background: #204164;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(32, 65, 100, 0.24);
}

.gc-step-node--completed {
  background: #e0f2fe;
  color: #0369a1;
  cursor: pointer;
}

.gc-step-node--completed:hover {
  background: #bae6fd;
}

.gc-step-node--locked {
  opacity: 0.55;
}

/* ── 16:9 Viewport & Interactive Room Canvas ────────────────────────────── */
.gc-escape-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 480px;
  border-radius: 20px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
  user-select: none;
}

@media (max-width: 768px) {
  .gc-escape-viewport {
    aspect-ratio: 4 / 3;
    min-height: 380px;
  }
}

/* Room Backdrops */
.gc-room-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Seasonal Room Atmospheric Lighting */
.gc-room-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.4;
}

/* ── Interactive Hotspots ───────────────────────────────────────────────── */
.gc-escape-hotspot {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border-radius: 12px;
  transition: transform 0.18s ease;
}

.gc-escape-hotspot:hover {
  transform: scale(1.04);
}

.gc-hotspot-pin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  position: relative;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gc-escape-hotspot:hover .gc-hotspot-pin {
  background: #f59e0b;
  color: #0f172a;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
}

.gc-hotspot-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 99px;
  border: 2px solid rgba(245, 158, 11, 0.6);
  animation: gc-radar-pulse 2s infinite ease-out;
  pointer-events: none;
}

@keyframes gc-radar-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.gc-hotspot-solved {
  opacity: 0.72;
}

.gc-hotspot-solved .gc-hotspot-pin {
  background: rgba(16, 185, 129, 0.85);
  color: #ffffff;
}

.gc-hotspot-solved .gc-hotspot-pulse-ring {
  border-color: rgba(16, 185, 129, 0.5);
}

/* ── Narrative & Dialogue Box ───────────────────────────────────────────── */
.gc-escape-narrative-bar {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 4px 18px rgba(32, 65, 100, 0.06);
}

.gc-narrative-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #204164, #336192);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(32, 65, 100, 0.2);
}

.gc-narrative-content {
  flex: 1;
}

.gc-narrative-speaker {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 3px;
}

.gc-narrative-text {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #1e293b;
  font-weight: 500;
}

.gc-narrative-text--success {
  color: #059669;
  font-weight: 600;
}

.gc-narrative-text--warn {
  color: #d97706;
  font-weight: 600;
}

/* ── Floating Bottom Inventory HUD Dock ─────────────────────────────────── */
.gc-escape-dock {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 18px;
  padding: 14px 20px;
  margin-top: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  color: #ffffff;
}

.gc-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

.gc-dock-selection-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 800;
}

.gc-inventory-slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

@media (max-width: 600px) {
  .gc-inventory-slots {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gc-inv-slot {
  height: 64px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
  user-select: none;
}

.gc-inv-slot:hover {
  background: rgba(255, 255, 255, 0.12);
}

.gc-inv-slot--empty {
  cursor: default;
  background: rgba(255, 255, 255, 0.03);
}

.gc-inv-slot--selected {
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 0 2px #f59e0b, 0 4px 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

.gc-inv-icon {
  font-size: 22px;
  color: #f8fafc;
}

.gc-inv-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Modals & Overlays ──────────────────────────────────────────────────── */
.gc-escape-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: gc-fade-in 0.22s ease-out;
}

@keyframes gc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gc-escape-modal {
  background: #ffffff;
  border-radius: 22px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
  animation: gc-scale-up 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gc-scale-up {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Briefing Modal Header with High-Stakes Warning */
.gc-briefing-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  padding: 24px 28px 20px;
  position: relative;
}

.gc-briefing-warning-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ef4444;
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.gc-briefing-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  font-family: var(--font-display, 'Manrope', sans-serif);
}

.gc-briefing-sub {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.gc-briefing-body {
  padding: 24px 28px;
  max-height: 70vh;
  overflow-y: auto;
}

.gc-briefing-card {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.gc-briefing-card h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.gc-briefing-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #475569;
}

.gc-briefing-month-picker {
  margin-bottom: 18px;
}

.gc-briefing-month-picker label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}

.gc-briefing-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
}

.gc-briefing-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 0 28px 24px;
}

/* ── Mechanical Keypad Modal ────────────────────────────────────────────── */
.gc-keypad-card {
  max-width: 400px;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  padding: 24px;
}

.gc-keypad-screen {
  background: #020617;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
  position: relative;
}

.gc-keypad-prompt {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
}

.gc-keypad-display-digits {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: #38bdf8;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gc-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.gc-keypad-btn {
  height: 52px;
  border-radius: 12px;
  background: #334155;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 0 #1e293b;
  transition: all 0.1s ease;
}

.gc-keypad-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #1e293b;
}

.gc-keypad-btn--clear {
  background: #dc2626;
  box-shadow: 0 4px 0 #991b1b;
  font-size: 0.9rem;
}

.gc-keypad-btn--enter {
  background: #16a34a;
  box-shadow: 0 4px 0 #15803d;
  font-size: 0.9rem;
}

.gc-keypad-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Shake animation for incorrect answer */
.gc-keypad-shake {
  animation: gc-shake 0.4s ease-in-out;
}

@keyframes gc-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ── Victory Celebration Modal ──────────────────────────────────────────── */
.gc-victory-card {
  max-width: 520px;
  background: #ffffff;
  border-radius: 24px;
  text-align: center;
  padding: 36px 32px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.gc-victory-icon-burst {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.4);
  margin-bottom: 20px;
  animation: gc-bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gc-bounce-in {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

.gc-victory-title {
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}

.gc-victory-time-banner {
  background: #0f172a;
  color: #38bdf8;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 12px 24px;
  border-radius: 14px;
  margin: 18px 0;
  display: inline-block;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}

.gc-victory-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
}

.gc-victory-stat-box {
  background: #f8fafc;
  padding: 12px;
  border-radius: 12px;
}

.gc-victory-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #204164;
}

.gc-victory-stat-lbl {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}
