@import 'home-section1.css';

/* 将插画整体向左移动少许 */
.插画总容器 {
    transform: translateX(-2vw);
    position: relative;
    z-index: 10;
    height: 100vh;
    overflow: hidden;
    /* 禁止上下滑动 */
    overscroll-behavior: none;
    touch-action: pan-x;
    /* 只允许水平滑动 */
}

/* 仅在 members 页面 */
.members-page .插画总容器 {
    transform: translateX(-2px) translateY(10px);
    /* 向下移动插画避开菜单栏 */
    position: absolute;
    z-index: 10;
    float: none;
    display: block;
    height: 100vh;
    width: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

/* 确保 members-page 容器正确布局 */
.members-page {
    width: 100%;
    min-height: 100vh;
    /* 减少最小高度，减少留白 */
    overflow-x: hidden;
    overflow-y: hidden;
    /* 禁止垂直滚动 */
    position: relative;
    /* 禁止上下滑动 */
    overscroll-behavior: none;
    touch-action: pan-x;
    /* 只允许水平滑动 */
}

/* 人物信息弹窗样式 */
.character-popup {
    position: fixed;
    background: rgba(217, 193, 215, 0.9);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(139, 107, 157, 0.4);
    z-index: 1000;
    display: none;
    min-width: 280px;
    max-width: 350px;
    font-family: 'Gantari', 'Arial', sans-serif;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(217,
            193,
            215, 0.3);
    animation: popupFadeIn 0.3s ease-out;
}

.popup-content {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.popup-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #51385A;
    box-shadow: 0 0 15px rgba(139,
            107,
            157, 0.6), 0 4px 8px rgba(139, 107, 157, 0.3);
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #8B6B9D, #D9C1D7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.popup-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(178,
            145,
            190, 0.8), 0 6px 12px rgba(139, 107, 157, 0.4);
}

/* 当使用图片作为头像时的样式 */
.popup-avatar[style*="background-image"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* 为图片头像添加额外的视觉效果 */
.popup-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 107, 157, 0.15), rgba(178, 145, 190, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.popup-avatar:hover::before {
    opacity: 1;
}

/* 确保图片头像的边框效果 */
.popup-avatar[style*="background-image"] {
    border: 3px solid #8B6B9D;
    box-shadow: 0 0 15px rgba(139, 107, 157, 0.6),
        0 4px 8px rgba(139, 107, 157, 0.3),
        0 0 30px rgba(178, 145, 190, 0.2);
}

.popup-info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #8B6B9D;
    font-family: 'Gantari', 'Arial', sans-serif;
    line-height: 1.2;
}

.popup-role {
    margin: 0;
    font-size: 14px;
    color: #2C1810;
    font-weight: 600;
    font-family: 'Gantari', 'Arial', sans-serif;
    line-height: 1.3;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: inline-block;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popup-info {
    margin: 0;
    font-size: 12px;
    color: #2C1810;
    line-height: 1.4;
    font-family: 'Gantari', 'Arial', sans-serif;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .character-popup {
        min-width: 250px;
        max-width: 300px;
        padding: 15px;
    }

    .popup-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .popup-name {
        font-size: 16px;
    }

    .popup-role {
        font-size: 13px;
    }

    .popup-info {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .character-popup {
        min-width: 220px;
        max-width: 280px;
        padding: 12px;
    }

    .popup-content {
        gap: 12px;
    }

    .popup-avatar {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .popup-name {
        font-size: 15px;
    }

    .popup-role {
        font-size: 12px;
        padding: 3px 6px;
    }

    .popup-info {
        font-size: 10px;
    }
}

/* 人物悬浮效果 */
.character-hover {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

.character-hover:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(178, 145, 190, 0.6));
    z-index: 200;
}

/* 确保网页开发组人物可以交互，但只在悬浮时提高层级 */
.element-0001s-0000s-0000,
.element-0001s-0000s-0001,
.element-0001s-0000s-0002,
.element-0001s-0000s-0003 {
    pointer-events: auto;
    position: relative;
}

/* 网页开发组人物悬浮时提高层级 */
.element-0001s-0000s-0000:hover,
.element-0001s-0000s-0001:hover,
.element-0001s-0000s-0002:hover,
.element-0001s-0000s-0003:hover {
    z-index: 200 !important;
}

/* Meet Our Members 文字样式 */
.meet-members-text {
    position: fixed;
    bottom: 20vh;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
}


.meet-members-text h1 {
    font-family: 'Gantari', 'Arial', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
    opacity: 0;
    transform: scale(1);
    transition: none;
    letter-spacing: 2px;
    white-space: nowrap;
    overflow: hidden;
}

/* 滚动动画效果 - 现在完全由JavaScript控制 */
.meet-members-text h1 {
    transition: none;
    /* 移除过渡效果，让滚动更流畅 */
}

/* 成员卡片容器 */
.members-cards-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--background-light);
    padding: 40px 20px;
    opacity: 1;
    /* 直接显示 */
    transform: translateY(0);
    /* 无偏移 */
    margin-top: -50px;
    /* 进一步减少负边距，给标题更多空间 */
    z-index: 1;
    box-sizing: border-box;
}

