/* General Page Styles */


body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f5caa6;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth; /* 平滑滚动 */
}

.hero {
    position: relative;
    margin-top: 12vh;
    /* height: 100vh; 这里注释掉了，做响应式设计 */
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://static.igem.wiki/teams/5367/home/top1.png'); /* 确保路径正确 */
    background-size: cover; /* 确保背景图适配各种屏幕 */
    background-position: center;
    background-attachment: fixed; /* 使背景图在滚动时不移动 */
    z-index: 1; /* 确保背景图在内容后面 */
}

#show1 {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
    padding: 50px; /* 确保内容不与顶部重叠 */
}

#show1.visible {
    opacity: 1;
    transform: translateY(0);
}

.showcase-module * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.showcase-module {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    /* height: 100vh; 控制在一屏内  这里不用控制在一屏内，否则响应式会溢出*/
    background-color: #f8e6d1;
    color: #333;
    text-align: left;
    padding: 10px;
    overflow: hidden; /* 确保背景齿轮不会影响布局 */
}

.showcase-module .content {
    position: relative;
    z-index: 2; /* 保证文字在齿轮之上 */
}

.showcase-module .content h1 {
    font-size: 4rem; /* 减小字体，减少高度占用 */
    line-height: 1.2;
    max-width: 600px;
    text-align: left;
}

.showcase-module .content p {
    font-size: 1.5rem; /* 适当调整文字大小 */
    margin-top: 10px;
    max-width: 600px;
    line-height: 1.6;
    text-align: left;
}

/* 强调文字样式 */
.highlight-red {
    color: #e74c3c;
    font-weight: bold;
}

.highlight-orange {
    color: #e67e22;
    font-weight: bold;
}

/* GIF 动图部分 */
.showcase-module .gif-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0; /* 减少动图上下间距 */
}

.showcase-module .gif-container img {
    width: 60%; /* 动图宽度压缩 */
    max-height: 350px; /* 控制动图高度 */
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 模块部分 */
.showcase-module .modules {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 1rem; /* 减少模块与动图之间的距离 */
}

.showcase-module .module {
    flex-basis: 30%;
    background-color: #fff;
    padding: 10px; /* 减少模块内边距 */
    margin: 1vw;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.showcase-module .module:hover {
    transform: translateY(-5px); /* 减小上移效果 */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.showcase-module .module img {
    height: 16vh; /* 缩小图标 */
    margin-bottom: 0.5rem;
}

.showcase-module .module h3 {
    font-size: 1.2rem; /* 调整标题大小 */
    margin-bottom: 0.5rem;
}

.showcase-module .module p {
    font-size: 0.9rem; /* 调整描述字体 */
}

/* 背景旋转齿轮 */
.showcase-module::before,
.showcase-module::after {
    content: '';
    position: absolute;
    z-index: -999;
    background-image: url('https://static.igem.wiki/teams/5367/home/chilun.png'); /* 添加齿轮图片 */
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
}

.showcase-module::before {
    width: 500px; /* 缩小齿轮 */
    height: 500px;
    top: -10px;
    right: -100px;
    animation: spin 30s linear infinite;
}

.showcase-module::after {
    width: 250px; /* 缩小齿轮 */
    height: 250px;
    bottom: -40px;
    left: -40px;
    animation: spin 20s linear infinite reverse;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}




/* Sections */
section {
    padding: 60px 20px;
}

h2 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
}

section p {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

/* Importance Section Animation */
#importance img {
    width: 70%;
    display: block;
    margin: 0 auto;
    animation: slideUp 1.5s ease-out;
}


/* 整体布局 */
.sphere-challenges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    background-color: #f9f9f9;
    min-height: 90vh;
}

.text-content {
    max-width: 40%; /* 右侧文字宽度 */
    text-align: center; /* 右对齐文字 */
    z-index: 2;
}

.text-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.text-content p {
    font-size: 1.2rem;
    line-height: 1.6;
}

.highlight-red {
    color: #e74c3c;
    font-weight: bold;
}

.highlight-orange {
    color: #e67e22;
    font-weight: bold;
}

/* 球体容器 - 使用flexbox排列整齐 */
.sphere-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around; /* 子元素之间平均分配空间 */  
    align-items: center;
    width: 50%; /* 左侧球体区域占据50%宽度 */
    gap: 20px; /* 每个球体之间有一定间距 */
}

/* 球体的基础样式 */
.sphere {
    width: 12vw;
    height: 12vw;
    background-color: rgba(52, 152, 219, 0.8);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    color: white;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.sphere h1{
    font-size: 3vh;

}
.sphere:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 1);
    color: #333;
}

.sphere-6{
    display: none;
}
.sphere-7{
    display: none;
}
/* 球体内容样式 */
.sphere p:nth-of-type(1) {
    display: block;
    font-size: 3vh;
    margin-bottom: 10px;
}
.sphere:hover p:nth-of-type(1){
    display: none;
}

