/* ── Magnifier Lens — Styles ─────────────────────────────── */

/* ── Lens Container ── */
.mag-lens {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: transform, left, top;
}
.mag-lens.active {
  opacity: 1;
  transform: scale(1);
}

/* ── Shared Lens Canvas ── */
.mag-lens canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* ── Glass Rim Overlay ── */
.mag-lens::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.45);
  box-shadow:
    0 0 12px rgba(212, 175, 55, 0.15),
    0 0 30px rgba(0, 0, 0, 0.5),
    inset 0 0 15px rgba(212, 175, 55, 0.04);
  pointer-events: none;
  z-index: 10;
}

/* ── Specular Highlight Overlay ── */
.mag-lens::after {
  content: "";
  position: absolute;
  top: 10%;
  left: 15%;
  width: 40%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 11;
  transform: rotate(-18deg);
}

/* ── Inactive hint (click to activate) ── */
.mag-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--kh-font-inter);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(212, 175, 55, 0.35);
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.4s;
  white-space: nowrap;
}
.mag-hint.visible {
  opacity: 1;
}



/* ── Responsive ── */
@media (max-width: 768px) {
  .mag-lens {
    width: 220px;
    height: 220px;
  }
}

/* ── Diagram Panel ── */
.diagram-panel {
  padding: 0;
  overflow: hidden;
  position: relative;
  background: #0d0818;
  font-size: 0;
  line-height: 0;
  border: 1px solid transparent;
}
.diagram-panel:hover {
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: inset 0 0 80px rgba(212, 175, 55, 0.04),
    0 4px 30px rgba(0, 0, 0, 0.5);
}
.diagram-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Credit Vertical ── */
.credit-vertical {
  position: absolute;
  bottom: 18px;
  right: 18px;
  padding: 10px 10px 6px;
  background: rgba(20, 10, 40, 0.82);
  border: 4px solid rgba(212, 175, 55, 0.3);

  z-index: 3;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: scale(0.85);
  transform-origin: bottom right;
  transition: transform 0.35s ease;
}
.credit-vertical.shifted {
  transform: scale(0.85) translateX(120%);
  pointer-events: none;
}
.credit-heading {
  font-family: var(--kh-font-cinzel);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--kh-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.credit-item {
  font-family: var(--kh-font-cinzel);
  font-size: 0.68rem;
  color: var(--kh-text-light);
  line-height: 1.5;
  letter-spacing: 0.03em;
  user-select: text;
  -webkit-user-select: text;
}
.credit-item a {
  color: var(--kh-gold);
  text-decoration: none;
  font-weight: 600;
}
.credit-item a:hover {
  text-decoration: underline;
}

/* ── Timeline Map Panel ── */
.timeline-panel {
  position: relative;
  background: var(--kh-card-bg);
  border: 1px solid rgba(212, 175, 55, 0.15);

  overflow: hidden;
  font-size: 0;
  line-height: 0;
  box-shadow: var(--kh-shadow);
}
.timeline-panel::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1px solid rgba(212, 175, 55, 0.08);

  pointer-events: none;
  z-index: 4;
}
.timeline-panel:hover {
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.6);
}
.timeline-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.timeline-credit {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  display: block;
  background: rgba(20, 10, 40, 0.82);
  border: 3px solid rgba(212, 175, 55, 0.3);

  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  line-height: 0;
  transition: transform 0.35s ease, border-color 0.3s, box-shadow 0.3s;
}
.timeline-credit.shifted {
  transform: translateX(120%);
  pointer-events: none;
}
.timeline-credit:hover {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}
.timeline-credit img {
  display: block;
  height: 35px;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}
