:root {
  --gold: #d4af37;
  --gold-dim: #7a6020;
  --text: #e0e0e0;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

body {
  margin: 0;
  font-family: 'Crimson Text', serif;
  background: #000;
  color: var(--text);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Page Fade In */
.page { 
  max-width: 1400px; margin: 0 auto; padding: 20px; 
  opacity: 0; animation: pageFadeIn 4s ease-out forwards; 
}
@keyframes pageFadeIn { to { opacity: 1; } }

/* TOP BAR */
.topbar { display: flex; justify-content: center; align-items: center; margin-bottom: 20px; position: relative; }
.topbar .title {
  font-family: 'Cinzel', serif; font-size: 1.8rem; color: var(--gold);
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3); letter-spacing: 2px;
}
.topbarActions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  left: 0;
}
.inventoryBtn {
  font-family: 'Cinzel', serif;
  background: rgba(18, 15, 13, 0.8);
  border: 1px solid var(--gold-dim);
  color: var(--gold-dim);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 1;
  pointer-events: auto;
  user-select: none;
}
.inventoryBtn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(26, 22, 20, 0.9);
  text-shadow: 0 0 10px var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}
.settingsBtn {
  background: none;
  border: none;
  color: var(--gold-dim);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s, text-shadow 0.2s;
  padding: 5px 10px;
  user-select: none;
}
.settingsBtn:hover {
  color: var(--gold); transform: rotate(30deg); text-shadow: 0 0 10px var(--gold);
}

/* MAP CONTAINER */
.map {
  position: relative; width: 100%; aspect-ratio: 1.84 / 1;
  background: #000; border-radius: 4px; overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #333;
  --x: 50%; --y: 50%; /* Default center variables */
}

/* ZOOM LAYER */
.zoomLayer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform-origin: var(--x) var(--y);
  transform: scale(var(--zoom, 1));
  /* Cinematic Transition */
  transition: transform 5s cubic-bezier(0.4, 0, 0.2, 1), transform-origin 5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, transform-origin;
}

.mapImg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 4s ease-in-out;
}
.mapImg.isVisible { opacity: 1; }


/* VIGNETTE */
.vignette {
  position: absolute; inset: 0; z-index: 35; pointer-events: none; opacity: 1;
  background: radial-gradient(circle at var(--x) var(--y),
    transparent 35%,
    rgba(0,0,0,0.35) 75%,
    rgba(0,0,0,0.95) 100%);
  transition: background 5s cubic-bezier(0.4, 0, 0.2, 1), opacity 2s ease-in-out;
}
.vignette.hidden { opacity: 0; }

/* UNLOCK VIDEO OVERLAY */
.unlockVideoOverlay {
  position: absolute; inset: 0; z-index: 30;
  opacity: 1;
  pointer-events: none;
  /* Match the zoom layer transform */
  transform-origin: var(--x) var(--y);
  transform: scale(var(--zoom, 1));
  transition: opacity 0.5s ease-in-out, transform 5s cubic-bezier(0.4, 0, 0.2, 1), transform-origin 5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, transform-origin;
}
.unlockVideoOverlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.unlockVideo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* INTRO MODAL */
.introModal {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  transition: opacity 1s ease-out;
}
.introModal.hidden { opacity: 0; pointer-events: none; }

.introContent {
  position: relative; width: 500px; text-align: center; color: var(--text);
  background: linear-gradient(to bottom, #1a1614, #080606);
  padding: 50px 40px; 
  border: 1px solid var(--gold-dim);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.9), 0 0 0 4px #000, 0 0 0 5px var(--gold-dim), 0 30px 60px rgba(0,0,0,1);
  transform: translateY(0); transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.introModal.hidden .introContent { transform: translateY(50px) scale(0.95); }

.introContent::before { content: ''; position: absolute; top: 8px; left: 8px; width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.introContent::after { content: ''; position: absolute; bottom: 8px; right: 8px; width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.introContent h1 { 
  font-family: 'Cinzel', serif; margin: 0 0 20px 0; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; 
  color: var(--gold); font-size: 2rem; text-shadow: 0 2px 15px rgba(0,0,0,0.9);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2); padding-bottom: 15px;
}
.introContent p { margin: 0 0 40px 0; color: #aaa; font-size: 1.3rem; line-height: 1.5; font-style: italic; }

.startBtn {
  font-family: 'Cinzel', serif; background: linear-gradient(to bottom, #2b221d, #14100e);
  color: var(--gold); border: 1px solid var(--gold-dim); padding: 16px 40px; font-size: 1.1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; cursor: pointer; transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.startBtn:hover {
  border-color: var(--gold); background: linear-gradient(to bottom, #3d3029, #1f1a16);
  color: #fff; text-shadow: 0 0 10px var(--gold); box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
  transform: translateY(-2px);
}

.startBtn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* ICONS */
.hotspot { 
  position: absolute; transform: translate(-50%, -50%); 
  left: var(--zx); top: var(--zy);
  border: 0; background: transparent; padding: 0; cursor: pointer; z-index: 10;
}
.hotspot.zone { width: 7.5%; } /* Relative size restored */

.badge { width: 100%; display: block; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.8)); transition: transform 0.2s ease-out; -webkit-user-drag: none; pointer-events: auto; }
.hotspot:hover { z-index: 20; }
.hotspot:hover .badge { transform: scale(1.15) translateY(-5px); filter: drop-shadow(0 10px 25px rgba(0,0,0,1)) brightness(1.2); }

.hotspot.active .badge {
  opacity: 0;
  /* Icon animation triggered after unlock video completes */
}

.hotspot.active.spawning .badge {
  animation: spawnIn 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, bounce 3s ease-in-out infinite 2.5s;
}

@keyframes spawnIn {
  0% { opacity: 0; transform: scale(0) translateY(20px); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* AREA NAME LABELS ON WORLD MAP */
.areaNameLabel {
  position: absolute;
  transform: translate(-50%, 0);
  left: var(--lx);
  top: var(--ly);
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 1), 0 0 15px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 9;
  white-space: nowrap;
  opacity: 0;
  animation: labelFadeIn 2s ease-out 0.5s forwards;
}

@keyframes labelFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 0.85;
    transform: translate(-50%, 0);
  }
}

/* MODAL */
.modal { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modalBackdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); }
.modalCard {
  position: relative; width: 90%; max-width: 1400px; background: #120f0d; border: 1px solid var(--gold-dim);
  border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 2px #000, 0 0 60px rgba(0,0,0,1);
}
.modalHeader {
  padding: 15px 25px; display: flex; justify-content: center; align-items: center;
  background: linear-gradient(to right, #1a1614, #0a0808); border-bottom: 1px solid var(--gold-dim);
  position: relative; /* For absolute positioning of settings button */
}
.zoneTitle { font-family: 'Cinzel', serif; color: var(--gold); font-size: 1.6rem; letter-spacing: 2px; user-select: none; pointer-events: none; }
.zoneView { position: relative; overflow: hidden; aspect-ratio: 16 / 9; }

/* Parallax Container: Wrapper for background and overlay - transforms apply here */
.parallaxContainer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 5; /* Below level icons (z-index: 10) but above background elements */
}

.zoneImg {
  width: 100%; display: block; border-bottom: 1px solid #222;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}
.zoneVideo {
  width: 100%; display: none; border-bottom: 1px solid #222; cursor: default;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

/* Skip Hint Overlay */
.skipHint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  color: var(--gold);
  padding: 12px 24px;
  border: 1px solid var(--gold-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.skipHint.hidden {
  opacity: 0;
}
.levelAnimation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-bottom: 1px solid #222;
  /* Smooth transitions for filter and transform changes */
  transition: filter 0.4s ease-out, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease-out;
  /* GPU acceleration for parallax */
  will-change: transform;
  transform-origin: center center;
  z-index: 1;
}

.levelAnimation::after,
.levelScreen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.3) 100%);
  opacity: 0.6;
}

.levelScreen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-bottom: 1px solid #222;
  /* GPU acceleration for parallax */
  will-change: transform;
  transform-origin: center center;
  transition: filter 0.4s ease-out, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease-out;
  z-index: 1;
}

