/* ============================================================
   DISPATCHER — dispatcher-panels.css
   Controls the home <-> game panel switching.
   Both panels live in the DOM at all times; only one is visible.
   ============================================================ */

/* Every panel fills the full viewport and is hidden by default */
.app-panel {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 0;
}

/* The active panel is visible and scrollable (home needs scroll, game does not) */
.app-panel--active {
  opacity: 1;
  pointer-events: all;
  z-index: 1;
}

/* Home panel needs to scroll because it has sections below the fold */
#panel-home.app-panel--active {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Game panel is completely fixed — no scroll */
#panel-game.app-panel--active {
  overflow: hidden;
}

/* ── Transition: slide + fade ──────────────────────────────
   When switching home → game, home slides left and fades out,
   game slides in from the right.
   When switching game → home, the reverse happens.           */

.app-panel--exit-left {
  animation: panelExitLeft 0.35s ease forwards;
}
.app-panel--enter-right {
  animation: panelEnterRight 0.35s ease forwards;
  pointer-events: all;
  z-index: 2;
}
.app-panel--exit-right {
  animation: panelExitRight 0.35s ease forwards;
}
.app-panel--enter-left {
  animation: panelEnterLeft 0.35s ease forwards;
  pointer-events: all;
  z-index: 2;
}

@keyframes panelExitLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-40px); }
}
@keyframes panelEnterRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes panelExitRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}
@keyframes panelEnterLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Loading screen shown briefly when entering game ───────  */
.game-loading {
  position: fixed;
  inset: 0;
  background: #0e1117;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.game-loading.fade-out {
  opacity: 0;
  pointer-events: none;
}
.game-loading__logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: #f97316;
  filter: drop-shadow(0 0 12px rgba(249,115,22,.5));
}
.game-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(249,115,22,.2);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: loadSpin .7s linear infinite;
}
.game-loading__text {
  font-family: 'Share Tech Mono', monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  color: #4a5568;
  text-transform: uppercase;
}
@keyframes loadSpin { to { transform: rotate(360deg); } }