/* 背景图片样式 */
.team-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://static.igem.wiki/teams/5819/hezhao/hezhao.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
}

/* 自定义滚动进度条 */
.team-scroll-progress {
    position: fixed;
    top: 0;
    left:0;
    width: 8px;
    background: linear-gradient(to bottom, #c46481, #eacdcd);
    height: 0%;
    z-index: 1000;
    transition: height 0.1s;
    border-radius: 4px 0 0 4px;
}

/* 主内容容器 */
.team-content {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* 头部区域样式 */
.team-header {
    text-align: center;
    padding: 80px 50px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

.team-title {
    font-family: 'Arial', serif;
    font-size: 6rem;
    color: white;
    margin-bottom: 40px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.team-description {
    font-size: 1.3rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    color: white;
    background-color: #ee83a3;
    opacity: 0;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 团队成员区域（大）容器 - 添加不透明背景 */
.team-members-container {
    background-color: #F8F0E8;
    position: relative;
    width:70%;
    left: 15%;
    margin-bottom: 20vh;
    padding: 50px;
    border-radius: 15px;
}

.team-section-title {
    font-family: 'Arial', serif;
    color: #953e61;
    border-bottom: 2px solid #953e61;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 2rem;
}

.team-members-container-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 50px 100px;
    margin-bottom: 30px;
    margin: 20px;
}

.team-member-card {
    perspective: 1000px;
    height: 250px; /* 增加卡片高度 */
    cursor: pointer;
    pointer-events: auto; /* 确保卡片容器可以接收点击 */
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* 桌面端悬停翻转 */
.team-member-card:hover .team-card-inner {
    transform: rotateY(180deg);
}

/* 移动设备点击翻转 */
.team-card-inner.flipped {
    transform: rotateY(180deg);
}

/* 卡片正面样式 */
.team-card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    pointer-events: none; /* 防止拦截点击事件 */
}

.team-member-image {
    width: 40%;
    height: 100%;
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

.team-member-info {
    width: 60%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
}

.team-member-name {
    margin: 0;
    color: #953e61;
    font-size: 1.4rem; /* 增大名字字体 */
    font-weight: bold;
    margin-bottom: 10px;
    pointer-events: none;
}

.team-divider {
    height: 2px;
    background-color: #953e61;
    margin: 10px 0;
    width: 60px;
    pointer-events: none;
}

.team-member-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    pointer-events: none;
}

.team-role-tag {
    background-color: #953e61;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem; /* 增大标签字体 */
    white-space: nowrap;
    pointer-events: none;
}

/*卡片背面样式*/
.team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-color: #da7ea3;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    transform: rotateY(180deg);
    pointer-events: none; /* 防止拦截点击事件 */
}

.team-profile-image {
    width: 40%;
    height: 100%;
    background-color: #953e61;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
    pointer-events: none;
}

.team-profile-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 4px solid white;
    pointer-events: none;
}

.team-quote-section {
    width: 60%;
    height: 100%;
    padding: 25px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    pointer-events: none;
}

.team-quote {
    font-style: italic;
    font-size: 16px; /* 增大引用字体 */
    line-height: 1.6;
    margin-bottom: 15px;
    pointer-events: none;
}

.team-author {
    align-self: flex-end;
    font-weight: bold;
    font-size: 14px; /* 增大作者字体 */
    pointer-events: none;
}

.team-quote-decoration {
    position: absolute;
    font-size: 70px; /* 增大引号大小 */
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.team-quote-open {
    top: 15px;
    left: 15px;
}

.team-quote-close {
    bottom: 15px;
    right: 15px;
}

/* scroll-bar */

/* 设置滚动条的宽度和高度 */
::-webkit-scrollbar {
    width: 16px; /* 垂直滚动条的宽度 */
    height: 16px; /* 水平滚动条的高度 */
}

/* 滚动条轨道 */
::-webkit-scrollbar-track {
    background: #f1f1f1; /* 轨道背景色 */
    border-radius: 10px;
}

/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #c46481, #eacdcd); /* 滑块渐变色 */
    border-radius: 10px;
    border: 3px solid #f1f1f1; /* 边框与轨道背景色相同，形成间隔效果 */
}

/* 滚动条滑块悬停效果 */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ff6a00, #c2185b); /* 悬停时的渐变色 */
}

/* 滚动条角落 */
::-webkit-scrollbar-corner {
    background: #f1f1f1; /* 角落背景色 */
}

/* 移动设备适配 */
@media (max-width: 1200px) {
    .team-members-container {
        width: 85%;
        left: 7.5%;
        padding: 40px;
    }
    
    .team-members-container-inner {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .team-header {
        padding: 60px 20px;
        height: auto;
        min-height: 100vh;
    }
    
    .team-title {
        font-size: 3rem;
        margin-bottom: 30px;
    }
    
    .team-description {
        font-size: 1.1rem;
        padding: 20px;
    }
    
    .team-members-container {
        width: 95%;
        left: 2.5%;
        padding: 20px;
    }
    
    .team-members-container-inner {
        grid-template-columns: 1fr;
        gap: 30px;
        margin: 10px;
    }
    
    .team-member-card {
        height: 220px;
    }
    
    .team-section-title {
        font-size: 1.6rem;
    }
    
    .team-member-name {
        font-size: 1.2rem;
    }
    
    .team-role-tag {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    .team-quote {
        font-size: 14px;
    }
    
    .team-author {
        font-size: 12px;
    }
    
    .team-quote-decoration {
        font-size: 50px;
    }
    
    /* 移动设备上更明显的点击反馈 */
    .team-member-card {
        transition: transform 0.2s ease;
    }
    
    .team-member-card:active {
        transform: scale(0.98);
    }
}

@media (max-width: 480px) {
    .team-header {
        padding: 40px 15px;
    }
    
    .team-title {
        font-size: 2.5rem;
    }
    
    .team-description {
        font-size: 1rem;
        padding: 15px;
    }
    
    .team-members-container {
        padding: 15px;
    }
    
    .team-member-card {
        height: 200px;
    }
    
    .team-member-info {
        padding: 15px;
    }
    
    .team-member-name {
        font-size: 1.1rem;
    }
    
    .team-role-tag {
        font-size: 0.75rem;
    }
    
    .team-quote-section {
        padding: 15px;
    }
    
    .team-quote {
        font-size: 13px;
    }
}