.levelIconsContainer {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  transition: opacity 1s ease-in-out;
}
.levelIconsContainer.visible { opacity: 1; pointer-events: auto; }

.levelIcon {
  position: absolute; transform: translate(-50%, -50%);
  width: 8%; cursor: pointer; z-index: 10; /* Slightly larger, but still smaller than area icons (7.5%) */
  opacity: 0;
  transition: transform 0.2s ease-out, filter 0.2s ease-out;
  -webkit-user-drag: none;
}
.levelIcon.locked {
  cursor: not-allowed;
  filter: grayscale(100%) brightness(0.4);
  pointer-events: none;
}
.levelIcon.completed {
  opacity: 0.7;
  filter: brightness(0.85);
}
.levelIcon.completed:hover {
  opacity: 0.9;
  filter: brightness(1.0);
}
.levelIcon.latest {
  animation: latestGlow 2s ease-in-out infinite;
}
.levelIcon.spawned {
  animation: levelSpawn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.levelIcon.latest.spawned {
  animation: levelSpawn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, latestGlow 2s ease-in-out infinite 1.2s, levelBounce 3s ease-in-out infinite 1.2s;
}
.levelIcon:hover {
  transform: translate(-50%, -50%) scale(1.1) translateY(-5px);
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.8)) brightness(1.1);
  z-index: 20;
}
.levelIcon.latest:hover {
  transform: translate(-50%, -50%) scale(1.15) translateY(-5px);
  filter: drop-shadow(0 0 25px rgba(212, 175, 55, 1)) brightness(1.3);
  z-index: 20;
}
.levelIcon.locked:hover {
  transform: translate(-50%, -50%);
  filter: grayscale(100%) brightness(0.4);
}

@keyframes levelSpawn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(-10deg); }
  70% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

@keyframes latestGlow {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.8)) drop-shadow(0 0 30px rgba(212, 175, 55, 0.5)) brightness(1.2); }
  50% { filter: drop-shadow(0 0 30px rgba(212, 175, 55, 1)) drop-shadow(0 0 50px rgba(212, 175, 55, 0.8)) brightness(1.35); }
}

@keyframes levelBounce {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  50% { transform: translate(-50%, calc(-50% - 12px)) scale(1.08) rotate(0deg); }
}

.closeBtn {
  background: none; border: none; color: var(--gold-dim); font-size: 1.8rem; cursor: pointer;
  transition: color 0.2s, text-shadow 0.2s, opacity 0.3s ease-out;
}
.closeBtn:hover { color: var(--gold); text-shadow: 0 0 10px var(--gold); }

.modalActions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  left: 15px;
  z-index: 2100;
}

.modalInventoryBtn {
  font-family: 'Cinzel', serif;
  background: rgba(18, 15, 13, 0.8);
  border: 1px solid var(--gold-dim);
  color: var(--gold-dim);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 6px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 1;
  pointer-events: auto;
}

.modalInventoryBtn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(26, 22, 20, 0.9);
  text-shadow: 0 0 10px var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

.modalSettingsBtn {
  background: none;
  border: none;
  color: var(--gold-dim);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s, text-shadow 0.2s, opacity 0.3s ease-out;
  padding: 5px 10px;
  pointer-events: auto;
}
.modalSettingsBtn:hover {
  color: var(--gold);
  transform: rotate(30deg);
  text-shadow: 0 0 10px var(--gold);
}

/* Return to Map Button */
.returnToMapBtn {
  position: absolute;
  bottom: 20px;
  left: 20px; /* Moved to corner to avoid confusion with continue button */
  transform: none;
  font-family: 'Cinzel', serif;
  color: #c9a961; /* More vibrant gold color, less dim */
  background: linear-gradient(to bottom, rgba(35, 28, 23, 0.92), rgba(20, 16, 14, 0.92)); /* Darker, more solid */
  border: 1px solid #a8883a; /* Brighter border */
  padding: 10px 20px; /* Smaller padding */
  font-size: 0.85rem; /* Smaller font */
  font-weight: 600; /* Slightly bolder */
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5); /* Stronger shadow */
  opacity: 0.95; /* More opaque, less disabled looking */
  pointer-events: auto;
  transition: all 0.3s ease;
  z-index: 10;
  user-select: none;
}
.returnToMapBtn:hover {
  background: linear-gradient(to bottom, rgba(43, 34, 29, 0.95), rgba(31, 26, 22, 0.95));
  border-color: var(--gold);
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  opacity: 1;
  transform: translateY(-2px);
}
.returnToMapBtn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: all 0.1s ease-out;
}

