:root {
  --char-height: 50vmin;
  --char-width: 30vmin;
  --char-posl: 36vmin;
  --char-post: 14vmin;
  --map-height: 3vmin;
  --map-width: 24vmin;
  --map-background-color: white;
  --map-font-size: 2.5vmin;
}

/* Reset / base */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: black;
  overflow: hidden;
  font-family: 'Times New Roman', Times, serif;
}

/* Container that holds canvas + UI overlays */
.flex-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: black;
}

/* Fullscreen canvas */
/* Fullscreen canvas */
#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
  object-fit: contain;
  position: absolute;
  /* overlay system */
  top: 0;
  left: 0;
  z-index: 0;
  /* behind the UI */
}

/* UI overlay container */
.ui-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  /* above the canvas */
  pointer-events: none;
  /* disabled by default */
}

.ui-container .clickable {
  pointer-events: auto;
  /* clickable again */
}

/* Re-enable pointer events only on clickable UI elements */
.ui-container .clickable {
  pointer-events: auto;
  display: block;
  background-size: cover;
  background-position: center;

}

/* --- NAVIGATION BAR --- */
/* .nav {
  pointer-events: auto;
  background: rgba(144, 205, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(200, 230, 250, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  position: absolute;
  display: flex;
  height: 7vmin;
  width: 30vmin;
  left: 50%;
  transform: translateX(-50%);
  top: 89vmin;
  border-style: ridge;
  border-width: 2px;
  align-items: center;
  justify-content: center;
  gap: 2vmin;

} */
.nav {
  pointer-events: auto;
  border-radius: 10.2vmin 9.8vmin 10.2vmin 9.8vmin;
  background: rgba(119, 178, 255, 0.05);
  backdrop-filter: blur(4px);
  box-shadow: inset 2px 2px 1px 0 rgba(247, 248, 255, 0.3),
    inset -2px -2px 2px 1px rgba(223, 224, 238, 0.3), 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
  ;
  position: absolute;
  display: flex;
  height: 7vmin;
  width: 30vmin;
  left: 50%;
  transform: translateX(-50%);
  top: 89vmin;

  align-items: center;
  justify-content: center;
  /* center all buttons together */
  gap: 2vmin;
  /* space between them */
}

.back,
.home,
.sound,
.fx {
  cursor: pointer;

  background-size: cover;
  background-position: center;
  height: 5vmin;
  width: 5vmin;
}

.back {
  background-image: url('../assets/img/ui/back2.png');
}

.home {
  background-image: url('../assets/img/ui/home.png');
}

.sound {
  background-image: url('../assets/img/ui/audio2.png');
}

.fx {
  background-image: url('../assets/img/ui/info.webp');
}

.back,
.home,
.sound,
.fx {
  transition: transform .3s ease-in-out;

}

.back:hover,
.home:hover,
.sound:hover,
.fx:hover {
  /* transform: scale(1.1) ; */
  transform: translateY(-6px);
}

/* --- ROOM CLICKABLES (examples) --- */
.hoverbook,
.cdZoomDiv,
.toComputer,
.openDrawerDiv,
.closeDrawerDiv,
.toHardDriveDiv,
.toClosedDrawer,
.toCDTrayDiv,
.toIFFPreview,
.hovermouse {

  position: absolute;
  background-size: cover;
  background-position: center;

}

.hoverbook {
  height: 9vmin;
  width: 23vmin;
  left: 66vw;
  top: 65vh;
  rotate: -4deg;
  transform: skew(0deg, 5deg);
  border-radius: 10px;

}

/* .hoverbook:hover {

      background-image: url('../assets/overlay/journal_overlay.webp');
} */

.cdZoomDiv {
  height: 15vh;
  width: 12vw;
  left: 20.5vw;
  top: 48vh;
  rotate: 0deg;
  transform: skew(1deg, 1deg);
  border-radius: 10px;


}

/* .cdZoomDiv:hover {

            background-image: url('../assets/overlay/cd_overlay.webp');
} */

