@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');

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

html, body {
  width: 100%; height: 100%;
  background: #000;
  overflow: hidden;
  font-family: sans-serif;
}

#stage {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Letterboxed 16:9 — min() keeps it inside the viewport on any screen */
#slide-container {
  position: relative;
  width:  min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  overflow: hidden;
  background: #111;
}

/* Image layers: fill their declared bounds exactly as PowerPoint does */
.slide-layer {
  position: absolute;
  display: block;
  object-fit: fill;   /* stretch to match PPT behaviour */
}

/* Invisible clickable zones */
.hotspot {
  position: absolute;
  cursor: pointer;
  background: transparent;
  z-index: 10;
}

.hotspot:hover {
  background: rgba(255, 255, 0, 0.15);
  outline: 2px solid rgba(255, 255, 0, 0.5);
  border-radius: 3px;
}

/* Debug: show all zones */
body.debug .hotspot {
  background: rgba(255, 80, 0, 0.25);
  outline: 2px dashed rgba(255, 80, 0, 0.9);
  border-radius: 3px;
}

.hotspot-label {
  display: none;
  position: absolute;
  bottom: 2px; left: 3px;
  font-size: 10px;
  color: #fff;
  background: rgba(0,0,0,0.75);
  padding: 1px 4px;
  border-radius: 2px;
  pointer-events: none;
  white-space: nowrap;
}

body.debug .hotspot-label { display: block; }

/* Nav bar — hidden until hovered or in debug mode */
#nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: #ccc;
  font-size: 12px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s;
}

#nav-bar:hover,
body.debug #nav-bar { opacity: 1; }

#nav-bar button {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

#nav-bar button:hover  { background: rgba(255,255,255,0.3); }
#nav-bar button:disabled { opacity: 0.3; cursor: default; }

#btn-home {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  line-height: 1.6;
}


/* Text boxes extracted from PPT shapes */
.textbox {
  position: absolute;
  z-index: 5;
  overflow: visible;
  pointer-events: none;
  font-family: 'Fredoka One', 'More Sugar', cursive;
  color: #fff;
  line-height: 1.15;
  padding-top: 1.15em;    /* shift content down ~1 line to match PPT vertical position */
}

.textbox p {
  margin: 0;
  padding: 0;
}

/* Slide transition */
#slide-container {
  transition: opacity 0.18s ease;
}
#slide-container.hidden { opacity: 0; }