/* NARRATOR MODAL */
.narratorModal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 40px;
  opacity: 1; transition: opacity 0.5s ease-out;
  pointer-events: auto;
}
.narratorModal.hidden {
  opacity: 0;
  pointer-events: none;
  display: none; /* Fully remove from layout when hidden */
}

.narratorBackdrop {
  position: absolute; inset: 0;
  background: transparent;
  pointer-events: none; /* Allow mouse events to pass through to parallax container */
}

.narratorCard {
  position: relative; width: 85%; max-width: 1000px;
  background: linear-gradient(to bottom, rgba(13, 11, 10, 0.85), rgba(0, 0, 0, 0.85));
  padding: 40px 50px;
  border: 1px solid var(--gold-dim);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 0 0 2px #000, 0 0 0 3px var(--gold-dim), 0 -20px 60px rgba(0,0,0,0.9);
  transform: translateY(0); transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}
.narratorModal.hidden .narratorCard { transform: translateY(100px); }

.narratorCard::before {
  content: ''; position: absolute; top: 10px; left: 10px;
  width: 10px; height: 10px;
  background: var(--gold); box-shadow: 0 0 15px var(--gold);
}
.narratorCard::after {
  content: ''; position: absolute; bottom: 10px; right: 10px;
  width: 10px; height: 10px;
  background: var(--gold); box-shadow: 0 0 15px var(--gold);
}

.narratorText {
  font-family: 'Crimson Text', serif;
  color: #d4d4d4;
  font-size: 1.35rem;
  line-height: 1.7;
  font-style: italic;
  text-align: left;
  margin: 0 0 30px 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.narratorBtn {
  font-family: 'Cinzel', serif;
  background: linear-gradient(to bottom, #1a1512, #0a0807);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 12px 30px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease, opacity 0.5s ease-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  float: right;
  user-select: none;
}
.narratorBtn:hover {
  border-color: var(--gold);
  background: linear-gradient(to bottom, #2b221d, #14100e);
  color: #fff;
  text-shadow: 0 0 8px var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

.narratorBtn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.narratorBtn.pulse {
  animation: btnPulse 1.5s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0,0,0,0.6), 0 0 0 0 rgba(212, 175, 55, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(0,0,0,0.6), 0 0 0 8px rgba(212, 175, 55, 0);
  }
}

/* SETTINGS MODAL */
.settingsModal {
  position: fixed; inset: 0; z-index: 2500;
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.3s ease-out;
  pointer-events: auto;
}
.settingsModal.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.settingsBackdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.settingsCard {
  position: relative; width: 90%; max-width: 500px;
  background: linear-gradient(to bottom, #1a1614, #0a0808);
  padding: 0;
  border: 1px solid var(--gold-dim);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 0 0 2px #000, 0 0 0 3px var(--gold-dim), 0 30px 60px rgba(0,0,0,1);
  border-radius: 4px;
  overflow: hidden;
}

.settingsHeader {
  padding: 20px 25px;
  background: linear-gradient(to right, #1a1614, #0a0808);
  border-bottom: 1px solid var(--gold-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settingsHeader h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.6rem;
  letter-spacing: 2px;
  margin: 0;
  text-transform: uppercase;
}

.settingsContent {
  padding: 30px 25px;
}

.settingRow {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.settingRow label {
  font-family: 'Cinzel', serif;
  color: var(--text);
  font-size: 1.1rem;
  letter-spacing: 1px;
  min-width: 120px;
}

.settingRow input[type="range"] {
  flex: 1;
  height: 6px;
  background: linear-gradient(to right, var(--gold-dim), var(--gold));
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.settingRow input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  transition: all 0.2s ease;
}

.settingRow input[type="range"]::-webkit-slider-thumb:hover {
  background: #fff;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
  transform: scale(1.1);
}

.settingRow input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  border: none;
  transition: all 0.2s ease;
}

.settingRow input[type="range"]::-moz-range-thumb:hover {
  background: #fff;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
  transform: scale(1.1);
}

.settingRow span {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1rem;
  min-width: 50px;
  text-align: right;
}

/* ========== RELIC POUCH MODAL ========== */
.relicPouchModal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease-out;
  pointer-events: auto;
}
.relicPouchModal.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.relicPouchBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.relicPouchCard {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: linear-gradient(to bottom, #1a1614, #0a0808);
  padding: 0;
  border: 1px solid var(--gold-dim);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8),
              0 0 0 2px #000,
              0 0 0 3px var(--gold-dim),
              0 30px 60px rgba(0, 0, 0, 1);
  border-radius: 8px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.relicPouchHeader {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px 30px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  position: relative;
}

.relicPouchHeaderIcon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
}

.relicPouchHeader h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
  flex: 1;
}

.relicPouchProgress {
  font-family: 'Cinzel', serif;
  color: #888;
  font-size: 1rem;
  letter-spacing: 1px;
}

.relicPouchProgress span {
  color: var(--gold);
  font-weight: 700;
}

.relicPouchContent {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

/* Custom scrollbar for relic pouch */
.relicPouchContent::-webkit-scrollbar {
  width: 10px;
}

.relicPouchContent::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-left: 1px solid var(--gold-dim);
}

.relicPouchContent::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--gold-dim), #5a4a15);
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

.relicPouchContent::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--gold), var(--gold-dim));
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Area Section */
.relicAreaSection {
  margin-bottom: 40px;
}

.relicAreaHeader {
  font-family: 'Cinzel', serif;
  color: var(--gold-dim);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.relicAreaProgress {
  font-size: 0.85rem;
  color: #666;
}

/* Grid */
.relicGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 15px;
}

.relicSlot {
  aspect-ratio: 1;
  position: relative;
  border: 2px solid #333;
  border-radius: 8px;
  background: #0a0808;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.relicSlot.locked {
  cursor: default;
}

.relicSlot.locked:hover {
  border-color: #444;
}

.relicSlot.locked .relicSlotNumber {
  color: #4a4a4a;
}

.relicSlot.found {
  border-color: var(--gold-dim);
  background: linear-gradient(135deg, #1a1614, #0f0d0c);
}

.relicSlot.found:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  transform: scale(1.05);
}

.relicSlotNumber {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  color: #444;
  font-size: 1.4rem;
  font-weight: 700;
  z-index: 1;
}

.relicSlot.found .relicSlotNumber {
  top: 6px;
  left: 7px;
  transform: none;
  font-size: 0.75rem;
  color: var(--gold-dim);
}

.relicSlotIcon {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.relicSlot.found .relicSlotIcon {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.relicSlotGlow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.relicSlot.found:hover .relicSlotGlow {
  opacity: 1;
}

/* Empty state */
.emptyRelicPouch {
  text-align: center;
  color: #666;
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  font-style: italic;
  padding: 60px 20px;
}

/* ITEM FOUND BANNER */
.itemFoundBanner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2400;
  pointer-events: none;
  opacity: 0;
  animation: itemFoundSlideIn 2s ease-out forwards;
}

.itemFoundBanner.hidden {
  display: none;
}

.itemFoundText {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  padding: 8px 20px;
  border: 1px solid var(--gold-dim);
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.itemFoundIcon {
  width: 40px;
  height: 40px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

@keyframes itemFoundSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  15% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
  }
}

/* ========== DISCOVERY MODAL — VERTICAL REWARD CARD ========== */
.discoveryModal {
  position: fixed;
  inset: 0;
  z-index: 2700;
  display: flex;
  align-items: center;
  justify-content: center;           /* mobile default: centred */
  pointer-events: none;
  transition: none;
}
.discoveryModal.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

/* Desktop: push card to right third, leaving level art visible on left */
@media (min-width: 700px) {
  .discoveryModal {
    justify-content: flex-end;
    padding-right: clamp(24px, 4vw, 72px);
  }
}

/* No backdrop — level video shows fully behind the card */
.discoveryBackdrop {
  display: none;
}

.discoveryCard {
  position: relative;
  pointer-events: auto;
  width: 92%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(22, 17, 14, 0.97) 0%, rgba(8, 6, 5, 0.99) 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.9),
              0 0 80px rgba(212, 175, 55, 0.1),
              inset 0 1px 0 rgba(212, 175, 55, 0.1),
              0 8px 32px rgba(0, 0, 0, 0.85),
              0 24px 64px rgba(0, 0, 0, 0.8),
              0 48px 120px rgba(0, 0, 0, 0.75);
  border-radius: 12px;
  padding: 24px 26px 22px 26px;
  animation: discoverySlideIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

@keyframes discoverySlideIn {
  from { transform: scale(0.88) translateY(24px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* Eyebrow tag */
.discoveryEyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.55);
  text-align: center;
  margin-bottom: 8px;
}

/* Relic Title */
.discoveryRelicName {
  font-family: 'Cinzel', serif;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.25;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.35);
}

/* Relic Image — 3D Holographic Card */
.discoveryImageWrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  perspective: 900px;
  perspective-origin: 50% 50%;
}

.discoveryVisual {
  position: relative;
  width: 110px;
  height: 110px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(212, 175, 55, 0.55);
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.45),
              0 0 80px rgba(212, 175, 55, 0.18),
              inset 0 0 20px rgba(0, 0, 0, 0.5);
  animation: relicGlow 3s ease-in-out infinite;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: crosshair;
  overflow: hidden;
}