.toComputer {
  height: 38vmin;
  width: 41vmin;
  left: 48vmin;
  top: 30vmin;
  rotate: 5deg;
}

/* .toComputer:hover {
  box-shadow: 0 0 52px rgba(255, 255, 255, 0.75),
    inset 0 0 26px rgba(255, 255, 255, 0.25);
} */
.logoutDiv {
  height: 38vmin;
  width: 41vmin;
  left: 48vmin;
  top: 30vmin;
  rotate: 5deg;
}

.logoutDiv:hover {
  box-shadow: 0 0 52px rgba(255, 255, 255, 0.75),
    inset 0 0 26px rgba(255, 255, 255, 0.25);
}

.hovermouse {
  height: 16vmin;
  width: 61vmin;
  left: 12vmin;
  top: 54vmin;
  rotate: 11deg;
  border-radius: 10px;
}

.hovermouse:hover {
  box-shadow: 0 0 52px rgba(255, 255, 255, 0.75),
    inset 0 0 26px rgba(255, 255, 255, 0.25);
}

/* --- LEFT / RIGHT NAVIGATION --- */
.toLeft,
.toRight {
  position: absolute;
  display: flex;
  height: 100%;
  width: 4vmin;
  top: 0;
  background-color: grey;
  justify-content: center;
  align-items: center;

  pointer-events: auto;
}

.toLeft {
  left: 0;
}

.toRight {
  right: 0;
}

/* --- PROGRAM WINDOWS --- */
.vidDiv,
.menuDiv,
.oracle,
.programDiv {
  position: absolute;
  display: flex;
  height: 31vmin;
  width: 38vmin;
  left: 30vmin;
  top: 3vmin;
  border: 1px solid rgba(25, 25, 14, 0.85);
  box-shadow: 2px 2px 52px 25px rgba(178, 191, 192, 0.75);
  transform: skew(-6deg, 8deg);
  rotate: -3deg;
  border-radius: 22px 7px 15px 22px;
}

/* Specific backgrounds */
.menuDiv {
  z-index: 2;
  background-image: url('../assets/img/ui/eightyOS.jpg');
  background-size: cover;
  background-position: center center;
}

.oracle {
  z-index: 5;
  background-image: url('../assets/img/ui/drss.jpg');
  background-size: cover;
  background-position: center center;
}

.room-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  /* ensure it's on top */
}

.transition-overlay img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.notebookToMain {
  height: 38vmin;
  width: 41vmin;
  left: 48vmin;
  top: 30vmin;
  rotate: 5deg;
}

/* .notebookToMain:hover {
  box-shadow: 0 0 52px rgba(255, 255, 255, 0.75),
    inset 0 0 26px rgba(255, 255, 255, 0.25);
} */

.driveToMain {
  height: 38vmin;
  width: 41vmin;
  left: 48vmin;
  top: 30vmin;
  rotate: 5deg;
}

/* .driveToMain:hover {
  box-shadow: 0 0 52px rgba(255, 255, 255, 0.75),
    inset 0 0 26px rgba(255, 255, 255, 0.25);
} */

.toClosedDrawer {
  height: 25vh;
  width: 18vw;
  left: 63vw;
  top: 76vh;
  rotate: 0deg;
  transform: skew(1deg, 1deg);
  border-radius: 10px;
}

/* .toClosedDrawer:hover {
      background-image: url('../assets/overlay/closed_drawer_overlay.webp');
} */
.closeDrawerDiv {
  height: 38vmin;
  width: 41vmin;
  left: 48vmin;
  top: 30vmin;
  rotate: 5deg;
}

.openDrawerDiv {
  height: 62vh;
  width: 76vw;
  left: 21vw;
  top: 26vh;
}

/* .openDrawerDiv:hover{
background-image: url('../assets/overlay/open_drawer_overlay.webp');
}
.closeDrawerDiv:hover{
background-image: url('../assets/overlay/close_drawer_overlay.webp');
} */
.toHardDriveDiv {
  height: 38vmin;
  width: 41vmin;
  left: 48vmin;
  top: 30vmin;
  rotate: 5deg;
}

