* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #0a1228 0%, #12203f 55%, #1a2a4d 100%);
  color: #e9e4d5;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

/* 星空 */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 42%, #fff7 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 12%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 35%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 60%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 70%, #fff5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 20% 85%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 88%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 15%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 55%, #fff5 50%, transparent 51%);
  pointer-events: none;
}

.fp-header {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 32px;
}
.fp-back {
  color: #c9bfa3; text-decoration: none; font-size: 14px;
  border: 1px solid #ffffff2a; padding: 6px 14px; border-radius: 20px;
  transition: .2s;
}
.fp-back:hover { background: #ffffff14; }
.fp-header h1 { font-size: 22px; font-weight: 500; letter-spacing: 4px; }
.fp-role { font-size: 12px; color: #9aa7c7; margin-left: auto; }

.map-wrap {
  position: relative;
  width: min(1200px, 95vw);
  margin: 20px auto 80px;
}

#globeCanvas {
  display: block;
  cursor: grab;
}
#globeCanvas:active { cursor: grabbing; }


/* 城市光点 */
.city-dot {
  position: absolute;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #ffe9a8;
  box-shadow: 0 0 10px 3px #ffd76b88;
  animation: pulse 2.4s ease-in-out infinite;
  cursor: pointer;
}
@keyframes pulse {
  0%,100% { transform: scale(1);   opacity: .95; }
  50%     { transform: scale(1.45); opacity: .55; }
}
.city-name {
  position: absolute;
  font-size: 13px; letter-spacing: 2px;
  color: #f3ecd6;
  text-shadow: 0 0 6px #000a;
  white-space: nowrap;
  pointer-events: none;
}

/* 照片（单张贴纸，位于光点正上方） */
.photo-pile {
  position: absolute;
  width: 64px; height: 80px;
  cursor: pointer;
}
.photo-pile img {
  width: 56px; height: 56px;
  object-fit: cover;
  background: #fff;
  padding: 4px 4px 14px;
  box-shadow: 0 4px 12px #000a;
  transform: rotate(-4deg);
  transition: transform .25s;
}
.photo-pile:hover { z-index: 60; }
.photo-pile:hover img { transform: rotate(0) scale(1.12); }
.pile-badge {
  position: absolute; right: 0; bottom: 4px;
  background: #d9486b; color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  box-shadow: 0 2px 6px #0008;
}
.city-name { cursor: pointer; }
.city-name:hover { color: #ffe9a8; }


/* 定位预览标记 */
.preview-marker {
  position: absolute;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid #ff7aa2;
  background: #ff7aa244;
  animation: blink .7s linear infinite alternate;
  pointer-events: none;
}
@keyframes blink { from { opacity: 1; transform: scale(1);} to { opacity: .3; transform: scale(1.6);} }

/* 通用弹窗 */
.fp-modal {
  position: fixed; inset: 0;
  background: #060a18cc;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.fp-modal-box {
  background: #16203c;
  border: 1px solid #ffffff22;
  border-radius: 14px;
  padding: 28px;
  width: min(460px, 92vw);
  position: relative;
}
.fp-modal-box h2 { font-size: 18px; margin-bottom: 16px; color: #f3ecd6; }
.fp-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: #9aa7c7;
  font-size: 18px; cursor: pointer;
}
.fp-modal-box label {
  display: block; font-size: 13px; color: #c9bfa3; margin: 12px 0 4px;
}
.fp-modal-box input, .fp-modal-box textarea {
  width: 100%;
  background: #0d1530;
  border: 1px solid #ffffff2a;
  border-radius: 8px;
  color: #f0ead6;
  padding: 9px 12px;
  font-size: 14px;
}
.fp-modal-box input[type=file] { color: #9aa7c7; }
.fp-primary {
  margin-top: 16px;
  background: #d9a441; color: #1a1408;
  border: none; border-radius: 8px;
  padding: 10px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.fp-primary:hover { background: #e7b455; }
.fp-ghost {
  margin-top: 16px;
  background: none; color: #c9bfa3;
  border: 1px solid #ffffff33; border-radius: 8px;
  padding: 10px 18px; font-size: 14px; cursor: pointer;
}
.fp-status { margin-top: 12px; font-size: 13px; color: #ffb3c0; min-height: 18px; }
.fp-preview-tip { text-align: center; line-height: 2.2; font-size: 14px; }

/* 详情弹窗：胶片感 */
.detail-box {
  background: linear-gradient(180deg, #1b1626 0%, #14101f 100%);
  border: 1px solid #ffffff1f;
  border-radius: 6px;
  width: min(760px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: 34px 38px;
  position: relative;
  box-shadow: 0 30px 80px #000c;
}
.detail-box::before {
  content: "";
  position: sticky; top: 0;
  display: block;
  margin: -34px -38px 20px;
  height: 8px;
  background: repeating-linear-gradient(90deg, #0000 0 8px, #ffffff12 8px 16px);
}
.detail-box h2 { font-size: 24px; letter-spacing: 3px; color: #f3ecd6; }
.detail-count { font-size: 13px; color: #b8a97e; margin: 6px 0 22px; letter-spacing: 2px; }

.visit-item { margin-bottom: 30px; }
.visit-date {
  font-family: Georgia, serif;
  font-size: 15px; color: #e8d9a8; letter-spacing: 2px;
  display: flex; align-items: baseline; gap: 10px;
}
.visit-nth {
  font-size: 11px; color: #14101f;
  background: #d9a441; border-radius: 10px;
  padding: 1px 9px; letter-spacing: 1px;
}
.visit-photos { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 10px; }
.visit-photos img {
  width: 130px; height: 130px;
  object-fit: cover;
  background: #fff;
  padding: 5px 5px 20px;
  box-shadow: 0 6px 14px #000a;
  cursor: pointer;
  transition: transform .2s;
}
.visit-photos img:nth-child(odd)  { transform: rotate(-1.6deg); }
.visit-photos img:nth-child(even) { transform: rotate(1.6deg); }
.visit-photos img:hover { transform: rotate(0) scale(1.06); z-index: 2; }
.visit-note { font-size: 14px; line-height: 1.9; color: #d8d2c0; }
.visit-admin { margin-top: 8px; display: flex; gap: 10px; }
.visit-admin button {
  font-size: 12px; padding: 5px 12px; border-radius: 6px; cursor: pointer;
  background: none; border: 1px solid #ffffff2e; color: #c9bfa3;
}
.visit-admin button:hover { background: #ffffff14; }
#detailAdminBar { margin-top: 10px; text-align: center; }

/* 大图查看器 */
.lightbox {
  position: fixed; inset: 0;
  background: #000000ee;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
#lbImg {
  max-width: 86vw; max-height: 86vh;
  background: #fff; padding: 10px 10px 34px;
  box-shadow: 0 20px 60px #000;
  transform: rotate(-.5deg);
}
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: #e8d9a8; font-size: 60px; cursor: pointer;
  padding: 20px;
}
.lb-prev { left: 2vw; }
.lb-next { right: 2vw; }
.lb-counter {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: 13px; color: #b8a97e; letter-spacing: 2px;
}

/* 管理按钮 */
.fp-add-btn {
  position: fixed; right: 34px; bottom: 34px;
  background: #d9a441; color: #1a1408;
  border: none; border-radius: 30px;
  padding: 13px 26px; font-size: 15px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px #d9a44144;
}
.fp-add-btn:hover { background: #e7b455; }
/* 定位确认时：弹窗透明化，露出地球，卡片挪到右下角 */
.fp-modal.previewing { background: transparent; pointer-events: none; }
.fp-modal.previewing .fp-modal-box {
  position: absolute; right: 24px; bottom: 24px;
  width: 320px; pointer-events: auto;
  box-shadow: 0 10px 40px #000c;
}
.city-menu {
  position: fixed; z-index: 999;
  background: #1b2340; border: 1px solid #f0c04055;
  border-radius: 8px; padding: 6px 0; min-width: 160px;
  box-shadow: 0 8px 24px #000a;
}
.city-menu div {
  padding: 8px 14px; color: #e8eaf2; cursor: pointer; font-size: 14px;
}
.city-menu div:hover { background: #f0c040; color: #1b2340; }