/* Specular sheen overlay — subtle soft-light reflection */
.relicSheen {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  /* Tight specular hotspot + narrow shimmer band */
  background:
    radial-gradient(
      ellipse 45% 50% at var(--sx, 50%) var(--sy, 50%),
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 240, 160, 0.55) 18%,
      transparent 38%
    ),
    linear-gradient(
      calc(var(--angle, 120deg)),
      transparent 38%,
      rgba(255, 252, 200, 0.8) 47%,
      rgba(255, 252, 200, 0.8) 53%,
      transparent 62%
    );
  mix-blend-mode: soft-light;
  z-index: 1;
}

@keyframes relicGlow {
  0%, 100% {
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.45),
                0 0 80px rgba(212, 175, 55, 0.18),
                inset 0 0 20px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.7),
                0 0 120px rgba(212, 175, 55, 0.28),
                inset 0 0 20px rgba(0, 0, 0, 0.5);
  }
}

/* Director's Brief block */
.discoveryDecree {
  background: rgba(0, 0, 0, 0.35);
  border-left: 2px solid rgba(212, 175, 55, 0.45);
  border-radius: 0 4px 4px 0;
  padding: 10px 14px 10px 16px;
  margin-bottom: 14px;
  text-align: left;
}

.discoveryDecreeLabel {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.6);
  margin-bottom: 8px;
}

.discoveryDecreeList {
  margin: 0;
  padding: 0;
  list-style: none;
}

.discoveryDecreeList li {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  font-style: normal;
  line-height: 1.6;
  color: rgba(228, 218, 200, 0.95);
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
}

.discoveryDecreeList li:last-child {
  margin-bottom: 0;
}

.discoveryDecreeList li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 3px;
  font-size: 0.42rem;
  color: rgba(212, 175, 55, 0.55);
  line-height: 1.6;
}

.discoveryDecreeSingle {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  font-style: normal;
  line-height: 1.6;
  color: rgba(228, 218, 200, 0.95);
  margin: 0;
}

/* Ornamental divider */
.discoveryOrnament {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.discoveryOrnamentLine {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.35), transparent);
}

.discoveryOrnamentGlyph {
  color: rgba(212, 175, 55, 0.45);
  font-size: 0.65rem;
  flex-shrink: 0;
}

/* Composer credit */
.discoveryComposerCredit {
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: rgba(212, 175, 55, 0.65);
  text-align: center;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

/* Artist's Commentary block */
.discoveryCommentaryBlock {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: 7px;
  padding: 11px 14px;
  margin-bottom: 16px;
}

.discoveryCommentaryLabel {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.45);
  margin-bottom: 7px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.discoveryCommentaryLabel::before {
  content: '"';
  font-family: 'Crimson Text', serif;
  font-size: 1.5rem;
  line-height: 0;
  position: relative;
  top: 6px;
  color: rgba(212, 175, 55, 0.35);
}

.discoveryCommentaryText {
  font-family: 'Crimson Text', serif;
  color: rgba(165, 155, 140, 0.9);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Action Bar */
.discoveryActionBar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discoveryDownloadBtn {
  font-family: 'Cinzel', serif;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: rgba(212, 175, 55, 0.65);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 5px;
  width: 100%;
}

.discoveryDownloadBtn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.06);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.2);
}