.members-cards {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    padding: 20px;
}

/* 成员卡片样式 */
.member-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: cardFadeIn 0.6s ease forwards;
    aspect-ratio: 4/3;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    perspective: 1000px;
}

/* 卡片翻转容器 */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.member-card:hover .card-inner {
    transform: rotateY(180deg);
}

/* 卡片正面和背面 */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 20px 20px 0;
    /* 移除左侧内边距 */
    box-sizing: border-box;
}

.card-back {
    transform: rotateY(180deg);
    background: transparent;
    color: white;
    border-radius: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.card-back h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: white;
    font-weight: 600;
    text-align: center;
    flex-shrink: 0;
    font-family: 'Gantari', 'Arial', sans-serif;
    /* 添加Gantari字体 */
}

.card-back p {
    font-size: 1rem;
    line-height: 1.8;
    text-align: left;
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
    margin: 0;
    flex: 1;
    font-family: 'Gantari', 'Arial', sans-serif;
    /* 添加Gantari字体 */
}

.member-description {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.member-card:nth-child(1) {
    animation-delay: 0.1s;
}

.member-card:nth-child(2) {
    animation-delay: 0.2s;
}

.member-card:nth-child(3) {
    animation-delay: 0.3s;
}

.member-card:nth-child(4) {
    animation-delay: 0.4s;
}

.member-card:nth-child(5) {
    animation-delay: 0.5s;
}

.member-card:nth-child(6) {
    animation-delay: 0.6s;
}

.member-card:nth-child(7) {
    animation-delay: 0.7s;
}

.member-card:nth-child(8) {
    animation-delay: 0.8s;
}

.member-card:nth-child(9) {
    animation-delay: 0.9s;
}

.member-card:nth-child(10) {
    animation-delay: 1.0s;
}

.member-card:nth-child(11) {
    animation-delay: 1.1s;
}

.member-card:nth-child(12) {
    animation-delay: 1.2s;
}

.member-card:nth-child(13) {
    animation-delay: 1.3s;
}

.member-card:nth-child(14) {
    animation-delay: 1.4s;
}

.member-card:nth-child(15) {
    animation-delay: 1.5s;
}

.member-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 成员顶部容器 */
.member-top {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
    width: 100%;
    margin-top: 0;
    /* 移除顶部边距 */
    padding-left: 0;
    /* 移除左侧内边距 */
}

/* 成员照片 */
.member-photo {
    width: 250px;
    /* 增加宽度 */
    height: 100%;
    /* 高度与卡片相同 */
    overflow: hidden;
    position: relative;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
    margin: 0;
    transform: translateX(-20px) translateY(-45px);
    /* 进一步向上移动 */
}

.member-photo .photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}


/* 成员信息 */
.member-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-left: 5px;
    justify-content: flex-start;
    min-width: 0;
    text-align: left;
}

