/* 
  General styles for all 3D scenes.
  This ensures consistent layout and behavior.
*/

/* --- Stacking Context and Event Handling --- */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Base layer */
}

/* Scene element containers should sit on top of the canvas */
#box-scene-elements,
#note-scene-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10; /* Higher than canvas */
  pointer-events: none; /* Let clicks fall through to the canvas by default */
  overflow: hidden; /* Prevent content spilling */
}

/* --- End Stacking Context --- */

/* Base style for text lines within any scene */
.scene-text-line {
  position: absolute;
  transform: translateX(-50%);
  left: 50%;
  color: white;
  text-align: center;
  font-family: "DM Serif Text", serif;
  font-size: 1.6rem; /* Common base font size */
  width: 90%; /* Default width, overridden by max-width */
  max-width: 400px; /* Default max width */
  pointer-events: auto; /* Re-enable pointer events for all text blocks */
  font-weight: 400;
}

#box-scene-elements #box-text-above {
  top: 15%;
}

/* Base style for clickable links within any scene */
.scene-link-text {
  /* This is a container for a link, so apply styles here */
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0; /* Hidden initially */
  transition: opacity 0.5s ease-in-out;
  pointer-events: auto; /* Explicitly make links clickable */
}

.scene-link-text a {
  /* Style the actual <a> tag */
  color: #90ee90;
  text-decoration: none;
  font-style: italic;
  font-size: 1.3rem;
  text-transform: lowercase;
}

.scene-link-text.visible {
  opacity: 1;
  pointer-events: auto;
}

.scene-link-text:hover {
  text-decoration: underline;
}

/* Base style for hint text bubbles */
.scene-hint-text {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none; /* Hints are not interactive */
}

.scene-hint-text.visible {
  opacity: 1;
}
