/* Fullscreen map styling */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Playfair Display', 'Georgia', serif;
  }
  
  #info-panel h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
  font-family: 'Playfair Display', serif;
}

#info-panel p {
  line-height: 1.6;
  font-size: 15px;
  color: #444;
}

#map-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
}

#legend {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
}


  #map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
  }
  
  /* Title styling */
  #map-title {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    padding: 6px 10px;
    font-size: 18px;
    font-weight: bold;
    z-index: 10;
    border-radius: 4px;
  }
  
  /* Legend styling */
  #legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255,255,255,0.95);
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 10;
  }
  

  #info-panel {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  width: 420px;
  max-height: 90%;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 20px 16px 16px 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  overflow-x: hidden; /* ✅ 关键：禁止横向滚动 */
  word-wrap: break-word;
  z-index: 20;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

#info-panel p {
  word-break: break-word;
  font-size: 15px;
  line-height: 1.6;
}


#info-panel.hidden {
  display: none;
}

#info-panel #close-panel {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

#info-panel #close-panel:hover {
  color: #333;
}

#info-panel h4 {
  margin-top: 0;
}

/* Intro screen */
#intro-screen {
  position: absolute;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-page {
  max-width: 600px;
  padding: 40px;
  text-align: center;
}

.intro-page h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  margin-bottom: 20px;
}

.intro-page p {
  font-size: 18px;
  line-height: 1.6;
  color: #333;
}

.next-btn, #enter-btn {
  margin-top: 30px;
  padding: 12px 30px;
  font-size: 16px;
  background-color: black;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.hidden {
  display: none;
}

#back-to-intro-btn {
  position: fixed;
  top: 50px;
  left: 20px;
  z-index: 500;
  padding: 20px 24px;
  font-size: 14px;
  background-color: white;
  border: 1px solid #ccc;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.intro-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.prev-btn {
  margin-top: 30px;
  padding: 12px 30px;
  font-size: 16px;
  background-color: black;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}


#contribute-btn {
  position: absolute;
  top: 120px;
  left: 20px;
  z-index: 20;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: bold;
  background-color: rgb(234, 59, 129);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#contribute-btn:hover {
  background-color: darkred;
}


#mindmap-btn {
  margin-top: 8px;
  padding: 10px 16px;
  font-size: 14px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

#mindmap-btn:hover {
  background-color: #333;
}


/* 设置整体内容区域为横向排布，左文右图 */
.intro-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;                  /* 文字和图像之间的间距 */
  max-width: 1200px;          /* 整体内容宽度限制 */
  margin: 0 auto;
  padding: 40px 20px;
  flex-wrap: wrap;            /* 屏幕变窄时自动换行 */
}

/* 设置文字区域 */
.intro-text {
  flex: 1;
  max-width: 600px;
  text-align: left;           /* 改为左对齐更适合多段落展示 */
}

/* 设置文字段落样式 */
.intro-text p {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 20px;
}

/* 设置图像区域 */
.intro-image {
  flex: 1;
  max-width: 380px;
  margin: 0 auto;         /* ✅ 居中对齐 */
  text-align: center;     /* ✅ 图片也能居中 */
}

.intro-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;         /* ✅ 防止 inline 空隙 */
  margin: 0 auto;         /* ✅ 确保 block 元素水平居中 */
}

.intro-page {
  opacity: 1;
  transition: opacity 0.6s ease;
}

.intro-page.fade-out {
  opacity: 0;
  pointer-events: none;
}

.intro-page.fade-in {
  opacity: 1;
  pointer-events: auto;
}

.intro-text h1 {
  font-size: 26px; /* 原来是 32px，改小一点 */
  margin-bottom: 20px;
}

.intro-page p {
  font-size: 16px; /* 原为18px，可改为16或15 */
  line-height: 1.6;
}