/* ================= 공통 ================= */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button {
  touch-action: manipulation;
}

/* ================= 로딩 ================= */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  background: #e8c66c;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#loading video {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
}

/* ================= 지도 ================= */
#map {
  position: absolute;
  top: calc(0px - env(safe-area-inset-top));
  left: calc(0px - env(safe-area-inset-left));
  right: calc(0px - env(safe-area-inset-right));
  bottom: calc(-10px - env(safe-area-inset-bottom));
  background: #fff;
  opacity: 0;
  transition: opacity 0.5s ease;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ================= 날씨 표시 ================= */
#weather-container {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  padding: 6px 12px;
  border-radius: 20px;
  z-index: 1000;
}

#weatherIcon {
  width: 28px;
  height:28px;
  object-fit: contain;
  display: block;
}

#weather {
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  white-space: nowrap;
}

/* ================= 하단 버튼 ================= */
#bottom-buttons {
  position: absolute;
  bottom: calc(-5px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(5px);
  border-radius: 40px;
  padding: 12px 20px;
  z-index: 1000;
}

#bottom-buttons.active {
  background: rgba(163, 0, 216, 0.5);
}

#bottom-buttons button {
  width: 50px;
  height: 50px;
  border: none;
  background: none;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

#bottom-buttons img {
  width: 100%;
  height: 100%;
  opacity: 0.7;
  pointer-events: none;
}

/* ================= 확대 알림 ================= */
#zoom-alert {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 2000;
}

/* ================= 마커 팝업 ================= */
.popup {
  position: relative;
  width: 120px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 6px 8px;
  gap: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  text-align: center;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    "Roboto",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 12px;
  line-height: 1.3;
}

.popup-images {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.popup img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.popup-title {
  font-size: 14px;
  font-weight: 600;
}

.popup-separator {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.25);
}

.popup-location,
.popup-password {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
}

.popup::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid rgba(0,0,0,0.45);
}

/* ================= 카카오페이 ================= */
#info-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

/* ================= info 팝업 ================= */
#info-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 320px;
  background: rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  border-radius: 28px;
  border: 1px solid rgba(0,0,0,0.3);
  font-size: 16px;
  color: #000;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
  white-space: normal;
}

.info-title {
  display: block;
  margin-top: 10px;     /* 아래로 내림 */
  margin-bottom: 10px;  /* 아이콘과 간격 조절 */
  text-align: center;
}

.info-content {
  width: 100%;
  text-align: left;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.info-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

#info-image {
  width: 120px;   /* 원하는 크기 */
  height: auto;
  margin-top: 10px;
}

.gray-box {
  width: 22px;
  height: 22px;
  background: #aaa;
  border-radius: 4px;
}

#weather-popup {
  position: absolute;
  top: 120px; /* 날씨바 아래 위치 (조절 가능) */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  backdrop-filter: blur(6px);
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 3000;
}

#weather-popup.active {
  opacity: 1;
  pointer-events: auto;
}