.discoveryContinueBtn {
  font-family: 'Cinzel', serif;
  background: linear-gradient(to bottom, rgba(48, 36, 26, 0.95), rgba(22, 16, 11, 0.98));
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.45);
  padding: 13px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 5px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.discoveryContinueBtn:hover {
  border-color: var(--gold);
  background: linear-gradient(to bottom, rgba(65, 48, 34, 0.98), rgba(35, 25, 18, 1));
  color: #fff;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.18), 0 4px 12px rgba(0, 0, 0, 0.5);
}



@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ACHIEVEMENT NOTIFICATION */
.achievementNotification {
  position: fixed;
  top: 100px;
  right: -400px;
  width: 350px;
  background: linear-gradient(to bottom, rgba(26, 22, 20, 0.98), rgba(10, 8, 8, 0.98));
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), inset 0 0 20px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 3000;
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievementNotification.show {
  right: 30px;
}

.achievementIcon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
}

.achievementText {
  flex: 1;
}

.achievementTitle {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.achievementName {
  font-family: 'Cinzel', serif;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 3px;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.achievementDesc {
  font-family: 'Crimson Text', serif;
  color: #aaa;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.3;
}

/* AMBIENT MODE */
.ambientOverlay {
  position: absolute;
  inset: 0;
  z-index: 30; /* Above levelFinalFrame (20) so buttons are visible */
  pointer-events: none; /* Let clicks pass through to levelFinalFrame */
  opacity: 0;
  animation: ambientFadeIn 1s ease-out forwards;
}

.ambientOverlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none; /* Fully remove when hidden */
}

@keyframes ambientFadeIn {
  to { opacity: 1; }
}

.particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Canvas should never block clicks */
  background: transparent;
  z-index: 1; /* Behind buttons */
}

.ambientCompleteBtn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  color: var(--gold);
  background: linear-gradient(to bottom, rgba(26, 21, 18, 0.95), rgba(10, 8, 7, 0.95));
  padding: 14px 32px;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  animation: btnFadeIn 1s ease-out 0.5s forwards, btnPulseSubtle 2s ease-in-out 1.5s infinite;
  z-index: 25; /* Above levelFinalFrame */
  user-select: none; /* Prevent text selection */
}

.ambientCompleteBtn:hover {
  background: linear-gradient(to bottom, rgba(43, 34, 29, 0.95), rgba(31, 26, 22, 0.95));
  border-color: var(--gold);
  color: #fff;
  text-shadow: 0 0 10px var(--gold);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
  transform: translateX(-50%);
}

.ambientCompleteBtn:active {
  transform: translateX(-50%) scale(0.97);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: all 0.1s ease-out;
}

/* Replay Button */
.ambientReplayBtn {
  position: absolute;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  background: linear-gradient(to bottom, rgba(26, 21, 18, 0.95), rgba(10, 8, 7, 0.95));
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  animation: btnFadeIn 1s ease-out 0.5s forwards, btnPulseSubtle 2s ease-in-out 1.5s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 25; /* Above levelFinalFrame */
  user-select: none; /* Prevent text selection */
}

.ambientReplayBtn:hover {
  background: linear-gradient(to bottom, rgba(43, 34, 29, 0.95), rgba(31, 26, 22, 0.95));
  border-color: var(--gold);
  color: #fff;
  text-shadow: 0 0 10px var(--gold);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
  transform: scale(1.05);
}

.ambientReplayBtn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: all 0.1s ease-out;
}

/* ── LEVEL MUSIC PLAYER ── */
.levelMusicPlayer {
  position: fixed;
  top: 85px;
  left: calc(max(20px, 50vw - 680px));
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 6, 4, 0.88);
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 8px 12px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(var(--lmp-slide-offset, -20px));
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.6), inset 0 1px 0 rgba(212,175,55,0.08);
}
.levelMusicPlayer.visible {
  transform: translateX(0);
  opacity: 1;
}
.levelMusicPlayer.hidden {
  display: none;
}
.levelMusicPlayer.menuMode {
  top: auto;
  bottom: 30px;
  left: 30px;
  background: rgba(4, 2, 1, 0.45);
  border-color: rgba(212, 175, 55, 0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.levelMusicPlayer.menuMode .lmpNowPlaying {
  display: none;
}
.levelMusicPlayer.menuMode .lmpTitle {
  opacity: 0.6;
  font-size: 0.75rem;
}
.levelMusicPlayer.menuMode .lmpComposer {
  opacity: 0.4;
  font-size: 0.72rem;
}
.levelMusicPlayer.menuMode .lmpSep {
  opacity: 0.3;
}
.levelMusicPlayer.menuMode .lmpPlayPause {
  opacity: 0.5;
  width: 22px;
  height: 22px;
}
.lmpPlayPause {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: rgba(212,175,55,0.1);
  color: var(--gold);
  font-size: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  padding: 0 0 0 2px;
  line-height: 1;
}
.lmpPlayPause.paused {
  padding: 0;
}
.lmpPlayPause:hover {
  background: rgba(212,175,55,0.22);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212,175,55,0.3);
}
.lmpTrackInfo {
  min-width: 0;
}
.lmpTitle {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.07em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(212,175,55,0.3);
}
.lmpNowPlaying {
  font-family: 'Cinzel', serif;
  font-size: 0.42rem;
  font-weight: 400;
  color: rgba(212, 175, 55, 0.45);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.lmpSep {
  height: 1px;
  background: linear-gradient(to right, rgba(212,175,55,0.4), transparent);
  margin: 3px 0 4px;
}
.lmpComposer {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(235, 215, 165, 0.95);
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: opacity 1s ease;
}
.lmpSep {
  transition: opacity 1s ease;
}

@keyframes btnFadeIn {
  to {
    opacity: 1;
    pointer-events: auto;
  }
}

@keyframes btnPulseSubtle {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(212, 175, 55, 0);
    border-color: var(--gold);
  }
}

/* KEN BURNS EFFECT - Slow, smooth, cinematic */
.levelAnimation.kenBurns,
.levelScreen.kenBurns {
  animation: kenBurns 180s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes kenBurns {
  0% {
    transform: scale(1.02) translate(0, 0);
  }
  25% {
    transform: scale(1.06) translate(-1%, 0.5%);
  }
  50% {
    transform: scale(1.04) translate(0.5%, -0.8%);
  }
  75% {
    transform: scale(1.07) translate(-0.8%, 0.3%);
  }
  100% {
    transform: scale(1.05) translate(0.3%, -0.5%);
  }
}

/* COMPLETION OVERLAY */
.completionOverlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 1;
  animation: completionFadeIn 0.15s ease-out; /* Faster fade-in */
}

.completionOverlay.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes completionFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.completionText {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.8), 0 4px 20px rgba(0, 0, 0, 0.9);
  animation: completionTextPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Faster pop */
}