.member-name {
    font-family: 'Gantari', 'Arial', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 6px 0;
    text-align: left;
}

.member-position {
    font-family: 'Gantari', 'Arial', sans-serif;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin: 0 0 8px 0;
    text-align: left;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.member-motto {
    font-family: 'Gantari', 'Arial', sans-serif;
    font-style: italic;
    color: var(--primary-dark);
    margin: 0 0 10px 0;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 500;
}

.member-description {
    color: #5a6c7d;
    line-height: 1.5;
    margin: 15px 0 0 0;
    font-size: 0.85rem;
    text-align: left;
    flex: 1;
    font-family: 'Gantari', 'Arial', sans-serif;
    /* 添加Gantari字体 */
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .members-cards {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 25px;
    }

    .member-card {
        max-width: 400px;
    }

    /* 中等屏幕设备：调整新内容位置 */
    .new-content-wrapper {
        top: 280vh;
        padding: 0 15px;
    }

    .new-content-section {
        padding: 30px 15px;
        margin-left: 15px;
        margin-right: 15px;
        width: calc(100% - 30px);
    }
}

@media (max-width: 768px) {
    .members-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }

    .members-cards-container {
        padding: 40px 10px;
    }

    .member-card {
        max-width: 350px;
        padding: 15px;
        aspect-ratio: 3/2;
    }

    .member-photo {
        width: 200px;
        /* 增加宽度 */
        height: 100%;
        /* 高度与卡片相同 */
        margin: 0;
        transform: translateX(-15px) translateY(-40px);
        /* 中等屏幕进一步向上移动 */
    }

    .member-name {
        font-size: 1.2rem;
    }

    .member-position {
        font-size: 0.75rem;
    }

    .member-motto {
        font-size: 0.8rem;
    }

    .member-description {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .member-card {
        max-width: 280px;
        padding: 12px;
    }

    .member-photo {
        width: 150px;
        /* 增加宽度 */
        height: 100%;
        /* 高度与卡片相同 */
        margin: 0;
        transform: translateX(-10px) translateY(-35px);
        /* 小屏幕进一步向上移动 */
    }

    .member-name {
        font-size: 1.1rem;
    }

    .member-position {
        font-size: 0.7rem;
    }

    .member-motto {
        font-size: 0.75rem;
    }

    .member-description {
        font-size: 0.75rem;
    }

    /* 小屏幕设备：调整新内容位置 */
    .new-content-wrapper {
        top: 300vh;
        padding: 0 10px;
    }

    .new-content-section {
        padding: 20px 10px;
        margin-left: 10px;
        margin-right: 10px;
        width: calc(100% - 20px);
    }
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* 重叠图片样式 */
.overlapping-images-wrapper {
    padding: 80px 50px;
    margin-top: 10px;
    margin-bottom: 100px;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.overlapping-images-container {
    max-width: 1600px;
    width: 100%;
    position: relative;
}

.image-stack {
    position: relative;
    width: 100%;
    height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlapping-image {
    position: absolute;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, z-index 0.3s ease;
    max-width: 450px;
    max-height: 450px;
    object-fit: cover;
}

/* 相框样式 - 更大尺寸 */
.frame-image {
    z-index: 2;
    max-width: 800px;
    max-height: 800px;
    border-radius: 15px;
}

/* 合照样式 */
.photo-image {
    z-index: 1;
    max-width: 750px;
    max-height: 750px;
    transform: translateY(-20px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .members-cards-container {
        margin-top: 20px;
        /* 在移动设备上进一步减少成员卡片容器的上方间距 */
    }

    .overlapping-images-wrapper {
        padding: 60px 25px;
        margin-top: 5px;
        /* 在移动设备上减少图片区域的上方间距 */
        margin-bottom: 60px;
        min-height: 700px;
    }

    .image-stack {
        height: 700px;
    }

    .overlapping-image {
        max-width: 350px;
        max-height: 350px;
    }

    .frame-image {
        max-width: 550px;
        max-height: 550px;
    }

    .photo-image {
        max-width: 500px;
        max-height: 500px;
    }
}