body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: black;
  padding: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none; /* Prevent horizontal swipe navigation */
  touch-action: pan-y;         /* Allow vertical scroll only */
}

/* disable pull-to-refresh / rubber-band overscroll on the page */
html, body {
  overscroll-behavior: none;
  -webkit-user-select: none;  /*stop user from tap and hold to select by accident*/
  user-select: none;
  -webkit-touch-callout: none; /* iOS long-press menu */
}

input, textarea {
  -webkit-user-select: text;
  user-select: text; /* allow typing/selecting inside inputs */
}


nav {
  position: fixed;
  top: 30px;
  left: 20px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;                /* center items vertically */
  z-index: 1000;
  border-radius: 12px;
  background-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
}
nav a {
  text-decoration: none;
}
/* 1) make the link exactly the size of your mascot image */
nav .mascot-link {
  position: relative;
  width: 50px;       /* match your nav img max‐width */
  height: 50px;      
  overflow: hidden;  /* clip anything outside of 50×50 */
  flex-shrink: 0;    /* don’t let flexbox resize it */
}

/* 2) Make the img fill that box */
nav .mascot-link img {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;          /* scale to fit, preserving aspect */
  transition: opacity 0.2s ease-in-out;
}

/* 3) Stack & center the arrow over it */
nav .mascot-link .fi-sr-left {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 30px;             /* same “size” as your container */
  line-height: 1;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

/* 4) Hover swap */
nav .mascot-link:hover img       { opacity: 0; }
nav .mascot-link:hover .fi-sr-left { opacity: 1; }

/* 5) burger‐menu icon styling */
nav i.fi-br-menu-burger {
  color: white;
  font-size: 30px;
  margin-left: 1rem;
}
nav i.fi-br-menu-burger:hover{
  cursor: pointer;
}







/*THIS IS FOR THE MENU BAR FOR CHOOSING THE SITE*/
/* panel container – hidden by default off-screen to the left */
/* Replace your existing .side-menu rule’s display/align-items with this: */
.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 220px;
  transform: translateX(-100%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255,255,255,0.2);
  box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  transition: transform 0.3s ease-out;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* center vertically */
}


/* when “open” class is present, slide it fully into view */
.side-menu.open {
  transform: translateX(0);
}

.side-menu__item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.side-menu__item .bullet {
  display: inline-block;
  width: 16px; height: 16px;
  background: #fff;
  margin-right: 12px;
  border-radius: 2px;
}
.side-menu__item .label {
  flex: 1;
  color: white;
  font-size: 1.1rem;
}
.side-menu__item .arrow {
  font-size: 1rem;
  color: white;
  transition: transform 0.3s ease;
}
/* rotate arrow when open */
.side-menu__item.expanded > .arrow {
  transform: rotate(90deg);
}

/* submenu hidden by default */
/* hide until expanded */
.submenu {
  position: absolute;
  top: 100%;    /* sit just below the parent item */
  left: 0;      /* align with the parent’s left edge */
  width: 100%;  /* match the parent’s width */
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
  background: inherit; /* carry over your translucent BG */
  border-radius: 8px;
}
/* arrow rotation */
.side-menu__item.expanded > .arrow {
  transform: rotate(90deg);
}
/* when its parent LI gets “expanded”, show it */
.side-menu__item.expanded > .submenu {
  display: block;   /* now the submenu is visible */
}



/* submenu items */
.submenu a{
  text-decoration: none;
}
.submenu li {
  padding: 8px 16px;        /* top/bottom 8px, left/right 16px */
}
.submenu .sub-bullet {
  display: inline-block;
  width: 12px; height: 12px;
  background: #ccc;
  margin-right: 12px;
  border-radius: 2px;
}
.submenu li .label {
  padding-left: 8px;        /* shift the text an extra 8px over */
  font-size: 1rem;
  color: #eee;
}
.side-menu__item.has-children {
  position: relative;
}
/* when you click a has-children item, flip it to column so the submenu drops below */
.side-menu__item.has-children.expanded {
  flex-direction: row;    /* instead of column */
  align-items: center;
  margin-bottom: 80%;
}

/* give a little breathing room between header and submenu */
.side-menu__item.has-children.expanded .submenu {
  margin-top: 0.5rem;
  width: 100%;
  margin-bottom: 80%;
}

.material-icons{
  color: purple;
  font-size: 15px !important; 
}





/* smooth transition for hover states */
.side-menu__item,
.submenu li {
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

/* parent items hover */
.side-menu__item:hover {
  background-color: rgba(255, 255, 255, 0.25);
/* slightly lighter than the 0.15 default, so it “brightens” on hover */
}

/* submenu items hover */
.submenu li:hover {
  background-color: rgba(255, 255, 255, 0.15);
/* a bit subtler under the already-open parent */
}















/* full‐viewport flex container that centers its children */
.canvas-container {
  touch-action: none; /* prevent the browser from interpreting drags on the anatomy viewer as page scrolls */
  position: relative;
  width: 100vw;/* full-screen sizing */
  height: 100vh;
  overflow: hidden;
  background: #000;
}


/* let the canvas & svg grow to fit while preserving aspect ratio */
#image-canvas,
#svg-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}



/* 4) Make sure the SVG doesn’t catch any mouse events */
#svg-layer {
  pointer-events: none; /* so it never steals mouse events */

/*
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform-box: fill-box;          
  transform-origin: 0 0;   */ 
}