@keyframes completionTextPop {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.completionParticles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.completionParticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: particleBurst 1.2s ease-out forwards;
  animation-delay: var(--delay);
}

@keyframes particleBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(
      calc(cos(var(--angle)) * var(--distance)),
      calc(sin(var(--angle)) * var(--distance))
    ) scale(0.3);
  }
}

.modalCard.completionFlash {
  animation: borderFlash 1s ease-out;
}

@keyframes borderFlash {
  0%, 100% {
    border-color: var(--gold-dim);
    box-shadow: 0 0 0 2px #000, 0 0 60px rgba(0,0,0,1);
  }
  50% {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold), 0 0 80px rgba(212, 175, 55, 0.6), inset 0 0 60px rgba(212, 175, 55, 0.1);
  }
}

/* Screen Flash Effect */
.screenFlash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(212, 175, 55, 0.4) 50%, transparent 100%);
  pointer-events: none;
  animation: flashFade 0.4s ease-out forwards;
  z-index: 30;
}

@keyframes flashFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Ripple Effect */
.completionRipple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border: 3px solid var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: rippleExpand 0.8s ease-out forwards;
  z-index: 29;
}

@keyframes rippleExpand {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
    border-width: 3px;
  }
  50% {
    opacity: 0.6;
    border-width: 2px;
  }
  100% {
    width: 150%;
    height: 150%;
    opacity: 0;
    border-width: 1px;
  }
}

/* AREA NAME BANNER (ELDEN RING STYLE) */
.areaNameBanner {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  animation: bannerFadeInOut 5s ease-in-out forwards;
}

.areaNameBanner.hidden {
  display: none;
}

.areaNameText {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 8px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.8), 0 4px 30px rgba(0, 0, 0, 1);
  padding: 40px 60px;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  background: linear-gradient(to right,
    transparent 0%,
    rgba(0, 0, 0, 0.6) 20%,
    rgba(0, 0, 0, 0.8) 50%,
    rgba(0, 0, 0, 0.6) 80%,
    transparent 100%);
  position: relative;
  animation: bannerTextSlide 5s ease-in-out forwards;
}

.areaNameText::before,
.areaNameText::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.areaNameText::before {
  left: -80px;
}

.areaNameText::after {
  right: -80px;
}

@keyframes bannerFadeInOut {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes bannerTextSlide {
  0% {
    transform: translateY(30px);
    letter-spacing: 2px;
  }
  15% {
    transform: translateY(0);
    letter-spacing: 8px;
  }
  85% {
    transform: translateY(0);
    letter-spacing: 8px;
  }
  100% {
    transform: translateY(-30px);
    letter-spacing: 14px;
  }
}

/* UNLOCK BANNER (distinct from area name banner) */
.unlockBanner {
  position: fixed;
  inset: 0;
  z-index: 2300; /* Above area name banner */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  animation: unlockBannerFade 6s ease-in-out forwards;
}

.unlockBanner.hidden {
  display: none;
}

.unlockBannerText {
  font-family: 'Cinzel', serif;
  color: #ffd700; /* Brighter gold */
  font-size: 4rem; /* Larger */
  font-weight: 700;
  letter-spacing: 12px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 60px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 215, 0, 0.8), 0 4px 40px rgba(0, 0, 0, 1);
  padding: 50px 80px;
  border: 3px solid #ffd700; /* Full box border */
  background: linear-gradient(135deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(20, 15, 0, 0.9) 50%,
    rgba(0, 0, 0, 0.85) 100%);
  position: relative;
  animation: unlockBannerScale 6s ease-in-out forwards;
  box-shadow: 0 0 80px rgba(255, 215, 0, 0.6), inset 0 0 40px rgba(255, 215, 0, 0.1);
}

/* Corner decorations */
.unlockBannerText::before,
.unlockBannerText::after {
  content: '✦';
  position: absolute;
  font-size: 2rem;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 1);
  animation: unlockCornerPulse 2s ease-in-out infinite;
}

.unlockBannerText::before {
  top: 15px;
  left: 15px;
}

.unlockBannerText::after {
  bottom: 15px;
  right: 15px;
}

@keyframes unlockBannerFade {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes unlockBannerScale {
  0% {
    transform: scale(0.8);
    letter-spacing: 4px;
  }
  12% {
    transform: scale(1);
    letter-spacing: 12px;
  }
  88% {
    transform: scale(1);
    letter-spacing: 12px;
  }
  100% {
    transform: scale(1.1);
    letter-spacing: 20px;
  }
}

@keyframes unlockCornerPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* LEVEL PATH SVG CONNECTIONS */
.levelPathsSvg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Completed path shimmer animation */
.levelPath.completed-highlight {
  animation: pathShimmer 3s ease-in-out infinite;
}

@keyframes pathShimmer {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.5;
  }
}

/* Current path pulsing glow animations */
.levelPath.current-outer-glow {
  animation: outerGlowPulse 2s ease-in-out infinite;
}

.levelPath.current-medium-glow {
  animation: mediumGlowPulse 2s ease-in-out infinite 0.1s;
}

.levelPath.current-core {
  animation: corePulse 1.5s ease-in-out infinite;
}

@keyframes outerGlowPulse {
  0%, 100% {
    opacity: 0.1;
    stroke-width: 12;
  }
  50% {
    opacity: 0.25;
    stroke-width: 16;
  }
}

