* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

#section1 {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.image-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.tree-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#image1 {
  z-index: 9995;
  opacity: 1;
}

#image2 {
  z-index: 9994;
  opacity: 1;
}

#image3 {
  z-index: 9993;
  opacity: 1;
}

#image4 {
  z-index: 9992;
  opacity: 1;
}

#image5 {
  z-index: 9991;
  opacity: 1;
}

/* 新增textbox1样式 */
#textbox1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  z-index: 10000;
  text-align: left;
  width: 80vw;
}

h1 {
  position: relative;
  color: #ffffff;
  font-size: 8rem;
  text-align: center;
  z-index: 0;
  text-shadow: 0 0 15px rgb(255, 176, 5);
  margin-top: 50px;
  font-weight: bold;
}

/* 新增样式 */
#bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('https://static.igem.wiki/teams/5588/home/section1/section1bg.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  z-index: -1;
}

.edge-shadow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 55% 50% at center, transparent 70%, rgba(0,0,0,1) 100%);
  pointer-events: none;
}

#section4 {
    height: 100vh;
    background-color: #247c47;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 28px;
}

.spacer {
  height: 200vh;
}

.letter {
  display: inline-block;
  letter-spacing: 0.03em;
  margin: 0 0.03em;
}

#subtitle {
  position: relative;
  color: #ffffff;
  font-size: 1.8rem;
  text-align: center;
  z-index: 0;
  text-shadow: 0 0 10px rgba(255, 176, 5, 0.7);
  font-weight: bold;
  letter-spacing: 0.05em;
  margin-top: -35px; /* 添加负的上边距，使副标题往上移动 */
}

.subtitle-word {
  display: inline-block;
  margin: 0 0.2em;
  opacity: 0;
}

/* 渐变白色长条样式 */
.gradient-bar {
  width: 100vw;
  height: 50px;
  background: linear-gradient(to bottom, transparent 0%, white 100%);
  position: relative;
  z-index: 1000;
}

/* section2样式 */
#section2 {
  width: 100vw;
  height: 100vh;
  background-color: black;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.treecontainer {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
}

/* treecontainer中的图片样式 */
.treecontainer .tree-image {
  position: absolute;
  width: 30vw;
  height: auto;
  object-fit: cover;
  transition: opacity 0.5s ease;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  filter: brightness(0) invert(1);
}

/* 第一张图片初始不透明 */
#tree1 {
  opacity: 1;
  z-index: 2;
}

/* 第二张图片初始透明 */
#tree2 {
  opacity: 0;
  z-index: 1;
}

.textbox2-1 {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 1.5rem;
  width: 80%;
  z-index: 10000;
  text-align: center;
  width: 80vw;
}

.textbox2-2 {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 1.5rem;
  width: 20%;
  z-index: 10000;
  text-align: left;
}

.textbox2-3 {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 1.5rem;
  width: 20%;
  z-index: 10000;
  text-align: left;
}



.card-container {
  display: block;
  position: relative;
  width: 100%;
  height: 500px;
}

.card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 400px;
  overflow: hidden;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 15px;
}

/* .card:hover {
  transform: translateY(-10px) rotate(0deg) !important;
} */

.card-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.card:nth-child(1) .card-bg {
  background-image: url('https://static.igem.wiki/teams/5588/teammembers/background2.webp');
}

.card:nth-child(2) .card-bg {
  background-image: url('https://static.igem.wiki/teams/5588/teammembers/background2.webp');
}

.card:nth-child(3) .card-bg {
  background-image: url('https://static.igem.wiki/teams/5588/teammembers/background2.webp');
}

.card-text {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.7);
  color: white;
  text-align: center;
  padding: 10px;
  transition: bottom 0.3s ease;
  opacity: 0;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

/* .card:hover .card-text {
  bottom: 0;
  opacity: 1;
} */

.card:nth-child(1) {
  z-index: 3;
  transform: translate(-50%, -50%) rotate(-5deg);
}

.card:nth-child(2) {
  z-index: 2;
  transform: translate(-50%, -50%) rotate(0deg);
}

.card:nth-child(3) {
  z-index: 1;
  transform: translate(-50%, -50%) rotate(5deg);
}

/* .card:hover {
  transform: translate(-50%, -60%) rotate(0deg) !important;
} */
