/* 基本樣式 */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
}

/* 主要容器，使用 Flexbox 佈局 */
.main-container {
  display: flex;
  flex-grow: 1;
  flex-direction: row; /* 桌面裝置：水平排列 */
}

/* 地圖樣式 */
#map {
  flex-grow: 1;
  height: 100%;
}

/* 景點列表容器 */
.location-list-container {
  width: 350px; /* 桌面裝置列表寬度 */
  height: 100%;
  overflow-y: auto; /* 內容過多時顯示滾動條 */
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  background-color: #f9f9f9;
  flex-shrink: 0; /* 防止列表被壓縮 */
}

.location-list-container h2 {
  text-align: center;
  margin: 15px 0;
  font-size: 1.2em;
  color: #333;
}

/* 景點列表 ul */
#list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 景點列表項目 li */
#list li {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
  transition: background-color 0.2s;
  font-size: 0.9em;
}

#list li:hover {
  background-color: #e0e0e0;
}

#list li .list-item-title {
  font-weight: bold;
  color: #0056b3;
}

#list li .list-item-desc {
  font-size: 0.8em;
  color: #666;
  margin-top: 4px;
}

/* 彈出視窗 Popup 樣式 */
.audio-popup {
  min-width: 280px;
}

.audio-title {
  font-weight: bold;
  margin-bottom: 7px;
  font-size: 1.1em;
}

.audio-desc {
  font-size: 14px;
  margin-bottom: 8px;
}

.speed-control {
  margin-top: 8px;
  font-size: 14px;
}

/* 行動裝置響應式設計 */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column; /* 手機裝置：垂直排列 */
  }
  
  #map {
    height: 65vh; /* 手機上地圖佔 65% 高度 */
    width: 100%;
  }
  
  .location-list-container {
    width: 100%; /* 列表寬度佔滿 */
    height: 35vh; /* 列表佔 35% 高度 */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1); /* 陰影改到上方 */
  }
}