/* .toHardDriveDiv:hover{
background-image: url('../assets/overlay/hard_drive_overlay.webp');
} */
.toCDTrayDiv {
  height: 5vh;
  width: 6vw;
  left: 48vw;
  top: 57vh;
}

.toCDTrayDiv:hover {
  background-image: url('../assets/overlay/tray_overlay.webp');
}

.toInterfaceDiv {
  height: 51vh;
  width: 58vw;
  left: 13.5vw;
  top: 44vh;
  rotate: 5deg;
  position: absolute;
  background-size: cover;
  background-position: center;


}

/* .toInterfaceDiv:hover{
background-image: url('../assets/overlay/zoom_tray_overlay.webp');
} */

.toDesktopDiv {
  height: 22vh;
  width: 19vw;
  left: 41vw;
  top: 31vh;
  rotate: 0deg;
  position: absolute;
  position: absolute;
  background-size: cover;
  background-position: center;


}

/* .toDesktopDiv:hover{
background-image: url('../assets/overlay/desktop_overlay.webp');
} */
.toDiscordDiv {
  height: 10vh;
  width: 5vw;
  left: 10.25vw;
  top: 10vh;
  position: absolute;
  background-size: cover;
  background-position: center;

}

/* .toDiscordDiv:hover{
background-image: url('../assets/overlay/icon_overlay.webp');
} */
.toPresaveDiv {
  height: 10vh;
  width: 5vw;
  left: 10.25vw;
  top: 24vh;
  position: absolute;
  background-size: cover;
  background-position: center;

}

.toFolderDiv {
  height: 40vh;
  width: 20vw;
  left: 43.3vw;
  top: 41vh;
  position: absolute;
  background-size: cover;
  background-position: center;

}

.toFile1Div {
height: 7vh;
  width: 20vw;
  left: 27.3vw;
  top: 26vh;
  position: absolute;
  background-size: cover;
  background-position: center;

}

.toFile2Div {
height: 7vh;
  width: 20vw;
  left: 27.3vw;
  top: 34vh;
  position: absolute;
  background-size: cover;
  background-position: center;

}

.toFile3Div {
height: 7vh;
  width: 20vw;
  left: 27.3vw;
 top: 42vh;
  position: absolute;
  background-size: cover;
  background-position: center;

}
.toPersonalProtocolDiv {
height: 48vh;
  width: 38vw;
  left: 14.3vw;
  top: 3vh;
  position: absolute;
  background-size: cover;
  background-position: center;

}
.toPlagueTownDiv {
height: 28vh;
  width: 54vw;
  left: 38.3vw;
  top: 57vh;
  position: absolute;
  background-size: cover;
  background-position: center;


}
.playSnippetDiv{
height: 7vh;
  width: 4vw;
  left: 12.3vw;
  top: 41vh;
  position: absolute;
  background-size: fill;
  background-position: center;
  background-image: url('../assets/img/note.png');
  background-size: 100% 100% !important;
}
.toReadingDiv{
height: 58vh;
  width: 38vw;
  left: 37.3vw;
  top: 26vh;
  position: absolute;
  background-size: cover;
  background-position: center;

}
.journalText {
  position: fixed;          /* Stays in place when scrolling */
  top: 50%;                 /* Center vertically */
  left: 5%;                 /* Slightly off the left edge */
  transform: translateY(-50%); /* Perfect vertical centering */
  
  background-color: rgba(255, 255, 255, 0.9); /* Slight transparency for softness */
  color: black;
  font-size: 18px;
  line-height: 1.5;
  padding: 20px;
  max-width: 350px;
  border-radius: 15px;      /* Rounded corners */
  
  /* Soft feathered edges */
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1), 
              0 0 60px rgba(0, 0, 0, 0.05);
  
  /* Optional: blurred background behind box for extra softness */
  backdrop-filter: blur(8px);
  
  overflow-y: auto;         /* Scroll if content is too long */
  max-height: 80vh;         /* Prevent overflow off screen */
  
  z-index: 9999;            /* On top of everything */
}
/* .toPresaveDiv:hover{
background-image: url('../assets/overlay/icon_overlay.webp');
} */
.toPresaveSiteDiv{
height: 39vh;
  width: 24vw;
  left: 58.3vw;
  top: 54vh;
  position: absolute;
  position: absolute;
  background-size: cover;
  background-position: center;
}