@keyframes mediumGlowPulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes corePulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* Energy particles flowing along current path */
@keyframes pathEnergyFlow {
  0% {
    stroke-dashoffset: 0;
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -100;
    opacity: 0.6;
  }
}

/* LEVEL LOADING OVERLAY */
.levelLoadingOverlay {
  position: absolute; inset: 0; z-index: 90;
  background: rgba(5, 3, 2, 0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; border-radius: inherit;
}
.levelLoadingOverlay.hidden { display: none; }
.levelLoadingSpinner {
  width: 42px; height: 42px;
  border: 3px solid rgba(212, 175, 55, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: lvlSpin 0.75s linear infinite;
}
@keyframes lvlSpin { to { transform: rotate(360deg); } }
.levelLoadingText {
  color: var(--gold); font-family: 'Cinzel', serif; font-size: 0.85rem;
  letter-spacing: 0.12em; opacity: 0.85;
}

/* LETTERBOX BARS FOR LEVEL ANIMATIONS */
.letterboxTop,
.letterboxBottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 70px;
  background: #000;
  z-index: 50;
  transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  pointer-events: none;
}

.letterboxTop {
  top: 0;
}

.letterboxBottom {
  bottom: 0;
}

.letterboxTop.slideOut {
  transform: translateY(-100%);
}

.letterboxBottom.slideOut {
  transform: translateY(100%);
}

/* Level Final Frame Image */
.levelFinalFrame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 2; /* Layer above levelAnimation/levelScreen inside container */
  pointer-events: auto;
}

.levelFinalFrame.hasHotspot {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="%23d4af37" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><circle cx="11" cy="11" r="3"/></svg>') 16 16, pointer !important;
}

/* Ghost Overlay for Collectibles */
.collectibleOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* object-fit removed - overlay uses exact percentage positioning */
  opacity: 0;
  transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;
  pointer-events: none;
  z-index: 3; /* Above levelFinalFrame inside container */
  filter: brightness(1) drop-shadow(0 0 0px transparent);
  user-select: none;
  -webkit-user-drag: none;
}

.collectibleOverlay.hover {
  opacity: 1;
  filter: brightness(1.08) drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.collectibleOverlay.clickable {
  pointer-events: auto;
  cursor: pointer;
}

/* EYE BLINK EFFECT */
.eyeBlinkTop,
.eyeBlinkBottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background: #000;
  z-index: 100;
  pointer-events: none;
  transform: translateY(-100%);
  transition: none;
}

.eyeBlinkTop {
  top: 0;
}

.eyeBlinkBottom {
  bottom: 0;
  transform: translateY(100%);
}

.eyeBlinkTop.blinking {
  animation: blinkTop 0.65s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.eyeBlinkBottom.blinking {
  animation: blinkBottom 0.65s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes blinkTop {
  0% {
    transform: translateY(-100%);
  }
  40% {
    transform: translateY(0);
  }
  60% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100%);
  }
}

@keyframes blinkBottom {
  0% {
    transform: translateY(100%);
  }
  40% {
    transform: translateY(0);
  }
  60% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100%);
  }
}

/* RELIC SEARCH HINT — cinematic bottom-center subtitle */
@keyframes relicAsideBreathe {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

.firstLevelTooltip {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 105;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 1),
    0 0 40px rgba(212, 175, 55, 0.25);
  background: rgba(0, 0, 0, 0.45);
  padding: 7px 20px;
  border-radius: 2px;
}

.firstLevelTooltip.hidden {
  opacity: 0;
  display: none;
}

.firstLevelTooltip.visible {
  opacity: 1;
  display: block;
  animation: relicAsideBreathe 3.5s ease-in-out 1.5s infinite;
}

/* ============================================================
   Full-Screen Cinematic Overlay (global intro + area intros/outros)
   ============================================================ */

.cinematicOverlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: #000;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: auto;
}

.cinematicOverlay.hidden {
  display: none;
}

.cinematicBg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.cinematicImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
}

.cinematicImg.kenBurns {
  animation: cinematicKenBurns 22s ease-in-out forwards;
}

@keyframes cinematicKenBurns {
  0%   { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.12) translate(-2.5%, -1.5%); }
}

.cinematicVignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0) 22%,
    rgba(0,0,0,0) 48%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.96) 100%
  );
  pointer-events: none;
}

.cinematicBottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 8% 3rem 8%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.4rem;
}

.cinematicText {
  font-family: 'Crimson Text', serif;
  font-size: 1.18rem;
  line-height: 1.75;
  color: #f0e6cc;
  text-align: left;
  font-style: normal;
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 3px rgba(0,0,0,1),
    0 3px 12px rgba(0,0,0,0.95);
  margin: 0;
  max-width: 800px;
  width: 100%;
  opacity: 1;
  padding: 1.6rem 2.2rem 1.6rem 2.4rem;
  background: rgba(4, 2, 1, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-left: 3px solid rgba(212, 175, 55, 0.6);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 0 80px rgba(0,0,0,0.7), inset 0 0 40px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

.cinematicText.hidden {
  display: none;
}


/* Gold highlight for technical/humorous terms */
.cinematicGold {
  color: var(--gold);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.3), 0 1px 3px rgba(0,0,0,1);
}

.cinematicContinue {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 215, 155, 0.9);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 0.65rem 2.5rem;
  cursor: pointer;
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.6s ease;
}

