/* Shared reset, typography, presenter bar, transitions */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Step reveal: elements hidden until their step fires */
[data-step] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

[data-step].visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Presenter Bar */
#presenter-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(10, 15, 31, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  z-index: 9999;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#presenter-bar.pb-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.pb-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.pb-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pb-scene {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.pb-step {
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

.pb-hide {
  font-size: 12px;
  width: 24px;
  height: 24px;
  opacity: 0.5;
}

/* Floating help button (top-right, visible when bar is hidden) */
#floating-help {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10, 15, 31, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#floating-help.fh-visible {
  opacity: 1;
  pointer-events: auto;
}

#floating-help:hover {
  background: rgba(10, 15, 31, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Home button in presenter bar */
.pb-home {
  font-size: 14px;
  margin-right: 4px;
}

/* Utility */
.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in-right {
  animation: slideInRight 0.25s ease forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Clickable elements in the narrative */
.narrative-action {
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.narrative-action:hover {
  box-shadow: 0 0 0 2px rgba(1, 118, 211, 0.4);
}