/* Rosepine Light themed viewer */
#viewerDiv {
  display: none;
  position: absolute;
  left: 20vw;
  top: 15vh;
  width: 55vw;
  height: 65vh;
  z-index: 100;
  pointer-events: auto;
}

.viewer-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #faf4ed; /* pale cream background */
  pointer-events: auto;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.viewer-media-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  background: #f5e9df; /* subtle contrast for media area */
}

.viewer-media {
  max-width: calc(100% - 100px);
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(222,214,203,0.15); /* soft warm overlay */
  border: 1px solid rgba(222,214,203,0.35);
  color: #57534e; /* muted charcoal */
  font-size: 1.4rem;
  padding: 12px 18px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s, color 0.15s;
}
.viewer-arrow:hover { 
  background: rgba(222,214,203,0.3); 
  color: #2a2a28; 
}
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }

.viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #f0e7df; /* light cream */
  border-top: 1px solid #d6c9b7;
  color: #57534e; /* text color */
  font-family: monospace;
  font-size: 0.85rem;
}

.viewer-close {
  background: none;
  border: 1px solid #cbbcae;
  color: #57534e;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.15s;
}
.viewer-close:hover { color: #1f1b18; }

.viewer-jump {
  display: flex;
  gap: 6px;
  align-items: center;
}

.viewer-jump input {
  width: 52px;
  background: #fff7f0;
  border: 1px solid #d6c9b7;
  color: #57534e;
  padding: 4px 6px;
  font-family: monospace;
  font-size: 0.85rem;
  text-align: center;
  border-radius: 4px;
}

.viewer-jump button {
  background: none;
  border: 1px solid #cbbcae;
  color: #57534e;
  padding: 4px 10px;
  cursor: pointer;
  font-family: monospace;
  transition: color 0.15s;
}
.viewer-jump button:hover { color: #1f1b18; }

.viewer-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #f0e7df;
  border-bottom: 1px solid #d6c9b7;
  cursor: grab;
  user-select: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.viewer-titlebar:active { cursor: grabbing; }

.viewer-title {
  font-family: monospace;
  font-size: 0.8rem;
  color: #817b75; /* soft gray */
  letter-spacing: 0.1em;
}

.viewer-media-wrap video.viewer-media {
  width: 100%;
  height: 100%;
  object-fit: fill; /* stretches (distorts if needed) */
  border-radius: 4px;
}

/* Instructions Box */
#instructionsBox {
  display: none;
  position: fixed;
  left: 20vw;
  top: 15vh;
  width: 50vw;
  height: 50vh;
  background: #faf4ed; /* rosepine light background */
  color: #57534e; /* muted dark text */
  border: 1px solid #d6c9b7; /* soft border */
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  padding: 20px;
  font-family: monospace;
  font-size: 16px;
  overflow-y: auto;
  backdrop-filter: blur(4px); /* soft blurred edges */
  z-index: 9999;
}

#instructionsBox h2 {
  margin-top: 0;
  color: #817b75; /* soft gray title */
}

#instructionsBox button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: 1px solid #cbbcae;
  color: #57534e;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

#instructionsBox button:hover {
  color: #1f1b18;
  background: rgba(222,214,203,0.3);
}

/* Instructions Box */
#errorBox {
  display: none;
  position: fixed;
  left: 30vw;
  top: 20vh;
  width: 40vw;
  background: #faf4ed;
  color: #57534e;
  border: 1px solid #d6c9b7;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  padding: 20px;
  font-family: monospace;
  z-index: 9999;
  pointer-events: auto !important;
}

#errorBox button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: 1px solid #cbbcae;
  color: #57534e;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 6px;
    pointer-events: auto !important;
}
#errorBox button:hover {
  background: rgba(222,214,203,0.3);
    pointer-events: auto !important;
}