/* diorama.css — 진열장 & 핫스팟 (포스터 기반 재디자인) */

/* ─── 진열장 래퍼 ────────────────────────────────────── */
#diorama-wrapper {
  position: fixed;
  inset: 0;
  z-index: var(--z-diorama);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}

/* ─── 진열장 씬 ───────────────────────────────────────── */
#diorama-scene {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: scale(1.08) translateZ(-40px);
  transition: transform 2s var(--ease-out);
}

#diorama-scene.zoomed-in {
  transform: scale(1) translateZ(0);
}

/* ─── 배경 이미지 ──────────────────────────────────────── */
#diorama-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/diorama.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* 포스터 분위기: 중앙 백라이트 + 사방 어둠 */
#diorama-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 65% at 50% 52%, rgba(255,255,255,0.04) 0%, transparent 70%),
    linear-gradient(to bottom, rgba(6,8,10,0.55) 0%, transparent 25%, transparent 70%, rgba(6,8,10,0.7) 100%),
    linear-gradient(to right,  rgba(6,8,10,0.5) 0%, transparent 15%, transparent 85%, rgba(6,8,10,0.5) 100%);
  pointer-events: none;
}

/* 포스터 점 패턴 — 우상단 */
#diorama-bg::after {
  content: '';
  position: absolute;
  top: 4%;
  right: 3%;
  width: 220px;
  height: 220px;
  background-image:
    radial-gradient(circle, rgba(92,200,196,0.22) 2px, transparent 2px);
  background-size: 18px 18px;
  border-radius: 50%;
  mask-image: radial-gradient(ellipse 100% 100% at 60% 40%, black 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 60% 40%, black 50%, transparent 100%);
  pointer-events: none;
}

/* ─── 수평 라이트 스트라이프 (포스터 상단 요소) ──────── */
.light-stripes {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 80px;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.light-stripes::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    rgba(255,255,255,0.55) 0px, rgba(255,255,255,0.55) 8px,
    transparent 8px, transparent 18px
  );
  mask-image: linear-gradient(to bottom, white 0%, white 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, white 0%, white 60%, transparent 100%);
}

/* ─── 좌하단 점 패턴 (포스터 요소) ───────────────────── */
.dot-pattern-bl {
  position: absolute;
  bottom: 8%;
  left: 2%;
  width: 160px;
  height: 80px;
  background-image:
    radial-gradient(circle, rgba(92,200,196,0.18) 2px, transparent 2px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to right, transparent 0%, black 40%, black 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%, black 100%);
  pointer-events: none;
  z-index: 2;
}

/* ─── 핫스팟 컨테이너 ─────────────────────────────────── */
#hotspots-layer {
  position: absolute;
  inset: 0;
  z-index: var(--z-hotspot);
}

/* ─── 개별 핫스팟 ──────────────────────────────────────── */
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: var(--z-hotspot);
}

/* 핫스팟 중앙 점 */
.hotspot-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 6px var(--c-accent), 0 0 18px var(--c-accent-dim);
  transition: transform var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out);
  z-index: 2;
}

/* 펄스 링 1 */
.hotspot-dot::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--c-pulse);
  animation: pulseRing 2.6s ease-out infinite;
}

/* 펄스 링 2 (딜레이) */
.hotspot-dot::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--c-pulse);
  animation: pulseRing 2.6s ease-out 1.3s infinite;
}

/* 번호 뱃지 */
.hotspot-number {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--c-accent);
  letter-spacing: 0.12em;
  background: rgba(6,8,10,0.75);
  border: 1px solid var(--c-accent-dim);
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* 호버 레이블 카드 */
.hotspot-label {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(12, 16, 20, 0.92);
  color: var(--c-text);
  border: 1px solid rgba(92,200,196,0.2);
  padding: var(--sp-3) var(--sp-4);
  min-width: 160px;
  max-width: 220px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 20px rgba(92,200,196,0.05);
  backdrop-filter: blur(8px);
}

.hotspot-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(12,16,20,0.92);
}

.hotspot-label-num {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--c-accent);
  letter-spacing: 0.25em;
  margin-bottom: 4px;
}

.hotspot-label-ko {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.3;
  margin-bottom: 2px;
}

.hotspot-label-en {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--c-text-muted);
  letter-spacing: 0.08em;
}

/* 호버 상태 */
.hotspot:hover .hotspot-dot {
  transform: scale(1.5);
  box-shadow: 0 0 14px var(--c-accent), 0 0 36px var(--c-accent-dim);
}

.hotspot:hover .hotspot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── 스캔라인 ─────────────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}