.cinematicContinue:hover {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(212, 175, 55, 0.75);
  color: #fff;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}


/* ============================================================
   Cinematic Subtitle Overlay
   ============================================================ */

.cinematicSubtitle {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: 78%;
  max-width: 820px;
  background: rgba(0, 0, 0, 0.75);
  padding: 14px 22px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 2px;
  opacity: 1;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.cinematicSubtitle.hidden {
  opacity: 0;
  pointer-events: none;
}

.cinematicSubtitleText {
  font-family: 'IM Fell English', 'Crimson Text', serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #e8d5a3;
  text-align: center;
  font-style: italic;
  margin: 0;
  max-height: 110px;
  overflow-y: auto;
}


/* ═══════════════════════════════════════════════════════════════ */
/*  CINEMATIC INTRO VIDEO (Pre-Rendered, Full-Screen)               */
/* ═══════════════════════════════════════════════════════════════ */

/* Full-Screen Cinematic Container */
.intro-video-container {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 1s ease-out;
}

.intro-video-container.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Pre-Rendered Video */
.intro-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 1s ease-in;
}

.intro-video.playing {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════ */
/*  CLICK-ANYWHERE SCREEN                                          */
/* ═══════════════════════════════════════════════════════════════ */
/* GLOBAL LOADING SCREEN */
.loadingScreen {
  position: fixed; inset: 0; z-index: 10003;
  background: #050302;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;

}

.loadingTitle {
  font-family: 'Cinzel', serif; font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--gold); letter-spacing: 0.15em; text-align: center; line-height: 1.15;
}
.loadingTitleSub {
  font-size: 0.55em; letter-spacing: 0.25em; color: rgba(212,175,55,0.65);
  font-style: italic; font-family: 'Crimson Text', serif;
}
.loadingBarWrap {
  width: min(420px, 70vw); height: 3px; background: rgba(212,175,55,0.15);
  border-radius: 2px; overflow: hidden;
}
.loadingBarFill {
  height: 100%; width: 0%; background: var(--gold);
  box-shadow: 0 0 10px rgba(212,175,55,0.6);
}
.loadingStatus {
  font-family: 'Cinzel', serif; font-size: 0.75rem;
  color: rgba(212,175,55,0.5); letter-spacing: 0.2em;
}
/* ═══════════════════════════════════════════════════════════════ */

.click-anywhere-screen {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;

}

.click-anywhere-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.clickAnywhereVignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 55% 50% at 50% 50%,
    transparent 0%,
    rgba(0, 0, 0, 0.5) 55%,
    rgba(0, 0, 0, 0.96) 100%
  );
  pointer-events: none;
}

@keyframes clickAnywherePulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.clickAnywhereText {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.9);
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.5);
  white-space: nowrap;
  margin: 0;
  animation: clickAnywherePulse 2.6s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════ */
/*  MAIN MENU                                                      */
/* ═══════════════════════════════════════════════════════════════ */

@keyframes menuFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.main-menu {
  position: fixed;
  inset: 0;
  z-index: 10001;
  overflow: hidden;
  transition: opacity 0.7s ease-in;
}

.main-menu.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Full-screen background video */
.menu-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Subtle dark gradient — keeps edges darker, text readable */
.menuVideoOverlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.10) 40%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

/* Game title — top-left */
.menuGameTitle {
  position: absolute;
  top: clamp(24px, 5vh, 60px);
  left: clamp(28px, 4.5vw, 80px);
  color: var(--gold);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.95), 0 0 50px rgba(212, 175, 55, 0.25);
  opacity: 0;
  animation: menuFadeUp 1s ease-out 0.5s forwards;
  user-select: none;
  pointer-events: none;
}

.menuTitleTop {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  display: block;
}

.menuTitleBottom {
  font-size: clamp(1.4rem, 3vw, 2.8rem);
  line-height: 1.15;
  display: block;
  letter-spacing: 0.05em;
}

.menuTitleOf {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.82em;
  color: rgba(212, 175, 55, 0.65);
}

.menuTitleSound {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Button + headphones — bottom center */
.menuActions {
  position: absolute;
  bottom: clamp(40px, 8vh, 90px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  opacity: 0;
  animation: menuFadeUp 1s ease-out 1.1s forwards;
}

.intro-start-btn {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.8rem, 1.3vw, 1rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(18, 13, 6, 0.92);
  border: 1px solid rgba(212, 175, 55, 0.65);
  padding: 1rem 3.2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  user-select: none;
}

.intro-start-btn:hover {
  background: rgba(35, 25, 10, 0.96);
  border-color: rgba(212, 175, 55, 0.9);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.intro-start-btn:active {
  transform: scale(0.97);
}

.menuHeadphones {
  font-family: 'Crimson Text', serif;
  font-size: 0.8rem;
  color: rgba(212, 175, 55, 0.3);
  letter-spacing: 0.06em;
  user-select: none;
  pointer-events: none;
}

/* BAPC Logo — bottom-right, unobtrusive */
.menuBapcLogoLink {
  position: absolute;
  bottom: clamp(20px, 3.5vh, 44px);
  right: clamp(20px, 3vw, 48px);
  width: clamp(100px, 12vw, 160px);
  opacity: 0.45;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
  display: block;
  transition: opacity 0.3s ease;
  animation: menuFadeUp 1.2s ease-out 1.8s both;
  cursor: pointer;
}

.menuBapcLogoLink:hover {
  opacity: 0.7;
}

.menuBapcLogo {
  width: 100%;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Skip Intro Button (inside cinematic container) */
.skip-intro-btn {
  position: absolute;
  bottom: 2vh;
  right: 2vw;
  z-index: 10001;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease-in-out, background 0.2s ease;
  pointer-events: none;
}

.skip-intro-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.skip-intro-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.6);
}

.skip-intro-btn:active {
  transform: scale(0.95);
}

/* ========== RELIC DISCOVERY PARTICLES ========== */
.relicParticleContainer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2699;
  overflow: hidden;
}

.relicParticle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8c0 0%, #d4af37 45%, transparent 100%);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: relicParticleBurst var(--duration, 1.1s) ease-out var(--delay, 0s) forwards;
}

@keyframes relicParticleBurst {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  60%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) scale(0.15); }
}

/* Grand Finale glow on the whole card */
.discoveryCard.grandFinale {
  border-color: rgba(212,175,55,0.9);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.9),
    0 0 120px rgba(212,175,55,0.45),
    inset 0 1px 0 rgba(212,175,55,0.25),
    0 40px 80px rgba(0,0,0,0.9);
  animation: discoverySlideIn 0.45s cubic-bezier(0.34,1.56,0.64,1), grandFinaleGlow 2s ease-in-out 0.5s infinite;
}

@keyframes grandFinaleGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0,0,0,0.9), 0 0 80px rgba(212,175,55,0.35), inset 0 1px 0 rgba(212,175,55,0.15), 0 40px 80px rgba(0,0,0,0.9); }
  50%       { box-shadow: 0 0 0 1px rgba(0,0,0,0.9), 0 0 160px rgba(212,175,55,0.65), inset 0 1px 0 rgba(212,175,55,0.3), 0 40px 80px rgba(0,0,0,0.9); }
}