/* === 全局控制 === */
/* 隐藏 body 默认滚动条，将滚动权交给 .snap-container */
body {
    overflow: hidden; 
}

/* === 导航栏修正 (关键部分) === */
.fixed-header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    /* 默认(浅色)背景：半透明白 + 高斯模糊 */
    /* background-color: rgba(255, 255, 255, 0.85); */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 深色模式导航栏背景 */
body.dark-mode .fixed-header-wrapper {
    background-color: rgba(24, 24, 27, 0.85);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* 注意：内部的 .container .navbar 样式直接继承自 index.css，无需重写 */


/* === 滚动捕捉容器 === */
.snap-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory; /* 强制捕捉 */
    scroll-behavior: smooth;
}

/* === 队员展示 Section === */
.member-section {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start; /* 滚动停止时对齐顶部 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* 关键：顶部留白，避免内容被固定导航栏遮挡 */
    padding-top: 80px; 
}

.member-content {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 左右两栏 */
    gap: 4rem;
    align-items: center;
    width: 100%;
}

/* 反向布局：让图片在右侧 (利用 Flex/Grid 的方向属性) */
.reverse-layout {
    direction: rtl; 
}
.reverse-layout > * {
    direction: ltr; /* 恢复内部文字方向 */
}

/* === 相册轮播 (Gallery) === */
.member-gallery {
    width: 100%;
    aspect-ratio: 4/3; /* 锁定 4:3 比例 */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    background-color: #f3f4f6;
    transition: box-shadow 0.3s ease;
}

.carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease;
    transform: scale(1.05);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

/* 轮播按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    backdrop-filter: blur(4px);
    z-index: 2;
    display: grid;
    place-items: center;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.prev { left: 15px; }
.next { right: 15px; }

/* 轮播指示点 */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* === 队员信息文本 === */
.member-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
/* === 新增：标签容器 === */
.badges-wrapper {
    display: flex;          /* 启用 Flex 布局 */
    flex-wrap: wrap;        /* 如果标签太多，允许自动换行 */
    gap: 0.8rem;            /* 标签之间的间距 */
    align-self: flex-start; /* 整体靠左对齐 */
    margin-bottom: 0.5rem;  /* 与下方名字保持一点距离 */
}
/* === 修改：原有标签样式微调 === */
.role-badge {
    /* 删掉原本的 align-self: flex-start; 因为现在由 wrapper 控制对齐了 */
    /* 其他样式保持不变 */
    display: inline-block;
    background: linear-gradient(90deg, #A855F7, #3B82F6);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    
    /* 可选：为了防止标签换行时挤在一起，加个行高控制 */
    line-height: 1.2;
}

.member-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
    margin-top: -0.5rem;
}

.member-title {
    font-size: 1.25rem;
    color: #6B7280;
    font-weight: 500;
    margin-top: -1rem;
}

.info-block h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-block p {
    color: #4B5563;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 技术栈标签 */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tech-stack span {
    background-color: #F3F4F6;
    color: #4B5563;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #E5E7EB;
}

/* === 深色模式适配 (Dark Mode) === */
body.dark-mode .member-gallery {
    background-color: #27272A;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .role-badge {
    background: #34D399; /* 绿色主题 */
    color: #18181B;
}

body.dark-mode .member-name {
    color: #F9FAFB;
}

body.dark-mode .member-title {
    color: #A0A0A0;
}

body.dark-mode .info-block h4 {
    color: #E5E7EB;
}

body.dark-mode .info-block p {
    color: #D1D5DB;
}

body.dark-mode .tech-stack span {
    background-color: #27272A;
    color: #D1D5DB;
    border-color: #3F3F46;
}

/* === 响应式设计 (Mobile) === */
@media (max-width: 992px) {
    .member-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .reverse-layout {
        direction: ltr; /* 移动端统一图片在上，不交错 */
    }

    .member-gallery {
        max-width: 500px;
        margin: 0 auto;
    }

    .member-info {
        align-items: center;
    }
    
    .tech-stack {
        justify-content: center;
    }
    
    .role-badge {
        align-self: center;
    }

    /* 移动端如果内容太长，允许滚动，不强制一页展示 */
    .snap-container {
        scroll-snap-type: y proximity; /* 放宽捕捉力度 */
    }

    .member-section {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 3rem 0;
    }
}

/* === 结尾页：艺术字样式 === */

/* 容器布局 */
.tbc-section {
    flex-direction: column; /* 垂直排列 */
    text-align: center;
}

.tbc-container {
    position: relative;
    padding: 2rem;
    /* 简单的入场动画 */
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* 艺术字主体 */
.artistic-text {
    font-size: clamp(3rem, 8vw, 6rem); /* 响应式字体大小 */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    line-height: 1.1;
    
    /* 浅色模式：紫蓝渐变 */
    background: linear-gradient(135deg, #A855F7 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    
    /* 投影增加层次感 */
    filter: drop-shadow(0 10px 20px rgba(59, 130, 246, 0.2));
    
    /* 呼吸动画 */
    animation: breathing 3s ease-in-out infinite;
}

/* 副标题 */
.tbc-sub {
    font-size: 1.2rem;
    color: #6B7280;
    margin-top: 1.5rem;
    letter-spacing: 0.3em;
    font-weight: 500;
}

/* 装饰线条 */
.tbc-line {
    width: 60px;
    height: 4px;
    background: #E5E7EB;
    margin: 2rem auto 0;
    border-radius: 2px;
}

/* === 动画定义 === */
@keyframes breathing {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 10px 20px rgba(59, 130, 246, 0.2));
    }
    50% {
        transform: scale(1.05); /* 放大 5% */
        filter: drop-shadow(0 15px 30px rgba(168, 85, 247, 0.4));
    }
}

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

/* === 深色模式适配 === */
body.dark-mode .artistic-text {
    /* 深色模式：荧光绿渐变 (呼应 Logo) */
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    
    /* 发光效果 */
    filter: drop-shadow(0 0 25px rgba(16, 185, 129, 0.4));
}

body.dark-mode .tbc-sub {
    color: #9CA3AF;
}

body.dark-mode .tbc-line {
    background: #3F3F46;
}

/* 调整深色模式下的呼吸动画颜色 */
body.dark-mode .artistic-text {
    animation-name: breathingDark;
}

@keyframes breathingDark {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 25px rgba(16, 185, 129, 0.4));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 40px rgba(52, 211, 153, 0.6));
    }
}