/* ==========================================================
   全景展示系统 - 前台样式（参照 720yun 沉浸式交互）
   ========================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif; background: #000; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 全景容器 ---------- */
#panorama { position: fixed; inset: 0; width: 100%; height: 100%; }
#panorama .pnlm-container { background: #000; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 100%);
  transition: opacity .3s;
}
.topbar.hidden { opacity: 0; pointer-events: none; }
.topbar-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto;
  background: linear-gradient(135deg, #ff5f6d, #ff9966);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(255,95,109,.4);
  transform: translateX(50%);  /* 右移半个 logo 宽度 */
}
.brand-logo-img { background: #fff; object-fit: cover; padding: 2px; }
.brand-text { min-width: 0; }
.brand-text h1 { color: #fff; font-size: 18px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-label { display: block; color: rgba(255,255,255,.85); font-size: 12px; margin-top: 2px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

.top-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tbtn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35); color: #fff; font-size: 13px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .2s, transform .1s; text-decoration: none;
}
.tbtn:hover { background: rgba(0,0,0,.6); }
.tbtn:active { transform: scale(.96); }
.tbtn .ico { font-size: 15px; }
.tbtn b { color: #ffd666; font-weight: 700; }
.admin-link { display: none; }

/* ---------- 底部场景栏 ---------- */
.scene-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 24px 16px 18px;
  background: linear-gradient(0deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 100%);
  transition: opacity .3s;
}
.scene-bar.hidden { opacity: 0; pointer-events: none; }
.scene-list { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 8px; scrollbar-width: thin; }
.scene-list::-webkit-scrollbar { height: 4px; }
.scene-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 2px; }
.scene-item {
  flex: 0 0 auto; width: 118px; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: rgba(0,0,0,.35);
  transition: transform .2s, border-color .2s; position: relative;
}
.scene-item:hover { transform: translateY(-4px); }
.scene-item.active { border-color: #ff9966; box-shadow: 0 4px 16px rgba(255,153,102,.35); }
.scene-item img { width: 100%; height: 68px; object-fit: cover; display: block; }
.scene-item .sname {
  display: block; color: #fff; font-size: 12px; text-align: center;
  padding: 7px 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.scene-item .sname::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #52c41a; margin-right: 5px; vertical-align: 1px; }

/* ---------- 场景简介条（底部半透明） ---------- */
.scene-desc {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 128px; z-index: 50;
  max-width: min(640px, 88vw);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  color: #fff; font-size: 13px; line-height: 1.7;
  padding: 12px 18px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
  transition: opacity .3s;
}
.scene-desc.hidden { opacity: 0; pointer-events: none; }

/* ---------- 右下角访客数 ---------- */
.visits-badge {
  position: fixed; right: 16px; bottom: 110px; z-index: 50;
  background: rgba(0,0,0,.45); color: #fff; font-size: 12px;
  padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.15);
}
.visits-badge b { color: #ffd666; }

/* ---------- 加载遮罩（兼场景切换转场） ---------- */
.loading-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(11,14,23,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity .35s ease;
}
.loading-mask.done { opacity: 0; pointer-events: none; }
.loading-mask p { color: rgba(255,255,255,.6); font-size: 14px; }
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15); border-top-color: #ff9966;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 通用弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-mask.hidden { display: none; }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 480px;
  max-height: 82vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.4); animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; }
.modal-head h3 { font-size: 16px; color: #222; }
.modal-close { border: 0; background: none; font-size: 24px; color: #999; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: #333; }
.modal-body { padding: 18px 20px; overflow-y: auto; color: #444; font-size: 14px; line-height: 1.8; }

/* 简介 */
.intro-desc { color: #555; margin-bottom: 16px; white-space: pre-line; }

/* 分享 */
.share-row { display: flex; gap: 10px; align-items: center; }
.share-row input { flex: 1; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; outline: none; color: #666; }
.share-row button { padding: 10px 18px; background: #52c41a; color: #fff; border: 0; border-radius: 8px; font-size: 13px; }
.share-row button:hover { background: #43a312; }
.share-tip { font-size: 12px; color: #999; margin-top: 10px; }

/* 热点信息弹窗 */
.hs-modal-title { font-size: 15px; font-weight: 700; color: #222; margin-bottom: 8px; }
.hs-modal-content { white-space: pre-line; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 640px) {
  .topbar { padding: 10px 12px; }
  .brand-logo { width: 38px; height: 38px; font-size: 12px; }
  .brand-text h1 { font-size: 15px; }
  .tbtn { padding: 7px 10px; }
  .tlabel { display: none; }
  .tbtn .ico { font-size: 17px; }
  .scene-item { width: 96px; }
  .scene-item img { height: 56px; }
  .scene-desc { bottom: 112px; max-width: 92vw; font-size: 12px; padding: 10px 14px; }
  .visits-badge { bottom: 96px; }
}
