@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap");
/* 引入字体 */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin-top: 80px; /* 根据 header 的高度调整 */
}


header {
  width: 100%;
  padding: 20px 0;
  background: #333;
  color: #fff;
  text-align: center;
  font-family: "Roboto", sans-serif;
  /* 使用引入的字体 */
  font-size: 2.5em;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed; /* 固定在页面顶部 */
  top: 0; /* 距离页面顶部为 0 */
  left: 0; /* 距离页面左侧为 0 */
  z-index: 1000; /* 确保 header 在最上层 */
}
/* 调整每行显示的标本数量 */
.container {
    display: grid;
    /* 每行显示 10 个标本 */
    grid-template-columns: repeat(10, 1fr); 
    gap: 4px; /* 设置纵向和横向之间的间距 */
    width: 95%;
    max-width: 1920px;
    margin-top: 80px; /* 增加顶部间距，避免被 header 遮挡 */
    padding-bottom: 40px; /* 增加底部间距，避免最后一行被遮挡 */
  }

.item {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* 添加过渡效果 */
}

.item:hover {
  transform: scale(1.05); /* 鼠标移上去时放大 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
}

.item h2 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  text-align: center;
  font-size: 1.2em;
}

/* 默认高度 */
.item {
  height: calc(50vh - 220px); /* 50% 的视口高度减去间距 */
  max-height: 400px; /* 最大高度为 550px */
}

/* 大屏幕调整高度 */
@media (min-width: 1280px) {
  .item {
    height: calc(50vh - 180px); /* 50% 的视口高度减去间距 */
    max-height: 400px; /* 最大高度为 550px */
  }
}
.content {
  display: flex;
  width: 100%;
  gap: 16px; /* 设置纵向和横向之间的间距 */

  max-width: 1920px;
  margin-top: 80px; /* 增加顶部间距，避免被 header 遮挡 */
  padding-bottom: 40px; /* 增加底部间距，避免最后一行被遮挡 */
}



#viewer {
  flex: 4;
  background: transparent;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  height: calc(100vh - 160px);
  /* 减去 header 和 margin 的高度 */
}

.info {
  flex: 6;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info h2 {
  margin-top: 0;
  font-family: "Roboto", sans-serif;
  font-size: 1.5em;
  font-weight: 700;
}

.info p {
  margin: 10px 0;
  font-size: 1em;
}

.map {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  /* 确保地图不会超过一屏 */
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