.note {
  position: absolute;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: 'Segoe UI', Roboto, sans-serif;
  color: #333;
  max-width: 250px;
  min-width: 160px;
  z-index: 10;
  cursor: grab;
  transition: box-shadow 0.2s ease;
}

.note:active {
  cursor: grabbing;
  box-shadow: 0 0 0 2px #00bcd4;
}

.note textarea {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 10px;
  background-color: #f3f4f6;
  padding: 8px;
  resize: none;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #222;
  box-sizing: border-box;
  min-height: 60px;
}

.note textarea:focus {
  background-color: #fff;
  border: 1px solid #00bcd4;
}

.note-controls {
  margin-top: 8px;
  display: flex;
  justify-content: space-between; /* 🔁 spread buttons to opposite ends */
  align-items: center;
}

.note-controls button {
  background-color: #00bcd4;
  border: none;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.note-controls button:hover {
  background-color: #0097a7;
}


/*THIS IS TO IMPROVE UI OF MENU ZOOM, PAN, NOTES ETC..*/

.tool-button {
  background-color: #00568f;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.tool-button:hover {
  background-color: #0097a7;
}

.mobile-toolbar i {
  font-style: normal;
}

.emoji-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

/* To make budd ball shake */
@keyframes shake {
  0% { transform: scale(1.2) rotate(0deg); }
  20% { transform: scale(1.5) rotate(15deg); }
  40% { transform: scale(1.5) rotate(-15deg); }
  60% { transform: scale(1.5) rotate(10deg); }
  80% { transform: scale(1.5) rotate(-10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.tool-button:hover img.emoji-icon {
  animation: shake 0.6s ease-in-out;
}

/*THIS IS TO IMPROVE THE TOOLS (PAN ZOOM ETC..) UI ON MOBILE PHONES */

  

/* ---------- THIS IS FOR TOOLBARS ON LARGE SCREENS ---------- */
@media (min-width: 551px) {
  #tool-buttons-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .mobile-toolbar {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    margin: 0; /* remove any accidental vertical spacing */
  }

  #extra-tools {
    display: flex;
    flex-direction: row;
    gap: 6px;
  }
    /* Hide the toggle arrow on larger screens so original layout is preserved */
  .mobile-toggle {
    display: none;
  }
}










/* ---------- THHIS IS FOR TOOLBAR ON SMALL SCREENS ---------- */
@media (max-width: 550px) {
  .mobile-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  #extra-tools {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    
  }
  
  .expand-footer {
    display: flex;
    justify-content: center;
    width: 100%;
  }


  #tool-buttons-wrapper.expanded-mobile #extra-tools {
    display: flex;
  }

  /* show top arrow only when collapsed */
  #mobile-toggle-top { display: inline-block; }
  #mobile-toggle-bottom { display: none; }

  /* when expanded, hide top arrow, show bottom arrow */
  #tool-buttons-wrapper.expanded-mobile #mobile-toggle-top { display: none; }
  #tool-buttons-wrapper.expanded-mobile #mobile-toggle-bottom { display: inline-block; }

  /* arrow rotation visual */
  .chevron {
    transition: transform .3s ease;
    display: inline-block;
    font-size: 1 rem;
    line-height: 0.8;
  }

  /* make the collapse/expand arrow a plain white arrow (no blue background) */
  .mobile-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    min-width: unset !important;
  }

  /* ensure the arrow itself is white and sized appropriately */
  .mobile-toggle .chevron {
    color: white;
    font-size: 1rem;
    line-height: 0.2;
  }

  /* optional: subtle hover feedback without changing background */
  .mobile-toggle:hover .chevron {
    opacity: 0.85;
  }


 #play-toggle {
  padding: 8px 18px; /* match width of the other tool buttons */
  display: inline-flex;
  justify-content: center; /* center its contents */
}


}





/*THIS IS FOR THE IMAGES BELOW THE MAIN IMAGE*/
.preview-thumbnails {
  position:fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 16px;
  /*background-color: black; /* optional: make it stand out */
  padding: 12px 0;
  z-index: 99; /* make sure it's above other content */


  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
}









/*ANIMATION*/

/* Animation for saved notes */
@keyframes pop-in {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Saved note visual tweaks */
.note.note-saved textarea {
  background-color: transparent !important;
  border: none !important;
  color: #222;
  cursor: pointer;
}







/*THIS IS FOR THE 3D IMAGING*/

#slice-counter {
  position: fixed;
  top: 150px;
  right: 32px;
  color: white;
  font-size: 1.2rem;
  z-index: 1001;
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 8px;
}
.slider {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
}
.note {
  position: absolute;
  background: white;
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  z-index: 1002;
}

.note-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* Tool menu wrapper */
#tool-buttons-wrapper {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
}




/*THUMBNAIL NAVIGATOR*/

