/* =====================================
   古风增强样式 - Ancient Style Enhancement
   ===================================== */

/* 全局中国传统色调 */
:root {
  --ancient-red: #c52626;        /* 朱红 */
  --ancient-gold: #d4a574;       /* 琥珀金 */
  --ancient-bronze: #8b6a36;     /* 青铜 */
  --ancient-dark: #1a1410;       /* 墨色 */
  --ancient-paper: #f5e6d3;      /* 宣纸色 */
  --ancient-brown: #5a4a2a;      /* 深棕 */
}

/* 为所有按钮添加古典纹理 */
#fullscreenToggle,
#autorotateToggle,
#sceneListToggle {
  position: relative;
  overflow: hidden;
}

#fullscreenToggle::before,
#autorotateToggle::before,
#sceneListToggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(212, 165, 116, 0.03) 2px,
      rgba(212, 165, 116, 0.03) 4px
    );
  pointer-events: none;
}

/* Link Hotspot 增强装饰 - 铜钱样式 */
.link-hotspot-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20%;
  height: 40%;
  transform: translate(-50%, -50%);
  background: rgba(26, 20, 16, 0.5);
  border-radius: 2px;
}

/* 为 Link Hotspot 添加旋转动画 */
@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.link-hotspot:hover .link-hotspot-icon::before {
  animation: rotate-slow 3s linear infinite;
}

/* Info Hotspot 标题装饰 */
.info-hotspot .info-hotspot-title {
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 为滚动条添加古风样式 */
.info-hotspot .info-hotspot-text::-webkit-scrollbar {
  width: 8px;
}

.info-hotspot .info-hotspot-text::-webkit-scrollbar-track {
  background: rgba(26, 20, 16, 0.5);
  border-radius: 4px;
}

.info-hotspot .info-hotspot-text::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b6a36 0%, #5a4a2a 100%);
  border-radius: 4px;
  border: 1px solid rgba(212, 165, 116, 0.3);
}

.info-hotspot .info-hotspot-text::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d4a574 0%, #8b6a36 100%);
}

/* 场景列表滚动条 */
#sceneList::-webkit-scrollbar {
  width: 8px;
}

#sceneList::-webkit-scrollbar-track {
  background: rgba(26, 20, 16, 0.5);
}

#sceneList::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b6a36 0%, #5a4a2a 100%);
  border-radius: 4px;
  border: 1px solid rgba(212, 165, 116, 0.3);
}

/* 场景项悬浮时的装饰 */
#sceneList .scene .text::before {
  content: '▸';
  position: absolute;
  left: 8px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--ancient-gold);
}

.no-touch #sceneList .scene:hover .text::before,
#sceneList .scene.current .text::before {
  opacity: 1;
  transform: translateX(0);
}

/* 为标题栏添加装饰纹样 */
#titleBar .sceneName::before {
  content: '【';
  margin-right: 8px;
  color: var(--ancient-gold);
  font-size: 18px;
}

#titleBar .sceneName::after {
  content: '】';
  margin-left: 8px;
  color: var(--ancient-gold);
  font-size: 18px;
}

/* Link Hotspot Tooltip 增强 */
.link-hotspot-tooltip::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 8px 6px 0;
  border-color: transparent #d4a574 transparent transparent;
}

.link-hotspot-tooltip::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 6px 5px 0;
  border-color: transparent rgba(26, 20, 16, 0.95) transparent transparent;
}

/* 添加古典图案纹理（可选） */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, transparent 0%, rgba(212, 165, 116, 0.02) 100%),
    radial-gradient(circle at 80% 80%, transparent 0%, rgba(139, 106, 54, 0.02) 100%);
  pointer-events: none;
  z-index: 0;
}

#pano {
  z-index: 1;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .link-hotspot-icon {
    border-width: 2px;
  }
  
  .info-hotspot .info-hotspot-header {
    border-width: 2px;
  }
  
  #titleBar .sceneName::before,
  #titleBar .sceneName::after {
    font-size: 16px;
  }
}

/* 为按钮添加点击反馈 */
#fullscreenToggle:active,
#autorotateToggle:active,
#sceneListToggle:active {
  transform: scale(0.95);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Info Hotspot 关闭按钮悬浮效果 */
.info-hotspot .info-hotspot-close-wrapper:hover {
  background: linear-gradient(135deg, #8b6a36 0%, #5a4a2a 100%);
  box-shadow: 0 2px 10px rgba(139, 106, 54, 0.4);
}

/* 为文本内容添加更好的可读性 */
.info-hotspot .info-hotspot-text p {
  margin: 0.5em 0;
  line-height: 1.8em;
}

.info-hotspot .info-hotspot-text h1,
.info-hotspot .info-hotspot-text h2,
.info-hotspot .info-hotspot-text h3 {
  color: var(--ancient-gold);
  margin-top: 0.8em;
  margin-bottom: 0.5em;
  border-bottom: 1px solid rgba(212, 165, 116, 0.3);
  padding-bottom: 0.3em;
}
