/* 重置容器padding */
.container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 第一部分：图片背景和标题 */
.desc-section-one {
  height: 502px;
  background-image: url('https://static.igem.wiki/teams/5736/img/desc/p1-banner-bg.webp');
  background-size: 100% auto;
  background-position: center;
  background-repeat: no-repeat;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desc-section-one-title {
  color: #FFFFFE;
  font-size: 72px;
  font-weight: 900;
  text-align: center;
  margin: 0;
  font-family: Arial, sans-serif;
  margin-top: 90px;
}

.section-one-left-image {
  position: relative;
  margin-left: -150px;
  margin-top: -73%;
  width: 90px;
  height: 146px;
  flex-shrink: 0;
}

.section-one-right-image {
  position: relative;
  margin-left: 135%;
  margin-top: -74%;
  width: 112px;
  height: 83px;
  flex-shrink: 0;
}

/* 第二部分：团队成员展示 */
.team-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 80px;
  margin-left: -80px;
}

.team-container {
  width: 80%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* 实验室部分 */
.lab-section {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 20px;
}

/* 标题背景 */
.section-title-bg {
  width: 237px;
  height: 72px;
  background-image: url('https://static.igem.wiki/teams/5736/img/team/p2-title-bg.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 100 auto;
}

.section-title {
  color: #FFFFFE;
  font-family: Arial, sans-serif;
  font-weight: 900;
  text-align: center;
  margin: 0;
  white-space: nowrap;
}

.dry-lab-title {
  font-size: 34px;
  width: auto;
  height: auto;
  white-space: nowrap;
}

.wet-lab-title {
  font-size: 27px;
  width: auto;
  height: auto;
  white-space: nowrap;
}

/* 团队成员卡片网格 */
.team-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  justify-items: center;
}

/* 团队成员卡片 */
.team-card {
  width: 289px;
  height: 408.8px;
  background-image: url('https://static.igem.wiki/teams/5736/img/team/p2-name-bg.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 120px;
}

/* 成员照片 */
.member-photo {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
}

.member-photo-28 {
  width: 145px !important;
}

/* 卡片内容 */
.card-content {
  position: absolute;
  top: 120px;
  left: 32px;
  right: 32px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
}

/* NAME标签 */
.name-label {
  font-size: 21px;
  font-weight: bold;
  color: #333;
  text-align: left;
  width: 180px;
  height: 15px;
  margin-bottom: 20px;
  margin-top: -25px;
  font-family: Arial, sans-serif;
}

/* 水平线 */
.horizontal-line {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
}

/* 成员描述区域 */
.member-description {
  position: relative;
  width: 225px;
  height: 189px;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 添加垂直滚动条 */
  overflow-x: hidden; /* 隐藏水平滚动条 */
  padding-right: 5px; /* 为滚动条留出空间 */
}

/* 自定义滚动条样式 */
.member-description::-webkit-scrollbar {
  width: 6px;
}

.member-description::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.member-description::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.member-description::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}


/* 描述文字 */
.member-description p {
  font-size: 14px;
  color: #333;
  text-align: left;
  line-height: 1.4;
  margin: 0;
  padding-right: 15px; /* 为滚动条留出空间 */
  font-family: Arial, sans-serif;
  word-wrap: break-word; /* 确保长单词会换行 */
}

/* Edge Dark Mode 适配 */
@media (prefers-color-scheme: dark) {
  .member-description p {
    color: #1a1a1a; /* 更深的颜色，在白色背景上更清晰 */
  }

  .name-label {
    color: #1a1a1a; /* 标签文字也加深 */
  }
}

/* 针对Edge浏览器的深色模式检测 */
@supports (-ms-ime-align: auto) {
  @media (prefers-color-scheme: dark) {
    .member-description p {
      color: #000000; /* Edge深色模式下使用纯黑色 */
    }

    .name-label {
      color: #000000;
    }
  }
}

/* 针对新版Edge浏览器的深色模式检测 */
@supports (backdrop-filter: blur(1px)) {
  @media (prefers-color-scheme: dark) {
    .member-description p {
      color: #000000 !important; /* 强制使用纯黑色 */
    }

    .name-label {
      color: #000000 !important;
    }
  }
}

/* 通用深色模式适配 - 确保在所有浏览器中都能正确显示 */
@media (prefers-color-scheme: dark) {
  .member-description {
    background-color: #ffffff; /* 确保背景是白色 */
  }

  .member-description p {
    color: #000000 !important; /* 强制使用纯黑色文字 */
  }

  .name-label {
    color: #000000 !important;
  }
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .team-container {
    width: 90%;
  }

  .team-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Titles responsive: keep on one line */
  .dry-lab-title { font-size: 30px; }
  .wet-lab-title { font-size: 24px; }
}

@media (max-width: 900px) {
  .team-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-card {
    width: 250px;
    height: 350px;
  }

  .member-description {
    width: 200px;
    height: 150px;
  }

  /* Titles responsive: keep on one line */
  .dry-lab-title { font-size: 26px; }
  .wet-lab-title { font-size: 22px; }
}

@media (max-width: 600px) {
  .team-cards-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    width: 280px;
    height: 380px;
  }

  .member-description {
    width: 220px;
    height: 170px;
  }

  /* Titles responsive: keep on one line */
  .dry-lab-title { font-size: 24px; }
  .wet-lab-title { font-size: 20px; }
}

/* To Top Button */
.to-top-container {
  position: fixed;
  bottom: 100px;
  right: 45px;
  z-index: 1000;
}

.to-top-btn {
  width: 82px;
  height: 82px;
  object-fit: contain;
  cursor: url('https://static.igem.wiki/teams/5736/img/home/p1-img6-unclick.webp') 39 28, pointer;
  transition: transform 0.3s ease;
}

.to-top-btn:hover {
  transform: scale(1.1);
}