/*
  main.css — chrome exclusivo de la vista principal (index.html).
  Escala el canvas fijo de 1280x720 a la ventana real y dibuja los
  controles de navegación. Los controles viven FUERA del canvas escalado
  y son los únicos elementos con handler de click para avanzar/retroceder:
  el cuerpo de la slide nunca tiene un listener de click, así seleccionar
  texto con el mouse nunca dispara una navegación.
*/

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b0c10;
}

.stage-outer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage {
  position: relative;
  flex: none;
  width: 1280px;
  height: 720px;
  transform-origin: center center;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}

.viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Neutro y oscuro (no var(--paper), que es el claro institucional por
     defecto): durante el fundido entre slides se asoma el fondo del
     viewport un instante, y si fuera claro se ve un flash blanco al
     transicionar hacia/entre slides con piel nexosur. */
  background: #0b0c10;
}

/* Estados de transición (deslizamiento + fundido) */
.slide.is-entering-right { transform: translateX(3.5%); opacity: 0; }
.slide.is-entering-left { transform: translateX(-3.5%); opacity: 0; }
.slide.is-active { transform: translateX(0); opacity: 1; }
.slide.is-leaving-left { transform: translateX(-3.5%); opacity: 0; }
.slide.is-leaving-right { transform: translateX(3.5%); opacity: 0; }

/* ---------- Chrome fijo (fuera del canvas escalado) ---------- */
.chrome {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.progress-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: #8b5cf6;
  transition: width 0.35s ease;
}

.toolbar-top {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.ghost-btn {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f0edf8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.ghost-btn:hover { background: rgba(255, 255, 255, 0.16); }
.ghost-btn:active { transform: scale(0.97); }
.ghost-btn.small { font-size: 12px; padding: 6px 12px; }

.navbar-bottom {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  background: rgba(20, 22, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #f0edf8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.nav-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }
.nav-btn:active:not(:disabled) { transform: scale(0.94); }
.nav-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.navbar-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 190px;
  color: #f0edf8;
  user-select: none;
}
.counter {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.act-label {
  font-size: 12px;
  color: rgba(242, 237, 225, 0.65);
  margin-top: 2px;
  text-align: center;
}

@media (max-width: 720px) {
  .toolbar-top .ghost-btn span.full { display: none; }
}
