/* =========================================================================
   PREMIUM ARCHITECTURAL VIRTUAL TOUR RENDER STYLESHEET (3DVISTA / MATTERPORT STYLE)
   ========================================================================= */

:root {
  /* Core Color Architecture */
  --color-primary: #2563EB;
  --color-accent: #3B82F6;
  --color-dark: #111827;
  --color-text: #F9FAFB;
  --color-text-muted: #9CA3AF;
  --color-danger: #EF4444;
  
  /* Glassmorphism Specs */
  --glass-bg: rgba(17, 24, 39, 0.65);
  --glass-bg-hover: rgba(17, 24, 39, 0.85);
  --glass-white: rgba(255, 255, 255, 0.08);
  --glass-white-hover: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(25px) saturate(160%);
  
  /* System Metrics & Geometry */
  --radius-premium: 14px;
  --radius-circular: 50%;
  --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.4);
  --transition-smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Base Initialization Reset Override */
* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  margin: 0;
  padding: 0;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #000000;
  color: var(--color-text);
  font-size: 15px;
  letter-spacing: -0.01em;
}

a, a:hover, a:active, a:visited {
  text-decoration: none;
  color: inherit;
}

/* =========================================================================
   1. CORE MARZIPANO ENGINE VIEWPORT CANVAS
   ========================================================================= */
#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  transform-origin: center center;
  will-change: transform, filter;
  filter: brightness(1.08) contrast(1.06) saturate(1.1);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

#pano canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#sceneTransitionOverlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.02) 35%, rgba(255,255,255,0.01) 70%, rgba(255,255,255,0.08) 100%);
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

body.scene-transitioning #pano {
  transform: scale(1.06);
  filter: blur(4px) brightness(1.04) saturate(1.08);
}

body.scene-transitioning #sceneTransitionOverlay {
  opacity: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hidden-ui {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate3d(0, 20px, 0) !important;
}

/* =========================================================================
   2. LUXURY LANDING SPLASH PAGE WITH BRANDED INTEGRATION
   ========================================================================= */
.landing-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  transition: opacity 0.8s var(--transition-smooth), visibility 0.8s var(--transition-smooth);
  padding: 24px;
  text-align: center;
}

.landing-page.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.landing-content {
  max-width: 540px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.landing-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.brand-logo-img-wrapper {
  width: auto;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
}

.college-logo-graphics {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  will-change: transform;
}

.tour-title {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.tour-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.btn-primary {
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border: none;
  outline: none;
  color: #ffffff;
  padding: 16px 36px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
  transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.45);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--transition-smooth);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.landing-footer {
  position: absolute;
  bottom: 24px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

/* =========================================================================
   3. FLOATING GLASS Identity TITLE CARD
   ========================================================================= */
#titleBar {
  position: absolute;
  top: calc(20px + var(--safe-top));
  left: 20px;
  z-index: 10;
  pointer-events: none;
  max-width: calc(100% - 40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#titleBar .sceneName {
  pointer-events: auto;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  padding: 12px 24px;
  border-radius: var(--radius-premium);
  box-shadow: var(--shadow-premium);
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================================
   4. SYSTEM SIDEBAR HUD CONTROLS
   ========================================================================= */
#controlsHoverZone {
  position: absolute;
  right: 0;
  top: 0;
  width: 90px;
  height: 100%;
  z-index: 9;
  pointer-events: auto;
}

.system-controls-sidebar {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateZ(0);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#controlsHoverZone:hover ~ .system-controls-sidebar,
.system-controls-sidebar:hover {
  opacity: 1;
  pointer-events: auto;
}

.btn-control-glass {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-premium);
  background: rgba(17, 24, 39, 0.2);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-premium);
  transition: background 0.25s, border 0.25s, transform 0.25s, color 0.25s;
  outline: none;
}

.btn-control-glass svg {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
}

.btn-control-glass:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--color-accent);
  transform: scale(1.05);
}

.btn-control-glass.enabled {
  background: var(--color-primary);
  border-color: var(--color-accent);
  color: #ffffff;
}

/* =========================================================================
   5. CENTRALIZED Floor POSITION MANUAL CAMERA DIRECTIONAL CONTROLS
   ========================================================================= */
.navigation-arrow-pad {
  position: absolute;
  bottom: calc(125px + var(--safe-bottom)); 
  left: 50%;
  transform: translateX(-50%) translateZ(0); 
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(2, 42px);
  gap: 8px;
  z-index: 10;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#viewUp    { grid-column: 2; grid-row: 1; }
#viewLeft  { grid-column: 1; grid-row: 2; }
#viewDown  { grid-column: 2; grid-row: 2; }
#viewRight { grid-column: 3; grid-row: 2; }
#viewIn    { grid-column: 3; grid-row: 1; }
#viewOut   { grid-column: 1; grid-row: 1; }

.pad-arrow {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
}

.pad-arrow svg {
  width: 18px !important;
  height: 18px !important;
}

/* =========================================================================
   6. PREMIUM HIGHLY COMPACT MATRIX SLIDER DRAWER WITH IMAGE THUMBNAILS
   ========================================================================= */
#sceneListHoverZone {
  position: absolute;
  left: 0;
  top: 0;
  width: 90px;
  height: 100%;
  z-index: 9;
  pointer-events: auto;
}