/* Thumbnails bar */
.preview-thumbnails {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
  background-color: rgba(0, 0, 0, 0.85);
  border-top: 1px solid rgba(255,255,255,0.15);
  overflow-x:hidden;
  overflow: hidden;  
  z-index: 1000;
}

.thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.1);
}

.thumbnail.active {
  border-color: #00BCD4; /* Blue border for active image */
}


#thumbnail-bar {
  display: flex;
  overflow-x: auto;
  padding: 10px;
  background-color: #111;
}
.thumbnail {
  width: 60px;
  margin-right: 4px;
  opacity: 0.6;
  transition: 0.3s ease;
  border-radius: 6px;
}
.thumbnail.active {
  border: 3px solid #2196F3;
  opacity: 1;
}





/*THIS IS FOR THE UI OF THE SLIDER AT THE BUTTOM*/

.slider {
  -webkit-appearance: none;
  width: 90%;
  height: 8px;
  margin: 30px auto 10px;
  display: block;
  background: #222;
  border-radius: 10px;
  outline: none;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
  transition: box-shadow 0.3s ease;
}

.slider:hover {
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #00f0f0;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #00f0f0;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
}

.slider::-moz-range-track {
  background: #222;
  border-radius: 10px;
  height: 8px;
}


/* ------------------------------------------------------------------
   bottom‐left frosted‐glass box for the other two orthogonal views
   ------------------------------------------------------------------ */
#other-views-box {
  position: fixed;
  bottom: 20%;     /* sits just above the blue slider bar */
  right: 20px;
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background-color: rgba(255,255,255,0.15);
  box-shadow:     0 8px 24px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  z-index: 1000;   /* above everything */
}


#other-views-box img {
  width: 100px;     /* thumb width, adjust as you like */
  height: auto;
  border-radius: 2px;
  object-fit: cover;
  transition: filter 0.2s ease, transform 0.2s ease;
}

#other-views-box img:hover{
  cursor: pointer;
  filter: brightness(1.5);
}


/*THIS IS FOR SMALLER SCREENS SUCH AS TABLETS WHERE WE NEED THE CT SCAN TO BE IN THE MIDDLE HOPEFULLY IT DOES NOT IMPACT THE 2D IMAGE AS WELL*/



/*
.annotation {
  position: absolute;    
  background: rgba(0,188,212,0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -100%); 
}
*/


/*THIS BELOW IF FOR THE DOTS AND THE ANNOTATIONS*/
/* ─── Dot marker ───────────────────────────────────────────────────────── */
.annotation-dot {
  position: absolute;
  /* Larger transparent hit area so finger taps register without needing pixel precision */
  padding: 10px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 20;
  touch-action: manipulation; /* eliminate delay on mobile taps */
  background: transparent; /* actual visible circle comes from the pseudo-element */
}

/* Visual small circle inside the larger hit area */
.annotation-dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00BCD4;
  transform: translate(-50%, -50%);
  transition: transform .15s ease;
}

/* hover / active scaling of the visual circle */
.annotation-dot:hover::after,
.annotation-dot:focus-visible::after {
  transform: translate(-50%, -50%) scale(1.6);
}






/* ─── Tooltip “pill” ────────────────────────────────────────────────────── */
.annotation-tooltip {
  position: absolute;
  padding: 4px 8px;
  white-space: nowrap;
  background: #00BCD4;
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;
  z-index: 21;
}
/* show the tooltip when hovering its dot */
.annotation-dot:hover + .annotation-tooltip {
  opacity: 1;
}



/* dim the whole view when active */
.annotation-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 21; /* behind the dots (20+) but above canvas */
}
.annotation-backdrop.active {
  opacity: 1;
}






/* ==== Annotation detail popup ==== */
.annotation-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2900;
}

.annotation-detail {
  position:fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  padding: 20px 18px;
  width: 80%;
  max-width: 900px;
  height: 90%;
  max-height: 800px;
  color: white;
  z-index: 3000;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  font-family: system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
}

.annotation-detail .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.annotation-detail .title {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.1;
}

.annotation-detail .close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.annotation-detail .content {
  font-size: 0.9rem;
  margin-top: 4px;
}

.annotation-detail {
  animation: fadeInDialog .25s ease-out forwards;
}
.annotation-detail-backdrop {
  animation: fadeInBackdrop .2s ease forwards;
}

@keyframes fadeInDialog {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.97); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to   { opacity: 0.6; }
}


/* === fix overflow / wrapping inside the detail popup === */
.annotation-detail {
  display: flex;
  flex-direction: column; /* header stays fixed, content can grow/shrink */
}

.annotation-detail .content {
  flex: 1 1 auto;           /* take remaining vertical space */
  overflow-y: auto;         /* scroll if content is too tall */
  padding: 12px 18px 24px;  /* ensure extra bottom padding for UI */
  word-break: break-word;    /* wrap long words */
  white-space: normal;      /* normal wrapping */
}



/*THIS IS TO MAKE SURE ZOOM IN OUT BUTTON STAYS THE SAME*/
.zoom-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.zoom-percent {
  min-width: 48px;      /* keeps the label steady */
  text-align: center;
  font-weight: 600;
  color: white;
}