.sphere p:nth-of-type(2) {
    display: none;
    font-size: 2vh;
    line-height: 1.4;
}
.sphere:hover p:nth-of-type(2){
    display: block;
    color: black;

}

/* 不同球体的颜色 */
.sphere-1 { background-color: rgba(52, 152, 219, 0.8); } /* 蓝色 */
.sphere-2 { background-color: rgba(230, 126, 34, 0.8); } /* 橙色 */
.sphere-3 { background-color: rgba(46, 204, 113, 0.8); } /* 绿色 */
.sphere-4 { background-color: rgba(155, 89, 182, 0.8); } /* 紫色 */
.sphere-5 { background-color: rgba(241, 196, 15, 0.8); } /* 黄色 */
.sphere-add-more { background-color: rgba(192, 57, 43, 0.8); cursor: pointer; } /* 红色 Add More */

/* 隐藏的额外内容 */
.additional-content {
    display: none;
    gap: 20px;
    margin-top: 20px;
}


/* Features Grid */
.features-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.feature {
    background-color: #001f3f;
    color: white;
    padding: 20px;
    border-radius: 8px;
    width: 30%;
    margin: 20px;
    transition: transform 0.3s ease;
}



/* 第一部分: 背景图片和箭头 */
.solution-section {
    background:linear-gradient(45deg, rgb(255, 195, 64), rgba(243, 149, 55, 0.94), rgba(252, 189, 130, 0.8)); /* 替换为你的图片 */
    width: 100%;
    background-size: cover;
    background-position: center;
    color: #001f3f;
    text-align: center;
    /* padding: 0px; */
    margin-bottom: 0;
    position: relative;
}
.solution-section h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.solution-section p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* 箭头样式 */
.arrow {
    margin-top: 50px;
}

.arrow img {
    width: 50px;
    animation: bounce 2s infinite;
}

/* 箭头的跳动动画 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.features-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 两列布局 */
    gap: 30px; /* 卡片之间的间距 */
    padding: 20px;
    background-color: #f9f9f9;
}

/* 每个 feature-card 的基本样式 */
.feature-card {
    display: block;
    /* flex-direction: column; */
    /* align-items: center; */
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    /* overflow: hidden; */
    margin: auto;
    width: 85vw;
    transition: transform 0.3s ease-in-out;
    background-color: white;
    margin-top: 3vh;
    margin-bottom: 3vh;
}

.feature-card:hover {
    transform: translateY(-10px); /* 悬浮时向上移动 */
}

/* 图片的不同尺寸 */
.feature-card img.feature-gif {
    width: 50%;
    margin: 0 auto;
    object-fit: cover;
    /* height: 300px; 横板的图片 */
    border-bottom: 5px solid #ddd;
}

/* 竖版图片需要单独调整 */
/* .feature-card:nth-child(3) img.feature-gif {
    height: 500px; 
} */

/* 文字部分的排版 */
.feature-text {
    margin: auto;
    width: 70%;
    padding: 20px;
    text-align: center;
}

.feature-text h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 不同颜色的重点文字 */
.highlight-red {
    color: #FF6347; /* 番茄红 */
    font-weight: bold;
}

.highlight-orange {
    color: #FFA500; /* 橙色 */
    font-weight: bold;
}

.feature-text p {
    font-size: 18px;
    line-height: 1.6;
    color: #444;
    text-align: justify;
}

/* 自适应设计 */






/* 第一部分: 动态背景与文字效果 */
.dynamic-background {

    position: relative;
    background-color: #f5f5f5;   /*find_123*/
    /* background-image: url(''); */   /*插背景图*/
    /* height: 50vh; 高度缩小 */
    /* display: flex; */
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.content-container {
    text-align: center;
    color:#000000 ;
}

.section-title {
    font-size: 3rem; /* 字体大小调整 */
    font-weight: bold;
    color: #000000;
}

.section-description {
    font-size: 1.5rem;
    margin-top: 15px; /* 调整间距 */
    max-width: 500px; /* 宽度减小 */
    line-height: 1.6;
}

/* 强调文字颜色 */
.highlight-red {
    color: #e74c3c;
}

.highlight-orange {
    color: #e67e22;
}

/* 第二部分: 功能展示部分 */
.gallery-section {
    display: block;
    padding: 80px 80px; /* 缩小内边距 */
    background-color: #fef3e6;
    position: relative;
}
/* .gallery-section::after {  
    content: ''; 
    position: absolute;  
    top: 0; 
    right: 10vw;   
    width: 1vw; 
    height: 100%; 
    background-color: rgba(247, 82, 44, 0.8);  
}   */



.gallery-title {
    font-size: 1.8rem; /* 字体大小缩小 */
    margin-bottom: 15px;
    text-align: center;
}

.gallery-text {
    margin-bottom: 5px;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.gallery-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1px; /* 缩小图片间距 */
}

.gallery-item img,
.creative-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item img:hover,
.creative-item img:hover {
    transform: scale(1.05);
}

/* 浮动的动态图片修饰元素 */
.floating-image {
    position: absolute;
    width: 80px;
    height: 80px;
    background-size: cover;
    animation: float 5s infinite alternate ease-in-out;
    z-index: 2;
}

/* 控制动态修饰图片的浮动动画 */
@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

.floating-image:nth-child(1) {
    top: 10px;
    right: 100px;
}

.floating-image:nth-child(2) {
    bottom: 10px;
    left: 150px;
}

/* 创意图集部分 */
.creative-gallery {   
    width: 80vw;
    margin: auto;   
                                                                                                                                               
    display: flex;
    flex-wrap: wrap;
}

.creative-gallery img{
    height: 30vh;
    flex-grow: 1;
    margin-top: 1vh;
}

/* 第一部分: 动态背景与渐变效果，设置透明度 */
/* .dynamic-background {
    position: relative;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(90deg, rgb(240, 210, 180), rgb(255 156 58 / 94%), rgb(242 77 40 / 80%)); 
} */

.dynamic-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://static.igem.wiki/teams/5367/home/logo.png') center/cover no-repeat; /* 动态背景 */
    opacity: 0.4; /* 设置透明度 */
    z-index: -999;
}