#sceneList {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%) translateZ(0);
  width: min(320px, calc(100% - 40px));
  max-height: calc(100% - 40px);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s, visibility 0.45s;
}

#sceneList.collapsed-drawer {
  transform: translate(-120%, -50%) scale(0.95);
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}

.drawer-header-drag {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 16px 0px 16px;
  gap: 2px;
}

.drag-handle-pill {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.drawer-title-meta {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.drawer-scroll-viewport {
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 12px 10px 12px;
  scrollbar-width: none;
}

.drawer-scroll-viewport::-webkit-scrollbar {
  display: none;
}

.scenes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  width: 100%;
}

.scene {
  display: block;
}

.scene li.text {
  width: 100%;
  min-height: 58px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--transition-smooth);
}

.thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.3s ease;
}

.scene li.text::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.95) 0%, rgba(3, 7, 18, 0.35) 100%);
  z-index: 2;
  transition: background 0.25s;
}

.scene li.text span {
  position: relative;
  z-index: 3;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  text-align: left;
  line-height: 1.2;
  word-break: break-word;
  
  /* Linter-safe multi-line truncation layout setup */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  box-orient: vertical;
  -webkit-box-orient: vertical;
  
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.scene:hover li.text .thumb-img {
  transform: scale(1.08);
}

.scene:hover li.text::before {
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.85) 0%, rgba(3, 7, 18, 0.2) 100%);
}

.scene:hover li.text span {
  color: #ffffff;
}

.scene.current li.text {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--color-accent);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.scene.current li.text::before {
  background: linear-gradient(0deg, rgba(37, 99, 235, 0.8) 0%, rgba(17, 24, 39, 0.2) 100%);
}

.scene.current li.text span {
  color: #ffffff;
  font-weight: 600;
}

/* =========================================================================
   7. BRILLIANT DOUBLE-SCALE WHITE GLOWY HOTSPOTS
   ========================================================================= */
.link-hotspot {
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.link-hotspot-icon {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.8));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.link-hotspot:hover .link-hotspot-icon {
  transform: scale(1.1);
}

.link-hotspot-tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translate(-8px, -50%) translateZ(0);
  background: rgba(17, 24, 37, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-premium);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--transition-smooth), opacity 0.3s var(--transition-smooth);
  will-change: transform, opacity;
}

.link-hotspot-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(17, 24, 37, 0.9);
}

.link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  transform: translate(0, -50%) translateZ(0);
}

/* =========================================================================
   8. CLEAN INLINE INFO HOTSPOT WITH HOVER CARD
   ========================================================================= */
.info-hotspot {
  position: absolute;
  z-index: 5;
}

.info-hotspot-header {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-circular);
  background: rgba(37, 99, 235, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), var(--shadow-premium);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s var(--transition-smooth), background-color 0.3s;
}

.info-hotspot-header:hover {
  transform: scale(1.08);
  background: rgba(59, 130, 246, 0.95);
}

.info-hotspot-icon-wrapper svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

.info-hotspot-hover-card {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  min-width: 180px;
  max-width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.28);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--shadow-premium);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--transition-smooth), transform 0.25s var(--transition-smooth);
}

.info-hotspot:hover .info-hotspot-hover-card,
.info-hotspot:focus-within .info-hotspot-hover-card {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* =========================================================================
   9. HIGHLY ADAPTIVE RESPONSIVE BOUNDING FRAMEWORK
   ========================================================================= */
@media (max-width: 768px) {
  #titleBar {
    left: 14px;
    right: 14px;
    top: calc(14px + var(--safe-top));
    width: calc(100% - 28px);
  }
  
  #titleBar .sceneName {
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    padding: 10px 16px;
  }

  .system-controls-sidebar {
    right: 14px;
    top: auto;
    bottom: calc(180px + var(--safe-bottom));
    transform: none;
    flex-direction: row;
    gap: 8px;
  }

  .navigation-arrow-pad {
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    bottom: calc(115px + var(--safe-bottom));
    gap: 6px;
  }
  
  #sceneList {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: min(300px, calc(100% - 20px));
    max-height: calc(100% - 20px);
  }
}

@media (max-width: 480px) {
  .navigation-arrow-pad {
    display: none !important; 
  }
}