/* ============================================================
   style.css - 北京十六景三维全景地图
   风格：清新雅致的"山水画卷"，低饱和青绿调
   ============================================================ */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", "Microsoft YaHei", serif;
  background: #c8e0f0;
  user-select: none;
  -webkit-user-select: none;
}

#canvas-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
#canvas-container canvas { display: block; cursor: grab; }
#canvas-container canvas:active { cursor: grabbing; }

/* ---- 顶部标题 ---- */
#title-bar {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
}
#title-bar h1 {
  font-size: 28px;
  font-weight: 600;
  color: #2c4a3e;
  letter-spacing: 8px;
  text-shadow: 0 1px 4px rgba(255,255,255,0.6);
}
#title-bar .subtitle {
  font-size: 13px;
  color: #4a6b5c;
  margin-top: 4px;
  letter-spacing: 3px;
}

/* ---- 左侧控制栏 ---- */
#control-panel {
  position: fixed;
  left: 20px; top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.control-btn {
  padding: 10px 18px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(100,130,110,0.4);
  border-radius: 4px;
  color: #2c4a3e;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.25s;
  font-family: inherit;
  backdrop-filter: blur(6px);
}
.control-btn:hover {
  background: rgba(255,255,255,0.95);
  border-color: #4a7c59;
}
.control-btn.active {
  background: #4a7c59;
  color: #fff;
  border-color: #4a7c59;
}

/* ---- 栏目切换标签 ---- */
.cat-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}
.cat-tab {
  padding: 8px 14px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(100,130,110,0.3);
  border-radius: 4px;
  color: #5a7a6a;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.25s;
  font-family: inherit;
  backdrop-filter: blur(6px);
}
.cat-tab:hover { background: rgba(255,255,255,0.9); }
.cat-tab.active {
  background: #3a5c49;
  color: #f0e8d0;
  border-color: #3a5c49;
  font-weight: 600;
}

/* ---- 底部操作提示 ---- */
#hint-bar {
  position: fixed;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 12px;
  color: #5a7a6a;
  background: rgba(255,255,255,0.6);
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 1px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* ---- 右侧信息面板 ---- */
#info-panel {
  position: fixed;
  right: 24px; top: 50%;
  transform: translateY(-50%) translateX(20px);
  width: 300px;
  background: rgba(252, 250, 245, 0.92);
  border: 1px solid rgba(100,130,110,0.3);
  border-radius: 6px;
  padding: 22px 24px;
  z-index: 10;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);
}
#info-panel.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}
#info-close {
  position: absolute;
  top: 10px; right: 12px;
  cursor: pointer;
  font-size: 18px;
  color: #888;
  line-height: 1;
}
#info-close:hover { color: #333; }
#info-title {
  font-size: 20px;
  color: #2c4a3e;
  margin-bottom: 10px;
  padding-bottom: 8px;
  padding-right: 20px;
  border-bottom: 1px solid rgba(100,130,110,0.25);
  letter-spacing: 2px;
}
#info-desc {
  font-size: 14px;
  color: #4a5a4e;
  line-height: 1.8;
  text-align: justify;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 4px;
}

/* ---- 加载提示 ---- */
#loading {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #e8ece8;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-text {
  font-size: 18px;
  color: #4a6b5c;
  letter-spacing: 6px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---- 页脚说明（技术难点）---- */
#tech-notes {
  position: fixed;
  bottom: 18px; right: 20px;
  z-index: 5;
  font-size: 11px;
  color: rgba(80,100,90,0.6);
  max-width: 280px;
  text-align: right;
  pointer-events: none;
  line-height: 1.6;
}

/* ---- 位置编辑面板 ---- */
#edit-panel {
  position: fixed;
  bottom: 60px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10;
  background: rgba(60, 40, 30, 0.9);
  color: #f0e8d0;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  text-align: center;
}
#edit-panel.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#edit-coords {
  font-size: 12px;
  color: #c9b890;
  margin-top: 4px;
  font-family: monospace;
}

/* ---- 响应式：窄屏适配 ---- */
@media (max-width: 768px) {
  #title-bar h1 { font-size: 20px; letter-spacing: 4px; }
  #control-panel { left: 10px; gap: 6px; }
  .control-btn { padding: 8px 12px; font-size: 12px; }
  #info-panel { width: calc(100% - 40px); right: 20px; }
  #hint-bar { font-size: 11px; bottom: 10px; }
  #tech-notes { display: none; }
}