.content-container {
    text-align: center;
    color: rgb(36, 33, 33);
    max-width: 800px; /* 限制最大宽度 */
    margin: 0 auto; /* 居中 */
    padding: 20px;
    position: relative;
    z-index: 2; /* 使文字位于背景图上方 */
}

.section-title {
    font-size: 2.5rem; /* 字体大小调整 */
    font-weight: bold;
}

.section-description {
    font-size: 1.2rem;
    margin-top: 15px; /* 调整间距 */
    max-width: 700px; /* 宽度减小 */
    line-height: 1.6;
}

/* 强调文字颜色 */
.highlight-red {
    color: #e74c3c;
}

.highlight-orange {
    color: #e67e22;
}

/* 第二部分: 功能展示部分 */
.gallery-section {
    border-radius: 15px;
    width: 75vw;
    margin: auto;
    padding: 40px 20px; /* 缩小内边距 */
    background-color: #fef3e6;
    position: relative;
}

.gallery-title {
    font-size: 1.8rem; /* 字体大小缩小 */
    margin-bottom: 15px;
    text-align: center;
}

.gallery-text {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.gallery-row {
    /* display: flex;  这里看需要修改*/
    display: block;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px; /* 缩小图片间距 */
}

.gallery-item:not(:nth-of-type(4)) {
    display: block;
    width: 65vw;
    margin: auto;
    padding-bottom: 2vh;
}
.gallery-item:nth-of-type(4) {  /* 最后一个gallery类元素 */
    display: block;
    width: 30vw;
    margin: auto;
    padding-bottom: 2vh;
}
.gallery-item img,
.creative-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item img:hover,
.creative-item img:hover {
    transform: scale(1.05);
}

/* 浮动的动态图片修饰元素 */
.floating-image {
    position: absolute;
    width: 80px;
    height: 80px;
    background-size: cover;
    animation: float 5s infinite alternate ease-in-out;
    z-index: 2;
}

/* 控制动态修饰图片的浮动动画 */
@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

.floating-image:nth-child(1) {
    top: 50px;
    right: 100px;
}

.floating-image:nth-child(2) {
    bottom: 100px;
    left: 150px;
}




/* Section-specific background setup */
.dynamic-background-section {
    
    background: url('https://static.igem.wiki/teams/5367/home/background2.png');
    background-size: cover; /* Ensure the background covers the section */
    background-position: center; /* Center the background */
    background-repeat: no-repeat; /* Prevent the background from repeating */
    transition: background-image 0.5s ease-in-out; /* Smooth transition when the background changes */
    min-height: 100vh; /* Make sure the section takes up the full height of the viewport */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card container styling */
.vision-container {
    background: rgba(255, 255, 255, 0.85); /* High transparency */
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    text-align: center;
}

/* Title and content styling */
.vision-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #2c3e50;
}

.vision-subtitle {
    font-size: 1.8em;
    color: #2980b9;
    margin-bottom: 20px;
}

.vision-content {
    font-size: 1.1em;
    line-height: 1.6;
}

.highlight {
    color: #e74c3c; /* Emphasized color */
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer;
}

.highlight:hover {
    color: #c0392b; /* Darker shade on hover */
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .vision-container {
        padding: 20px;
        max-width: 90%;
    }
}







/* Footer */


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* 响应式 */
/* 针对小屏幕（例如手机） */  
@media (max-width: 900px) {  
    .sphere{
        width: 21vw;
        height: 21vw;
    }
}  

/* 针对中等屏幕（例如平板） */  
@media (min-width: 900px) and (max-width: 1300px) {  
    .sphere{
        width: 18vw;
        height: 18vw;
    }
}  

/* 针对大屏幕（例如桌面） */  
@media (min-width: 1300px) {  
    .sphere{
        width: 14vw;
        height: 14vw;
    }
}  