:root {
    --bg-color: #151912;
    --text-color: #f0f0f0;
    --accent-color: #64ffda;
    --font-title: 'Playfair Display', serif;
    --font-main: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --accent-color-rgb: 100, 255, 218;
    
    /* 新增基础尺寸变量 */
    --base-unit: calc(100vw / 2560); /* 基于2560px的1单位 */
    --content-max-width: min(90vw, calc(1200 * var(--base-unit)));
    --section-padding: min(8vh, calc(128 * var(--base-unit)));
    --component-spacing: min(4vh, calc(64 * var(--base-unit)));
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100%;
    overflow-y: scroll;
    visibility: hidden; /* 初始隐藏页面内容 */
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.95;
}

.neural-portrait {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.neural-portrait img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(19.53vw, calc(500 * var(--base-unit)));
    height: min(19.53vw, calc(500 * var(--base-unit)));
    object-fit: cover;
    filter: contrast(1.2) grayscale(0.3) brightness(1.2);
}

.neural-portrait.visible {
    opacity: 0.3;
}

.content {
    position: relative;
    z-index: 1;
}

.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.name-container {
    position: relative;
    text-align: center;
}

.glitch-text {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    margin: 0;
    position: relative;
    color: var(--text-color);
    text-shadow: min(0.078vw, calc(2 * var(--base-unit))) 0 var(--text-color); /* 白色文字偏移到右侧 */
    z-index: 2;
}

.glitch-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: min(0.078vw, calc(2 * var(--base-unit)));
    width: 100%;
    height: 100%;
    text-shadow: min(-0.078vw, calc(-2 * var(--base-unit))) 0 var(--accent-color);
    clip: rect(0,
             min(29.3vw, calc(750 * var(--base-unit))), 
             min(4.17vh, calc(60 * var(--base-unit))), 
             0);
    animation: glitch-anim 8.5s infinite linear alternate-reverse;
}

.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: min(-0.078vw, calc(-2 * var(--base-unit)));
    width: 100%;
    height: 100%;
    text-shadow: min(-0.078vw, calc(-2 * var(--base-unit))) 0 #ff00ff;
    clip: rect(min(11.11vh, calc(160 * var(--base-unit))), 
             min(29.3vw, calc(750 * var(--base-unit))), 
             min(15.28vh, calc(220 * var(--base-unit))), 
             0);
    animation: glitch-anim-2 7.3s infinite linear alternate-reverse;
}

.title {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-top: 0.5rem;
    opacity: 1.0;
    position: relative;
    z-index: 2;
}

.section-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--section-padding) min(2vw, calc(32 * var(--base-unit)));
    background: rgba(21, 25, 18, 0.7);
    backdrop-filter: blur(10px);
    border-radius: min(0.31vw, calc(8 * var(--base-unit)));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.work-section {
    min-height: 100vh;
    padding: min(2.8vh, calc(64 * var(--base-unit))) 0;
    width: 100%;
    scroll-margin-top: min(6.94vh, calc(100 * var(--base-unit)));
    padding-top: min(1.39vh, calc(32 * var(--base-unit)));
}

.work-grid {
    display: flex;
    justify-content: center;
    gap: min(5.56vh, calc(128 * var(--base-unit))); /* 增加间距到128px at 2560px */
    padding: min(1.74vh, calc(40 * var(--base-unit)));
    max-width: min(62.5vw, calc(1600 * var(--base-unit))); /* 增加容器宽度到1600px */
    margin: 0 auto;
}

.work-item {
    position: relative;
    width: 46%;
    aspect-ratio: 0.75;
    min-height: min(38.19vh, calc(550 * var(--base-unit))); /* 设置最小高度为550px */
    max-height: min(48.61vh, calc(700 * var(--base-unit))); /* 设置最大高度为700px */
    border-radius: min(0.7vw, calc(18 * var(--base-unit)));
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    transition: all 0.3s ease;
    z-index: 1;
}

.work-image-container {
    display: none;
}

.work-item:hover {
    transform: none;
}

.work-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: min(1.5vh, calc(24 * var(--base-unit))); /* 调整内边距为相对单位 */
    background: rgba(21, 25, 18, 0.98);
    backdrop-filter: blur(15px);
    transform: translateY(101%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    border-bottom-left-radius: min(0.7vw, calc(18 * var(--base-unit)));
    border-bottom-right-radius: min(0.7vw, calc(18 * var(--base-unit)));
    margin-bottom: -1px;
    box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.2);
}

.work-item:hover .work-content {
    transform: translateY(0);
}

.work-item:hover .work-image {
    opacity: 1;
}

.work-content h3 {
    font-size: min(1.8vw, calc(28 * var(--base-unit)));
    margin-bottom: min(1vh, calc(16 * var(--base-unit)));
    color: var(--text-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.work-content p {
    font-size: min(1.1vw, calc(18 * var(--base-unit)));
    margin-bottom: min(1.2vh, calc(20 * var(--base-unit)));
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.view-project {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: rgba(230, 64, 128, 0.2);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 9px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.view-project:hover {
    background: rgba(230, 64, 128, 0.4);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.social-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-mono);
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

@keyframes glitch-anim {
    0% {
        clip: rect(0,
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(4.17vh, calc(60 * var(--base-unit))), 
                 0);
    }
    20% {
        clip: rect(min(11.11vh, calc(160 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(15.28vh, calc(220 * var(--base-unit))), 
                 0);
    }
    40% {
        clip: rect(min(6.94vh, calc(100 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(9.72vh, calc(140 * var(--base-unit))), 
                 0);
    }
    60% {
        clip: rect(min(13.89vh, calc(200 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(17.36vh, calc(250 * var(--base-unit))), 
                 0);
    }
    80% {
        clip: rect(min(8.33vh, calc(120 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(11.81vh, calc(170 * var(--base-unit))), 
                 0);
    }
    100% {
        clip: rect(min(15.28vh, calc(220 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(17.36vh, calc(250 * var(--base-unit))), 
                 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(min(13.89vh, calc(200 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(16.67vh, calc(240 * var(--base-unit))), 
                 0);
    }
    20% {
        clip: rect(0, 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(4.17vh, calc(60 * var(--base-unit))), 
                 0);
    }
    40% {
        clip: rect(min(11.11vh, calc(160 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(13.89vh, calc(200 * var(--base-unit))), 
                 0);
    }
    60% {
        clip: rect(min(6.94vh, calc(100 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(10.42vh, calc(150 * var(--base-unit))), 
                 0);
    }
    80% {
        clip: rect(min(15.28vh, calc(220 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(17.36vh, calc(250 * var(--base-unit))), 
                 0);
    }
    100% {
        clip: rect(min(8.33vh, calc(120 * var(--base-unit))), 
                 min(83.33vw, calc(1200 * var(--base-unit))), 
                 min(11.11vh, calc(160 * var(--base-unit))), 
                 0);
    }
}

@keyframes message-pop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 基础重置 */
*, *::after, *::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

/* 更新宠物样式 */
.pixel-pet {
    position: fixed;
    z-index: 1000;
    bottom: 0;
    right: 2rem;
    transform-origin: bottom right;
    cursor: pointer;
    transform: scale(0.5);
    opacity: 0.2; /* 初始状态设置为半透明 */
    transition: opacity 0.5s ease; /* 添加过渡效果 */
    transform-style: preserve-3d; /* 优化3D变换 */
    backface-visibility: hidden; /* 优化性能 */
}

/* 悬停时显示 */
.pixel-pet:hover {
    opacity: 1;
}

/* 添加发光效果 */
.pixel-pet:hover .dog {
    filter: drop-shadow(0 0 8px rgba(255, 129, 71, 0.3));
    transition: filter 0.5s ease;
}

/* 添加新的狗狗样式 */
.dog {
    position: relative;
    width: min(22.5vw, calc(576 * var(--base-unit)));
    height: min(8.25vh, calc(118.8 * var(--base-unit)));
}

.dog::before {
    content: '';
    position: absolute;
    bottom: min(-0.75vh, calc(-10.8 * var(--base-unit)));
    right: min(-0.15vw, calc(-3.84 * var(--base-unit)));
    width: 100%;
    height: min(1.5vh, calc(21.6 * var(--base-unit)));
    background-color: rgba(28, 49, 48, 0.1);
    border-radius: 50%;
    z-index: -1000;
    animation: shadow 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
}

/* 更新对话框样式 - 完全重写 */
.pet-chatbox {
    position: fixed;
    bottom: 250px;
    right: 20px;
    width: 600px;
    height: 750px;
    background: #181c25;
    border-radius: 24px;
    border: 2px solid rgba(108, 92, 231, 0.5);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    padding: 30px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    
    /* 强制使用高质量渲染 */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 聊天框悬停状态 */
.pet-chatbox:hover {
    background: #181c25;
    box-shadow: 0 15px 45px rgba(108, 92, 231, 0.2);
}

/* 隐藏状态 */
.pet-chatbox.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* 聊天内容区域 */
.chat-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #1e232d;
    border-radius: 18px;
    border: 1px solid rgba(108, 92, 231, 0.3);
    
    /* 优化滚动性能 */
    -webkit-overflow-scrolling: touch;
}

/* 聊天消息样式 - 调整为适中字体 */
.chat-message {
    position: relative;
    padding: 20px 25px;
    color: #FFFFFF;
    font-size: 30px !important;
    line-height: 1.5;
    max-width: 80%;
    margin-bottom: 15px;
    
    /* 使用更平滑的动画 */
    animation: message-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* 优化文本渲染 */
    letter-spacing: 0.01em;
    font-weight: 400;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: geometricPrecision !important;
    
    /* 防止子像素渲染问题 */
    transform: translateZ(0);
    will-change: transform;
}

/* 用户消息 */
.chat-message.user-message {
    align-self: flex-end;
    background: #6C5CE7;
    border-radius: 24px 24px 0 24px;
    margin-left: 90px;
    box-shadow: 0 4px 15px rgba(76, 70, 194, 0.3);
    border: 1px solid #7d70e7;
}

/* 宠物消息 */
.chat-message.pet-message {
    align-self: flex-start;
    background: #2d3436;
    border-radius: 24px 24px 24px 0;
    margin-right: 90px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #3d4446;
}

/* 输入框 */
.chat-input {
    width: 100%;
    padding: 20px 25px;
    background: #2d3436;
    color: #FFFFFF;
    font-size: 30px !important;
    border: 2px solid rgba(108, 92, 231, 0.5);
    border-radius: 18px;
    outline: none;
    
    /* 优化渲染 */
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: geometricPrecision !important;
    
    /* 防止状态变化导致的渲染问题 */
    transition: border-color 0.3s ease, background-color 0.3s ease;
    transform: translateZ(0);
}

/* 输入框焦点状态 */
.chat-input:focus {
    border-color: #6C5CE7;
    background: #353b3d;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.3);
}

/* 滚动条样式 */
.chat-content::-webkit-scrollbar {
    width: 12px;
}

.chat-content::-webkit-scrollbar-track {
    background: #1e232d;
    border-radius: 6px;
}

.chat-content::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.5);
    border-radius: 6px;
}

.chat-content::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 92, 231, 0.8);
}

/* 消息弹出动画 */
@keyframes message-pop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 媒体查询 */
@media (max-width: 768px) {
    .pixel-pet {
        transform: scale(0.5);
    }
    
    .pet-chatbox {
        width: 525px;
        height: 675px;
        right: 20px;
        bottom: 100px;
    }
    
    .chat-message {
        font-size: 28px !important;
        padding: 18px 22px;
    }
    
    .chat-input {
        font-size: 28px !important;
        padding: 18px 22px;
    }
}

@media (max-width: 480px) {
    .pixel-pet {
        transform: scale(0.3);
        bottom: 1;
        right: 1rem;
    }
    
    .pet-chatbox {
        bottom: 120px;
        right: 10px;
        padding: 22px;
        width: 450px;
        height: 600px;
    }
    
    .chat-message {
        font-size: 24px !important;
        padding: 15px 18px;
    }
    
    .chat-input {
        font-size: 24px !important;
        padding: 15px 18px;
    }
}

/* 添加拖拽时的样式 */
.pixel-pet.dragging .dog {
    animation: none;
}

.pixel-pet.dragging .dog__tail {
    animation: tail-wag 0.5s infinite;
}

@keyframes tail-wag {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(20deg); }
}

/* 添加所有动画关键帧 */
@keyframes head {
    0%, 10%, 20%, 26%, 28%, 90%, 100% {
        height: 8.25vmax;
        bottom: 0;
        transform-origin: bottom right;
        transform: rotateZ(0);
    }
    /* ... 其他关键帧 ... */
}

/* 添加其他动画关键帧... */

/* 狗狗的基础结构样式 */
.leg {
    position: absolute;
    bottom: 0;
    width: 3vmax;
    height: 4.125vmax;
}

.paw {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3.75vmax;
    height: 1.875vmax;
    overflow: hidden;
}

.paw::before {
    content: '';
    position: absolute;
    width: 3.75vmax;
    height: 3.75vmax;
    border-radius: 50%;
}

.top {
    position: absolute;
    bottom: 0;
    left: 0.75vmax;
    height: 4.5vmax;
    width: 2.625vmax;
    border-top-left-radius: 1.425vmax;
    border-top-right-radius: 1.425vmax;
    transform-origin: bottom right;
    transform: rotateZ(90deg) translateX(-0.1vmax) translateY(1.5vmax);
    z-index: -1;
    background-image: linear-gradient(70deg, transparent 20%, #ff8b56 20%);
}

/* 狗狗的头部样式 */
.dog__head {
    position: absolute;
    left: 1.5vmax;
    bottom: 0;
    width: 9.75vmax;
    height: 8.25vmax;
    border-top-left-radius: 4.05vmax;
    border-top-right-radius: 4.05vmax;
    border-bottom-right-radius: 3.3vmax;
    border-bottom-left-radius: 3.3vmax;
    background-color: #FF8147;
    animation: head 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
}

.dog__head-c {
    position: absolute;
    left: 1.5vmax;
    bottom: 0;
    width: 9.75vmax;
    height: 8.25vmax;
    animation: head 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
    z-index: -1;
}

.dog__snout {
    position: absolute;
    left: -1.5vmax;
    bottom: 0;
    width: 7.5vmax;
    height: 3.75vmax;
    border-top-right-radius: 3vmax;
    border-bottom-right-radius: 3vmax;
    border-bottom-left-radius: 4.5vmax;
    background-color: #D7DBD2;
    animation: snout 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
}

.dog__snout::before {
    content: '';
    position: absolute;
    left: -0.1125vmax;
    top: -0.15vmax;
    width: 1.875vmax;
    height: 1.125vmax;
    border-top-right-radius: 3vmax;
    border-bottom-right-radius: 3vmax;
    border-bottom-left-radius: 4.5vmax;
    background-color: #1C3130;
    animation: snout-b 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
}

.dog__nose {
    position: absolute;
    top: -1.95vmax;
    left: 40%;
    width: 0.75vmax;
    height: 2.4vmax;
    border-radius: 0.525vmax;
    transform-origin: bottom;
    transform: rotateZ(10deg);
    background-color: #D7DBD2;
}

/* 狗狗的眼睛样式 */
.dog__eye-l, .dog__eye-r {
    position: absolute;
    top: -0.9vmax;
    width: 0.675vmax;
    height: 0.375vmax;
    border-radius: 50%;
    background-color: #1C3130;
    animation: eye 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
}

.dog__eye-l {
    left: 27%;
}

.dog__eye-r {
    left: 65%;
}

/* 狗狗的耳朵样式 */
.dog__ear-l, .dog__ear-r {
    position: absolute;
    width: 10.5vmax;
    height: 3.375vmax;
    border-top-left-radius: 0vmax;
    border-top-right-radius: 0vmax;
    border-bottom-right-radius: 3.3vmax;
    border-bottom-left-radius: 3.3vmax;
    background-color: #E26538;
}

.dog__ear-l {
    top: 1.5vmax;
    left: 6vmax;
    transform-origin: bottom left;
    transform: rotateZ(-50deg);
    z-index: -1;
    animation: ear-l 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
}

.dog__ear-r {
    top: 1.5vmax;
    right: 3vmax;
    transform-origin: bottom right;
    transform: rotateZ(20deg);
    z-index: -2;
    animation: ear-r 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
}

/* 狗狗的身体样式 */
.dog__body {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: absolute;
    bottom: 0.3vmax;
    left: 3.75vmax;
    width: 18.75vmax;
    height: 7.2vmax;
    border-top-left-radius: 3vmax;
    border-top-right-radius: 6vmax;
    border-bottom-right-radius: 1.5vmax;
    border-bottom-left-radius: 6vmax;
    background-color: #ff702e;
    z-index: -2;
    animation: body 10s cubic-bezier(0.3, 0.41, 0.18, 1.01) infinite;
}

/* 狗狗的尾巴样式 */
.dog__tail {
    position: absolute;
    right: -3vmax;
    height: 1.5vmax;
    width: 4.5vmax;
    background-color: #E96839;
    border-radius: 1.5vmax;
}

/* 狗狗的爪子样式 */
.dog__paws {
    position: absolute;
    bottom: 0;
    left: 7.5vmax;
    width: 12vmax;
    height: 3vmax;
}

.dog__bl-leg {
    left: -3vmax;
    z-index: -10;
}

.dog__bl-paw::before {
    background-color: #bec4b6;
}

.dog__bl-top {
    background-image: linear-gradient(80deg, transparent 20%, #E96839 20%);
}

.dog__fl-leg {
    z-index: 10;
    left: 0;
}

.dog__fl-paw::before {
    background-color: #D7DBD2;
}

.dog__fr-leg {
    right: 0;
}

.dog__fr-paw::before {
    background-color: #D7DBD2;
}

/* 动画关键帧 */
@keyframes head {
    0%, 10%, 20%, 26%, 28%, 90%, 100% {
        height: 8.25vmax;
        bottom: 0;
        transform-origin: bottom right;
        transform: rotateZ(0);
    }
    5%, 15%, 22%, 24%, 30% {
        height: 8.1vmax;
    }
    32%, 50% {
        height: 8.25vmax;
    }
    55%, 60% {
        bottom: 0.75vmax;
        transform-origin: bottom right;
        transform: rotateZ(0);
    }
    70%, 80% {
        bottom: 0.75vmax;
        transform-origin: bottom right;
        transform: rotateZ(10deg);
    }
}

@keyframes body {
    0%, 10%, 20%, 26%, 28%, 32%, 100% {
        height: 7.2vmax;
    }
    5%, 15%, 22%, 24%, 30% {
        height: 7.05vmax;
    }
}

@keyframes ear-l {
    0%, 10%, 20%, 26%, 28%, 82%, 100% {
        transform: rotateZ(-50deg);
    }
    5%, 15%, 22%, 24% {
        transform: rotateZ(-48deg);
    }
    30%, 31% {
        transform: rotateZ(-30deg);
    }
    32%, 80% {
        transform: rotateZ(-60deg);
    }
}

@keyframes ear-r {
    0%, 10%, 20%, 26%, 28% {
        transform: rotateZ(20deg);
    }
    5%, 15%, 22%, 24% {
        transform: rotateZ(18deg);
    }
    30%, 31% {
        transform: rotateZ(10deg);
    }
    32% {
        transform: rotateZ(25deg);
    }
}

@keyframes snout {
    0%, 10%, 20%, 26%, 28%, 82%, 100% {
        height: 3.75vmax;
    }
    5%, 15%, 22%, 24% {
        height: 3.45vmax;
    }
}

@keyframes snout-b {
    0%, 10%, 20%, 26%, 28%, 98%, 100% {
        width: 1.875vmax;
    }
    5%, 15%, 22%, 24% {
        width: 1.8vmax;
    }
    34%, 98% {
        width: 1.275vmax;
    }
}

@keyframes shadow {
    0%, 10%, 20%, 26%, 28%, 30%, 84%, 100% {
        width: 99%;
    }
    5%, 15%, 22%, 24% {
        width: 101%;
    }
    34%, 81% {
        width: 96%;
    }
}

@keyframes eye {
    0%, 30% {
        width: 0.675vmax;
        height: 0.3vmax;
    }
    32%, 59%, 90%, 100% {
        width: 0.525vmax;
        height: 0.525vmax;
        transform: translateY(0);
    }
    60%, 75% {
        transform: translateY(-0.3vmax);
    }
    80%, 85% {
        transform: translateY(0.15vmax);
    }
}

/* 添加可爱元素 */
.dog__head::after {
    content: '';
    position: absolute;
    width: 1.5vmax;
    height: 0.2vmax;
    background-color: rgba(255,182,193,0.4);
    border-radius: 50%;
    bottom: 1.5vmax;
    left: 1vmax;
    box-shadow: 7vmax 0 rgba(255,182,193,0.4);
}

.dog__eye-l::after, .dog__eye-r::after {
    content: '';
    position: absolute;
    width: 0.3vmax;
    height: 0.1vmax;
    background-color: white;
    border-radius: 50%;
    top: 20%;
    left: 20%;
}

/* 添加动画 */
@keyframes float {
    0%, 100% { transform: scale(0.5) translateY(0); }
    50% { transform: scale(0.5) translateY(-10px); }
}

.heart {
    position: absolute;
    font-size: 20px;
    pointer-events: none;
    animation: float-heart 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 1000;
    will-change: transform, opacity; /* 优化性能 */
    transform: translateZ(0); /* 启用GPU加速 */
}

@keyframes float-heart {
    0% { 
        transform: translate3d(0, 20px, 0) scale(0.5); 
        opacity: 0; 
    }
    50% {
        opacity: 1;
    }
    100% { 
        transform: translate3d(0, -40px, 0) scale(1); 
        opacity: 0; 
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .pixel-pet {
        transform: scale(0.5);
    }
    
    .pet-chatbox {
        width: 525px; /* 350px * 1.5 */
        height: 675px; /* 450px * 1.5 */
        right: 20px;
        bottom: 100px;
    }
    
    .chat-message {
        font-size: 24px; /* 16px * 1.5 */
        padding: 22px 30px; /* 15px * 1.5, 20px * 1.5 */
    }
    
    .chat-input {
        font-size: 24px; /* 16px * 1.5 */
        padding: 22px 30px; /* 15px * 1.5, 20px * 1.5 */
    }
}

@media (max-width: 480px) {
    .pixel-pet {
        transform: scale(0.3);
        bottom: 1;
        right: 1rem;
    }
    
    .pet-chatbox {
        bottom: 120px;
        right: 10px;
        padding: 22px; /* 15px * 1.5 */
        width: 450px; /* 300px * 1.5 */
        height: 600px; /* 400px * 1.5 */
    }
    
    .chat-message {
        font-size: 21px; /* 14px * 1.5 */
        padding: 18px 22px; /* 12px * 1.5, 15px * 1.5 */
    }
    
    .chat-input {
        font-size: 21px; /* 14px * 1.5 */
        padding: 18px 22px; /* 12px * 1.5, 15px * 1.5 */
    }
}

/* 优化响应式设计 */
@media (max-width: 768px) {
    .dog-container::before,
    .dog-container::after {
        display: none;
    }
}

/* 更新导航样式 */
.side-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-content {
    position: relative;
    background: transparent;
    padding: 6rem 0;
    height: 100vh;
    width: 300px;
    overflow: hidden;
}

.nav-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 25, 18, 0.85);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-nav.active .nav-content::before {
    transform: translateX(0);
}

/* 导航链接样式 */
.nav-content ul {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1;
}

.nav-link {
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-family: var(--font-title);
    padding: 1rem 3rem;
    display: block;
    transition: all 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
}

.side-nav.active .nav-link {
    transform: translateX(0);
    opacity: 1;
}

.side-nav.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
.side-nav.active .nav-link:nth-child(2) { transition-delay: 0.2s; }
.side-nav.active .nav-link:nth-child(3) { transition-delay: 0.3s; }
.side-nav.active .nav-link:nth-child(4) { transition-delay: 0.4s; }

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 2rem;
    height: 1px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: scaleX(1);
}

/* 汉堡菜单样式 */
.nav-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.nav-toggle:hover {
    transform: scale(1.1);
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; }
.nav-toggle span:nth-child(3) { top: 100%; }

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* 页面过渡效果 */
.section-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--accent-color);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.section-transition.active {
    transform: scaleY(1);
}

/* 更新标题样式 */
h1, h2, h3 {
    font-family: var(--font-title);
}

/* 全屏作品展示样式 */
.work-item.full-screen {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.work-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 0.5s ease;
}

.work-item:hover .work-image {
    transform: scale(1.05);
}

.work-content {
    position: relative;
    z-index: 1;
    padding: 4rem;
    color: var(--text-color);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.work-item:hover .work-content {
    opacity: 1;
    transform: translateY(0);
}

/* 滚动样式变化 */
.scrolled {
    background: rgba(21, 25, 18, 0.95);
    backdrop-filter: blur(10px);
}

/* 动画类 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 导航基础样式 */
nav {
    position: fixed;
    top: var(--border-width, 0.75rem);
    left: var(--border-width, 0.75rem);
    z-index: 1000;
    background: rgba(21, 25, 18, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(8px);
    padding: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    text-align: center;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    min-width: 480px;
}

nav li {
    flex: 1;
    position: relative;
    min-width: 160px;
}

nav li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

nav a {
    display: block;
    padding: 1rem 2rem;
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .875rem;
    font-family: var(--font-title);
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

/* 更新导航链接背景色 */
.link-bio {
    background: rgba(32, 80, 255, 0.15);
    border-radius: 16px;
}

.link-projects {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
}

.link-find-me {
    background: rgba(230, 64, 128, 0.15);
    border-radius: 16px;
}

/* 悬停效果 */
nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 16px;
}

.link-bio:hover {
    color: rgba(32, 80, 255, 1);
    background: rgba(32, 80, 255, 0.2);
}

.link-projects:hover {
    color: #fdc97c; /* 淡黄色 */
    background: rgba(255, 255, 255, 0.2);
}

.link-find-me:hover {
    color: rgba(230, 64, 128, 1);
    background: rgba(230, 64, 128, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    nav {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 0.3rem;
    }
    
    nav ul {
        min-width: unset;
    }
    
    nav li {
        flex: 1;
        min-width: unset;
    }
    
    nav a {
        font-size: 0.75rem;
        padding: 0.75rem 1rem;
    }
    
    nav li:not(:last-child)::after {
        display: none;
    }
}

/* 添加动画效果 */
nav a {
    animation: navItemFade 0.5s ease forwards;
    opacity: 0;
    transform: translateY(-10px);
}

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

nav a:nth-child(1) { animation-delay: 0.1s; }
nav a:nth-child(2) { animation-delay: 0.2s; }
nav a:nth-child(3) { animation-delay: 0.3s; }

/* About 部分样式 */
.about-section {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.about-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 300px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

/* 角落展开效果 */
.about-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    border-bottom: 100px solid rgba(255, 255, 255, 0.1);  /* 恢复原始颜色 */
    border-left: 100px solid transparent;
    height: 0;
    opacity: 0.95;
    transition: all 0.5s ease-out;
    width: 0;
}

.about-content:hover .about-overlay {
    border-bottom: 600px solid rgba(255, 255, 255, 0.1);  /* 恢复原始颜色 */
    border-left: 600px solid transparent;
    transition: all 0.5s ease-out;
}

/* 标题样式 */
.about-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 300;
    color: var(--accent-color);
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 2;
    opacity: 1;  /* 初始状态完全显示 */
    transition: all 0.5s ease-out;
}

/* About 悬停效果 */
.about-content:hover .about-title {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);  /* 保持居中的同时添加缩小效果 */
    transition: all 0.3s ease-out;
}

/* 展开内容 */
.about-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    color: var(--text-color);
    opacity: 0;
    transition: opacity 0.2s ease-out;  /* 快速消失 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-content:hover .about-text {
    opacity: 1;
    transition: opacity 0.3s ease-out 0.2s;  /* 延迟显示 */
}

/* 移除悬停时的过渡效果 */
.about-content:not(:hover) .about-text {
    transition: opacity 0.2s ease-out;  /* 快速消失 */
}

.about-content:not(:hover) .about-title {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: all 0.5s ease-out 0.15s;  /* 延迟显示 */
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--text-color);  /* 恢复原始颜色 */
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.6;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.about-content:hover .about-text h2 {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.4s;
}

.about-content:hover .about-text p {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.5s;
}

/* 移除悬停时的过渡效果 */
.about-content:not(:hover) .about-text h2,
.about-content:not(:hover) .about-text p {
    transition: all 0.2s ease-out;
}

/* 作品展示部分样式 */
.work-section {
    min-height: 100vh;
    padding: min(2.8vh, calc(64 * var(--base-unit))) 0;
    width: 100%;
    scroll-margin-top: min(6.94vh, calc(100 * var(--base-unit)));
    padding-top: min(1.39vh, calc(32 * var(--base-unit)));
}

.work-grid {
    display: flex;
    justify-content: center;
    gap: min(6.00vh, calc(128 * var(--base-unit))); /* 增加间距到128px at 2560px */
    padding: min(1.74vh, calc(40 * var(--base-unit)));
    max-width: min(57.125vw, calc(1600 * var(--base-unit))); /* 增加容器宽度到1600px */
    margin: 0 auto;
}

.work-item {
    position: relative;
    width: 46%;
    aspect-ratio: 0.75;
    min-height: min(38.19vh, calc(550 * var(--base-unit))); /* 设置最小高度为550px */
    max-height: min(48.61vh, calc(700 * var(--base-unit))); /* 设置最大高度为700px */
    border-radius: min(0.7vw, calc(18 * var(--base-unit)));
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    transition: all 0.3s ease;
    z-index: 1;
}

.work-image-container {
    display: none;
}

.work-item:hover {
    transform: none;
}

.work-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: min(1.5vh, calc(24 * var(--base-unit))); /* 调整内边距为相对单位 */
    background: rgba(21, 25, 18, 0.98);
    backdrop-filter: blur(15px);
    transform: translateY(101%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    border-bottom-left-radius: min(0.7vw, calc(18 * var(--base-unit)));
    border-bottom-right-radius: min(0.7vw, calc(18 * var(--base-unit)));
    margin-bottom: -1px;
    box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.2);
}

.work-item:hover .work-content {
    transform: translateY(0);
}

.work-item:hover .work-image {
    opacity: 1;
}

.work-content h3 {
    font-size: min(1.8vw, calc(28 * var(--base-unit)));
    margin-bottom: min(1vh, calc(16 * var(--base-unit)));
    color: var(--text-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.work-content p {
    font-size: min(1.1vw, calc(18 * var(--base-unit)));
    margin-bottom: min(1.2vh, calc(20 * var(--base-unit)));
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.view-project {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: rgba(230, 64, 128, 0.2);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 9px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.view-project:hover {
    background: rgba(230, 64, 128, 0.4);
    transform: translateY(-2px);
}

/* Contact 部分样式 */
.contact-section {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.connect-container {
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
}

.connect-title {
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
    font-family: var(--font-title);
    position: relative;
    line-height: 1;
    text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.15),
                 1px -1px 0 rgba(255, 255, 255, 0.15),
                 -1px 1px 0 rgba(255, 255, 255, 0.15),
                 1px 1px 0 rgba(255, 255, 255, 0.15);
}

/* 字母容器样式优化 */
.letter {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 1.2em;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 0.05em;
}

/* 中心字母样式 */
.center-text {
    position: relative;
    text-shadow: inherit;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 展开文本基础样式 */
.left-text, .right-text {
    position: absolute;
    bottom: 0.3em;
    opacity: 0;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-style: italic;
    font-size: 0.3em;
    font-weight: 500;
    letter-spacing: 0.03em;
    transform-origin: bottom center;
    filter: blur(5px);
}

.left-text {
    right: 100%;
    transform: translateX(0.5em);
    padding-right: 0.1em;
}

.right-text {
    left: 100%;
    transform: translateX(-0.5em);
    padding-left: 0.1em;
}

/* 为每个字母设置特定颜色 */
.c-letter .left-text,
.c-letter .right-text {
    color: #64ffda;  /* WeChat保持原色 */
}

.n-letter .left-text,
.n-letter .right-text {
    color: #0A66C2;  /* LinkedIn蓝色 */
}

.e-letter .right-text {
    color: #FFD700;  /* Email金黄色 */
}

.t-letter .left-text,
.t-letter .right-text {
    color: #24292E;  /* GitHub深灰色 */
}

/* 悬停效果 */
.letter:hover {
    z-index: 2;
}

.letter:hover .center-text {
    transform: scale(1.1);
}

.letter:hover .left-text,
.letter:hover .right-text {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

/* 字母颜色和展开文本颜色 */
.c-letter { 
    --text-color: #64ffda;
}

.n-letter { 
    --text-color: #0A66C2;
}

.e-letter { 
    --text-color: #FFD700;
}

.t-letter { 
    --text-color: #24292E;
}

/* 应用颜色到展开文本 */
.letter .left-text,
.letter .right-text {
    color: var(--text-color);
}

/* 悬停时的发光效果 */
.letter:hover {
    color: var(--text-color);
    text-shadow: 
        0 0 20px var(--text-color),
        0 0 40px var(--text-color);
}

.letter:hover .left-text,
.letter:hover .right-text {
    text-shadow: 0 0 10px var(--text-color);
}

/* 渐隐效果 */
.letter:hover ~ .letter {
    opacity: 0.08;
    transform: translateX(0.4em) scale(0.95);
    filter: blur(2px);
}

.letter:hover ~ .letter ~ .letter {
    opacity: 0.05;
    transform: translateX(0.5em) scale(0.9);
    filter: blur(3px);
}

/* 过渡效果 */
.letter,
.center-text,
.left-text,
.right-text {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 移除之前的装饰线条和背景效果 */
.connect-title::before,
.connect-title::after,
.connect-container::before {
    display: none;
}

/* 更新字母颜色，统一使用主题色系 */
.c-letter, .n-letter, .e-letter, .t-letter { 
    color: inherit;
    --glow-color: var(--accent-color);
}

/* 渐隐效果优化 */
.letter:hover ~ .letter {
    opacity: 0.08;
    transform: translateX(0.4em) scale(0.95);
    filter: blur(2px);
}

.letter:hover ~ .letter ~ .letter {
    opacity: 0.05;
    transform: translateX(0.5em) scale(0.9);
    filter: blur(3px);
}

/* 导入更现代的字体 */
@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Cinzel:wght@400;500;600&family=Cormorant:ital,wght@0,300;0,400;1,300;1,400&display=swap');

.mouse {
    width: 25px;
    height: 36px;
    border-radius: 15px;
    border: 2px solid #ECECEC;
    position: absolute;
    bottom: -380px;  /* 增加底部距离，使其更靠近屏幕底部 */
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;  /* 禁用鼠标事件，移除点击效果 */
}

.mouse > div {
    display: block;
    margin: 6px auto;
    width: 3px;
    height: 6px;
    border-radius: 4px;
    background: #ECECEC;
    animation-duration: 2s;
    animation-name: scroll;
    animation-iteration-count: infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(5px);
    }
}

/* 添加链接样式 */
.letter a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
}

/* WeChat提示框样式 */
.c-letter {
    position: relative;
}

.c-letter::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: var(--font-mono);
}

.c-letter:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 10px);
}

/* 保持链接的悬停效果 */
.letter a:hover .left-text,
.letter a:hover .right-text {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

/* 添加链接过渡动画 */
.letter a .left-text,
.letter a .right-text,
.letter a .center-text {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 添加页脚样式 */
.site-footer {
    padding: 1rem 0;  /* 减小上下内边距 */
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-credit,
.footer-copyright,
.footer-update {
    margin: 0.3rem 0;  /* 减小段落间距 */
    font-size: 0.9rem;  /* 稍微减小字体大小 */
    line-height: 1.4;  /* 减小行高 */
    opacity: 0.8;
}

.footer-copyright {
    font-size: 0.85rem;  /* 版权信息字体稍小 */
    opacity: 0.6;
}

.footer-credit {
    color: var(--accent-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .site-footer {
        padding: 1.5rem 0;
    }
    
    .footer-content p {
        font-size: 0.8rem;
    }
}

/* 重新组织响应式布局 */
@media screen and (max-width: 1800px) {
    .work-grid {
        padding: 3rem;
        gap: 4rem;
    }
    
    .work-item {
        width: 38%;
        height: 64vh;
    }
}

@media screen and (max-width: 1400px) {
    .work-item {
        min-height: 600px;
        max-height: 800px;
    }
}

@media screen and (max-width: 1200px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: min(3vw, 30px);
    }
    
    .work-item {
        height: min(40vh, 400px);
    }
}

@media screen and (max-width: 768px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr); /* 保持两列布局 */
        gap: min(2.5vw, 20px); /* 适当减小间距但不要太小 */
    }
    
    .work-item {
        height: min(30vh, 300px); /* 减小高度但保持比例 */
        border-radius: 12px; /* 稍微减小圆角 */
    }
    
    .work-content h3 {
        font-size: min(2.2vw, 18px);
        margin-bottom: 8px;
    }
    
    .work-content p {
        font-size: min(1.8vw, 14px);
        margin-bottom: 12px;
    }
    
    .view-project {
        font-size: min(1.8vw, 14px);
        padding: 6px 12px;
    }
    
    /* 调整 work 部分的页脚文本 */
    .work-section-footer {
        padding: 20px 5%;
    display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .work-footer-left, .work-footer-right {
        width: 48%;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr); /* 保持两列 */
        gap: 10px; /* 进一步减小间距 */
    }
    
    .work-item {
        height: 180px; /* 固定高度以保持比例 */
    }
    
    .work-content {
        padding: 10px;
    }
    
    .work-content h3 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .work-content p {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .view-project {
    font-size: 12px;
        padding: 4px 8px;
    }
    
    /* 调整页脚为单列布局 */
    .work-footer-left, .work-footer-right {
    width: 100%;
        margin-bottom: 10px;
    }
}

/* 1. 首先添加闪烁动画关键帧 */
@keyframes sparkle {
    0% {
        opacity: 1;
    transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 2. 为星星添加特定样式 */
.sparkle-emoji {
    display: inline-block;  /* 确保动画不影响周围文本 */
    animation: sparkle 2s ease-in-out infinite;  /* 添加动画 */
    animation-delay: 1s;  /* 延迟开始 */
    transform-origin: center;  /* 确保缩放从中心开始 */
}

/* 更新滑动容器样式 */
.slide-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* 减轻遮罩深度 */
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: all 0.3s ease;
}

.slide-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.slide-content {
    position: relative;
    width: 75%;
    height: 75%;
    background: transparent; /* 移除背景色 */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* 添加阴影 */
}

/* 优化关闭按钮 */
.slide-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.slide-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 优化导航按钮 */
.slide-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    z-index: 1001;
    pointer-events: none;
}

.slide-nav-button {
    pointer-events: auto;
    width: 60px;  /* 减小按钮容器尺寸 */
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 3rem;  /* 增加边距，远离内容 */
}

.slide-nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.slide-nav-button svg {
    width: 40px;  /* 保持箭头大小不变 */
    height: 40px;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 添加渐变遮罩效果 */
.slide-nav-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;  /* 减小遮罩宽度 */
    pointer-events: none;
    opacity: 0.5;
}

.slide-nav-overlay.left {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
}

.slide-nav-overlay.right {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
}

/* 优化内容样式 */
.slide-inner {
    width: 100%;
    height: 100%;
    padding: 6rem;
    display: flex;
    flex-direction: column;
    color: white;
}

.slide-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: white;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.slide-body {
    display: flex;
    gap: 4rem;
    height: calc(100% - 120px);
    align-items: center;
    padding: 0 5rem;  /* 添加内边距，远离导航按钮 */
    max-width: 1400px;  /* 限制最大宽度 */
    margin: 0 auto;  /* 居中内容 */
}

.slide-image {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 60%;  /* 限制图片区域宽度 */
}

.slide-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.slide-text {
    flex: 1;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    max-width: 45%;  /* 限制文字区域宽度 */
}

.slide-text p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* 添加过渡动画 */
.slides {
    height: 100%;
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
}

/* 分享按钮区域样式 */
.share-section {
    min-height: 300px;  /* 增加高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;    /* 增加上下内边距 */
    margin-bottom: 4rem; /* 增加与Connect的距离 */
    scroll-margin-top: 400px; /* 增加顶部边距，使内容位置更靠上 */
}

.share-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    overflow: visible;  /* 允许子元素溢出 */
}

/* 神经元按钮基础样式 */
.neural-button {
    position: relative;
    width: 10rem;
    height: 10rem;
    margin: 0 auto;  /* 水平居中 */
    transform: translateX(-2rem); /* 微调位置 */
}

/* 修改容器样式以适应照片 */
.container {
    width: 10rem;
    height: 10rem;
    position: relative;
    border-radius: 50%;
    backdrop-filter: blur(8px);
}

/* 创建独立的照片容器 */
.portrait-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    z-index: -1; /* 确保在神经元图案下方 */
}

/* 照片样式 */
.portrait-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.9;
    transition: transform 0.3s ease-out;
}

/* 添加柔和的边框光晕 */
.portrait-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(var(--accent-color-rgb), 0.3);
    pointer-events: none;
}

/* 悬停效果 */
.container:hover .portrait-container img {
    transform: scale(1.05);
}

/* 添加优雅的悬停效果 */
.container:hover::before {
    transform: scale(1.05);
}

/* 添加柔和的边框光晕 */
.container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(var(--accent-color-rgb), 0.3);
    pointer-events: none;
}

/* 神经元细胞基础样式 */
.cell {
    background-color: var(--accent-color);
    position: absolute;
    transform-style: preserve-3d;
}

/* 优化神经元节点样式 */
.cell.nucleus {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(var(--accent-color-rgb), 1) 0%,
        rgba(var(--accent-color-rgb), 0.8) 60%,
        rgba(var(--accent-color-rgb), 0.6) 100%
    );
    box-shadow: 
        0 0 15px rgba(var(--accent-color-rgb), 0.6),
        0 0 30px rgba(var(--accent-color-rgb), 0.3),
        inset 0 0 8px rgba(255, 255, 255, 0.6);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* 起始节点 */
.cell.nucleus.start {
    opacity: 0;
    width: 1.5rem;
    height: 1.5rem;
    top: -.3rem;
    left: -.15rem;
    animation: nucleus-pulse .5s ease-out 0s 1 forwards;
}

/* 第一层节点 */
.cell.nucleus.midlow {
    opacity: 0;
    animation: nucleus-pulse .5s ease-out .5s 1 forwards;
}

.cell.nucleus.midlow.n1 { top: -2rem; left: -2rem; }
.cell.nucleus.midlow.n2 { top: 0.5rem; left: -2rem; }
.cell.nucleus.midlow.n3 { top: 2rem; left: 0rem; }
.cell.nucleus.midlow.n4 { top: 0.5rem; left: 3rem; }
.cell.nucleus.midlow.n5 { 
    top: -4.2rem; 
    left: 3.7rem;
    width: 1.5rem;
    height: 1.5rem;
}

/* 神经元连接线样式 */
.cell.neuron {
    width: .2rem;
    transform-origin: center top;
    transform-style: preserve-3d;
}

/* 第一波连接线 */
.cell.neuron.wave1 {
    left: .4rem;
    top: .5rem;
}

.cell.neuron.wave1::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .2rem;
    background-color: var(--accent-color);
    animation: fire-neuron 1s ease-out 0s 1;
}

.cell.neuron.wave1.n1 { height: 3rem; transform: rotate(135deg); }
.cell.neuron.wave1.n2 { height: 2rem; transform: rotate(76deg); }
.cell.neuron.wave1.n3 { height: 2rem; transform: rotate(0deg); }
.cell.neuron.wave1.n4 { height: 3rem; transform: rotate(-81deg); }
.cell.neuron.wave1.n5 { height: 5.5rem; transform: rotate(-135deg); }

/* 动画关键帧 */
@keyframes nucleus-pulse {
    0% {
        transform: scale(0) translateZ(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) translateZ(10px);
    }
    75% {
        transform: scale(0.9) translateZ(5px);
    }
    100% {
        transform: scale(1) translateZ(0);
        opacity: 1;
    }
}

@keyframes fire-neuron {
    0% {
        opacity: 0;
        transform: scaleY(0);
        filter: brightness(0.5);
    }
    30% {
        opacity: 1;
        transform: scaleY(1.2);
        filter: brightness(1.5);
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
        filter: brightness(1);
    }
}

/* 修改连线动画关键帧 */
@keyframes growAndGlow {
    0% {
        opacity: 0;
        transform: scaleY(0) rotate(var(--angle));
    }
    50% {
        opacity: 1;
        transform: scaleY(1) rotate(var(--angle));
        box-shadow: 0 0 5px var(--accent-color);
    }
    100% {
        opacity: 1;
        transform: scaleY(1) rotate(var(--angle));
        box-shadow: 0 0 8px var(--accent-color);
    }
}

/* 调整节点发光效果 */
.neural-button.animate .center-node {
    box-shadow: 0 0 12px var(--accent-color);
}

.neural-button.animate .branch-node {
    box-shadow: 0 0 8px var(--accent-color);
}

.neural-button.animate .branch-line {
    box-shadow: 0 0 6px var(--accent-color);
}

@keyframes appearAndGlow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 10px var(--accent-color);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 15px var(--accent-color);
    }
}

/* 简化的神经元结构 */
.neural-tree {
    position: relative;
    width: 80%;
    height: 80%;
}

/* 中心点 */
.center-node {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.2rem;  /* 调整中心点大小 */
    height: 1.2rem;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

/* 分支节点 */
.branch-node {
    position: absolute;
    width: 0.8rem;  /* 稍微减小分支节点大小 */
    height: 0.8rem;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
}

/* 连接线 */
.branch-line {
    position: absolute;
    width: 1.5px;  /* 稍微减小线条粗细 */
    background: var(--accent-color);
    transform-origin: top center;
    opacity: 0;
}

/* 动画类 */
.neural-button.animate .center-node {
    animation: appear 0.5s ease forwards;
}

.neural-button.animate .branch-node:nth-child(1) {
    left: 25%;    /* 调整为更规则的位置 */
    top: 25%;
    animation: appear 0.5s ease 0.3s forwards;
}

.neural-button.animate .branch-node:nth-child(2) {
    right: 25%;
    top: 25%;
    animation: appear 0.5s ease 0.4s forwards;
}

.neural-button.animate .branch-node:nth-child(3) {
    left: 25%;
    bottom: 25%;
    animation: appear 0.5s ease 0.5s forwards;
}

.neural-button.animate .branch-node:nth-child(4) {
    right: 25%;
    bottom: 25%;
    animation: appear 0.5s ease 0.6s forwards;
}

/* 连接线动画 */
.neural-button.animate .branch-line:nth-child(1) {
    left: calc(50% - 1px);
    top: 50%;
    height: 30%;
    transform: rotate(-45deg);
    animation: growLine 0.3s ease 0.3s forwards;
}

.neural-button.animate .branch-line:nth-child(2) {
    left: calc(50% - 1px);
    top: 50%;
    height: 35%;
    transform: rotate(45deg);
    animation: growLine 0.3s ease 0.4s forwards;
}

.neural-button.animate .branch-line:nth-child(3) {
    left: calc(50% - 1px);
    top: 50%;
    height: 30%;
    transform: rotate(-135deg);
    animation: growLine 0.3s ease 0.5s forwards;
}

.neural-button.animate .branch-line:nth-child(4) {
    left: calc(50% - 1px);
    top: 50%;
    height: 35%;
    transform: rotate(135deg);
    animation: growLine 0.3s ease 0.6s forwards;
}

/* 动画关键帧 */
@keyframes appear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes growLine {
    from {
        opacity: 0;
        transform-origin: top;
        transform: scaleY(0) rotate(var(--rotation));
    }
    to {
        opacity: 1;
        transform-origin: top;
        transform: scaleY(1) rotate(var(--rotation));
    }
}

/* 发光效果 */
.neural-button.animate .center-node,
.neural-button.animate .branch-node {
    box-shadow: 0 0 15px var(--accent-color);
}

.neural-button.animate .branch-line {
    box-shadow: 0 0 8px var(--accent-color);
}

/* 修改文字翻转样式 */
.share-text {
    font-family: 'Playfair Display', serif;  /* 使用 Playfair Display 作为替代字体 */
    font-size: 2.8rem;
    color: var(--text-color);
    letter-spacing: 0.02em;
    height: 2.4em;  /* 增加容器高度，确保两行文字都能显示 */
    position: relative;
    overflow: visible;  /* 允许内容溢出以显示翻转效果 */
    transform: translateY(0.2rem); /* 添加向下偏移 */
    display: flex;
    align-items: center; /* 垂直居中对齐 */
}

.flip-animate {
    perspective: 1000px;
    display: inline-block;
    cursor: default;
    position: relative;
    height: 1.2em;  /* 单行文字高度 */
    line-height: 1.2;
}

.flip-animate span {
    position: relative;
    display: block;
    padding: 0;
    width: 100%;
    height: 100%;
    transform-origin: 50% 0;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
}

.flip-animate span:before {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    content: attr(data-hover);
    transform: rotateX(-90deg);
    transform-origin: 50% 0;
    text-align: center;
    color: var(--accent-color);
    backface-visibility: hidden;
}

.flip-animate:hover span {
    transform: rotateX(90deg);  /* 移除 translateY，使用更简单的翻转 */
}

/* 确保容器正确处理溢出 */
.share-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    overflow: visible;
    padding: 1em 0;  /* 添加上下内边距 */
    position: relative; /* 确保定位上下文正确 */
}

/* 添加文字渐变效果 */
.flip-animate span,
.flip-animate span:before {
    background: linear-gradient(to bottom, var(--text-color), var(--text-color));
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 神经元连接线动画 */
.cell.neuron {
    width: .2rem;
    height: 4rem;
    transform-origin: center top;
    transform-style: preserve-3d;
}

/* Wave 1 neurons */
.cell.neuron.wave1 {
    left: .4rem;
    top: .5rem;
}

/* Wave 2 neurons */
.cell.neuron.wave2 {
    opacity: 0;
    top: -3.5rem;
    left: 4.4rem;
}

/* Wave 3 neurons */
.cell.neuron.wave3 {
    top: 3.2rem;
    left: 4.6rem;
    opacity: 0;
}

/* 动画关键帧 */
@keyframes nucleus-pulse {
    from { transform: scale(0); }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* 类似地添加 wave2 和 wave3 的连接线样式和动画 */

/* 初始状态隐藏所有动画 */
.neural-button:not(.animate) .cell {
    animation: none !important;
    opacity: 0;
}

/* 只有当添加 animate 类时才播放动画 */
.neural-button.animate .cell.nucleus.start {
    animation: nucleus-pulse .5s ease-out 0s 1 forwards;
}

.neural-button.animate .cell.nucleus.midlow {
    animation: nucleus-pulse .5s ease-out .5s 1 forwards;
}

/* 以此类推修改其他动画... */

/* 第二层节点 */
.cell.nucleus.midhigh {
    opacity: 0;
    animation: nucleus-pulse .5s ease-out 1s 1 forwards;
}

.cell.nucleus.midhigh.n1 { left: 1rem; top: -5.7rem; }
.cell.nucleus.midhigh.n2 { left: 3.8rem; top: -6.5rem; }
.cell.nucleus.midhigh.n3 { left: 7rem; top: -4.5rem; }
.cell.nucleus.midhigh.n4 { left: 6rem; top: -2rem; }
.cell.nucleus.midhigh.n5 { top: 2.7rem; left: 4.2rem; }

/* 最终节点 */
.cell.nucleus.finish {
    opacity: 0;
    animation: nucleus-pulse .5s ease-out 1.5s 1 forwards;
}

.cell.nucleus.finish.n1 { top: 4.2rem; left: 2.6rem; }
.cell.nucleus.finish.n2 { top: 4.5rem; left: 6.8rem; }

/* 第二波连接线 */
.cell.neuron.wave2 {
    opacity: 0;
    top: -3.5rem;
    left: 4.4rem;
}

.cell.neuron.wave2::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .2rem;
    background-color: var(--accent-color);
    animation: fire-neuron 1s ease-out .5s 1;
}

.cell.neuron.wave2.n1 { height: 3.2rem; transform: rotate(120deg); }
.cell.neuron.wave2.n2 { height: 2.5rem; transform: rotate(175deg); }
.cell.neuron.wave2.n3 { height: 3.2rem; transform: rotate(-100deg); }
.cell.neuron.wave2.n4 { height: 3rem; transform: rotate(-45deg); }
.cell.neuron.wave2.n5 { 
    height: 2.5rem; 
    transform: rotate(-30deg);
    top: 1rem;
    left: 3.4rem;
}

/* 第三波连接线 */
.cell.neuron.wave3 {
    opacity: 0;
    top: 3.2rem;
    left: 4.6rem;
}

.cell.neuron.wave3::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .2rem;
    background-color: var(--accent-color);
    animation: fire-neuron 1s ease-out 1s 1;
}

.cell.neuron.wave3.n1 { height: 2.5rem; transform: rotate(48deg); }
.cell.neuron.wave3.n2 { height: 3.2rem; transform: rotate(-55deg); }

/* 优化发光效果 */
.cell.nucleus {
    box-shadow: 0 0 15px var(--accent-color);
}

.cell.nucleus.start {
    box-shadow: 0 0 20px var(--accent-color);
}

.cell.neuron::after {
    box-shadow: 0 0 10px var(--accent-color);
}

/* 添加连接线动画 */
@keyframes pulse-neuron {
    0% {
        transform: scale(0) rotate(var(--rotation));
    }
    100% {
        transform: scale(1.0) rotate(var(--rotation));
    }
}

/* 添加交互效果 */
.container:hover .cell.nucleus {
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 15px var(--accent-color);
    }
    to {
        box-shadow: 0 0 25px var(--accent-color),
                    0 0 35px var(--accent-color);
    }
}

/* 确保动画只在可见时触发 */
.neural-button:not(.animate) .cell {
    opacity: 0;
    animation: none !important;
}

.neural-button.animate .cell.neuron {
    animation: appear 0.5s ease forwards;
}

@keyframes appear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 修改第二层和第三层节点的初始状态 */
.cell.nucleus.midhigh,
.cell.nucleus.finish,
.cell.neuron.wave2,
.cell.neuron.wave3 {
    opacity: 0;
    visibility: hidden;
    transform: scale(0);  /* 添加初始缩放 */
    pointer-events: none; /* 防止交互 */
}

/* 点击触发的动画类 */
.neural-button.clicked .cell.nucleus.midhigh {
    animation: nucleus-pulse .3s ease-out forwards;
}

.neural-button.clicked .cell.nucleus.finish {
    animation: nucleus-pulse .3s ease-out .2s forwards;
}

.neural-button.clicked .cell.neuron.wave2::after {
    animation: fire-neuron .5s ease-out forwards;
}

.neural-button.clicked .cell.neuron.wave3::after {
    animation: fire-neuron .5s ease-out .2s forwards;
}

/* 优化发光效果 */
.neural-button.clicked .cell.nucleus {
    animation: glow 1.5s ease-in-out infinite alternate;
}

/* 修改第二层和第三层连接线的初始状态 */
.cell.neuron.wave2,
.cell.neuron.wave3 {
    opacity: 0;
    transform: scale(0);
}

/* 点击触发的连接线动画 */
.neural-button.clicked .cell.neuron.wave2 {
    opacity: 1;
    animation: pulse-neuron .3s ease-out forwards;
}

.neural-button.clicked .cell.neuron.wave2.n1 { --rotation: 120deg; }
.neural-button.clicked .cell.neuron.wave2.n2 { --rotation: 175deg; animation-delay: 0.05s; }
.neural-button.clicked .cell.neuron.wave2.n3 { --rotation: -100deg; animation-delay: 0.1s; }
.neural-button.clicked .cell.neuron.wave2.n4 { --rotation: -45deg; animation-delay: 0.15s; }
.neural-button.clicked .cell.neuron.wave2.n5 { --rotation: -30deg; animation-delay: 0.2s; }

.neural-button.clicked .cell.neuron.wave3 {
    opacity: 1;
    animation: pulse-neuron .3s ease-out forwards;
}

.neural-button.clicked .cell.neuron.wave3.n1 { --rotation: 48deg; animation-delay: 0.25s; }
.neural-button.clicked .cell.neuron.wave3.n2 { --rotation: -55deg; animation-delay: 0.3s; }

/* 连接线发光动画 */
.neural-button.clicked .cell.neuron.wave2::after,
.neural-button.clicked .cell.neuron.wave3::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .2rem;
    height: 100%;
    background-color: var(--accent-color);
    animation: fire-neuron .5s ease-out forwards;
}

/* 修改连接线动画关键帧 */
@keyframes pulse-neuron {
    0% {
        opacity: 0;
        visibility: visible; /* 确保动画开始时可见 */
        transform: scale(0) rotate(var(--rotation));
    }
    100% {
        opacity: 1;
        visibility: visible;
        transform: scale(1) rotate(var(--rotation));
    }
}

@keyframes fire-neuron {
    0% {
        opacity: 0;
        box-shadow: 0 0 0 0 var(--accent-color);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 10px var(--accent-color);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 15px var(--accent-color);
    }
}

/* 隐藏第二层和第三层的连接线 */
.cell.neuron.wave2,
.cell.neuron.wave3,
.cell.neuron.wave2::after,
.cell.neuron.wave3::after {
    opacity: 0;
    visibility: hidden;  /* 完全隐藏连接线 */
}

/* 点击时显示连接线 */
.neural-button.clicked .cell.neuron.wave2,
.neural-button.clicked .cell.neuron.wave3 {
    visibility: visible;
    opacity: 1;
}

.neural-button.clicked .cell.neuron.wave2::after,
.neural-button.clicked .cell.neuron.wave3::after {
    visibility: visible;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .2rem;
    height: 100%;
    background-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
    animation: fire-neuron .5s ease-out forwards;
}

/* 第二波连接线动画 */
.neural-button.clicked .cell.neuron.wave2.n1 { animation: pulse-neuron .4s ease-out .1s forwards; --rotation: 120deg; }
.neural-button.clicked .cell.neuron.wave2.n2 { animation: pulse-neuron .4s ease-out .2s forwards; --rotation: 175deg; }
.neural-button.clicked .cell.neuron.wave2.n3 { animation: pulse-neuron .4s ease-out .3s forwards; --rotation: -100deg; }
.neural-button.clicked .cell.neuron.wave2.n4 { animation: pulse-neuron .4s ease-out .4s forwards; --rotation: -45deg; }
.neural-button.clicked .cell.neuron.wave2.n5 { animation: pulse-neuron .4s ease-out .5s forwards; --rotation: -30deg; }

/* 第二层节点延迟出现 */
.neural-button.clicked .cell.nucleus.midhigh.n1 { animation: nucleus-pulse .4s ease-out .5s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n2 { animation: nucleus-pulse .4s ease-out .6s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n3 { animation: nucleus-pulse .4s ease-out .7s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n4 { animation: nucleus-pulse .4s ease-out .8s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n5 { animation: nucleus-pulse .4s ease-out .9s forwards; }

/* 第三波连接线动画 */
.neural-button.clicked .cell.neuron.wave3.n1 { animation: pulse-neuron .4s ease-out 1s forwards; --rotation: 48deg; }
.neural-button.clicked .cell.neuron.wave3.n2 { animation: pulse-neuron .4s ease-out 1.1s forwards; --rotation: -55deg; }

/* 最终节点延迟出现 */
.neural-button.clicked .cell.nucleus.finish.n1 { animation: nucleus-pulse .4s ease-out 1.4s forwards; }
.neural-button.clicked .cell.nucleus.finish.n2 { animation: nucleus-pulse .4s ease-out 1.5s forwards; }

/* 优化连接线能量流动动画 */
.neural-button.clicked .cell.neuron.wave2::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .2rem;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(var(--accent-color-rgb), 0.3),
        rgba(var(--accent-color-rgb), 1) 50%,
        rgba(var(--accent-color-rgb), 0.3)
    );
    animation: energyPulse .4s ease-out forwards;
    animation-delay: inherit;  /* 继承父元素的延迟 */
}

/* 改进能量脉冲动画 */
@keyframes energyPulse {
    0% {
        opacity: 0;
        transform: scaleY(0);
        filter: brightness(0.5);
    }
    40% {
        opacity: 1;
        transform: scaleY(1.2);
        filter: brightness(1.8);
    }
    60% {
        transform: scaleY(1);
        filter: brightness(1.5);
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
        filter: brightness(1);
    }
}

/* 改进节点出现动画 */
@keyframes nucleus-pulse {
    0% {
        opacity: 0;
        visibility: visible;
        transform: scale(0) translateZ(0);
    }
    60% {
        opacity: 1;
        transform: scale(1.3) translateZ(15px);
    }
    80% {
        transform: scale(0.9) translateZ(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateZ(0);
    }
}

/* 保持展开状态的样式 */
.neural-button.expanded .cell.nucleus.midhigh,
.neural-button.expanded .cell.nucleus.finish {
    opacity: 1;
    visibility: visible;
}

.neural-button.expanded .cell.neuron.wave2,
.neural-button.expanded .cell.neuron.wave3,
.neural-button.expanded .cell.neuron.wave2::after,
.neural-button.expanded .cell.neuron.wave3::after {
    opacity: 1;
    visibility: visible;
}

/* 确保动画只在点击时触发一次 */
.neural-button.clicked:not(.expanded) .cell.nucleus.midhigh,
.neural-button.clicked:not(.expanded) .cell.nucleus.finish,
.neural-button.clicked:not(.expanded) .cell.neuron.wave2,
.neural-button.clicked:not(.expanded) .cell.neuron.wave3 {
    animation: none;
}

/* 优化连接线样式 */
.cell.neuron::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .2rem;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(var(--accent-color-rgb), 0.3),
        rgba(var(--accent-color-rgb), 1) 50%,
        rgba(var(--accent-color-rgb), 0.3)
    );
    box-shadow: 
        0 0 15px rgba(var(--accent-color-rgb), 0.5),
        0 0 25px rgba(var(--accent-color-rgb), 0.3);
    transform-origin: center top;
}

/* 持续的呼吸效果 */
.neural-button.expanded .cell.nucleus {
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1) translateZ(0);
        box-shadow: 
            0 0 15px rgba(var(--accent-color-rgb), 0.6),
            0 0 30px rgba(var(--accent-color-rgb), 0.3),
            inset 0 0 8px rgba(255, 255, 255, 0.6);
    }
    50% {
        transform: scale(1.1) translateZ(5px);
        box-shadow: 
            0 0 20px rgba(var(--accent-color-rgb), 0.7),
            0 0 40px rgba(var(--accent-color-rgb), 0.4),
            inset 0 0 12px rgba(255, 255, 255, 0.7);
    }
}

/* 连接线能量流动效果 */
.neural-button.expanded .cell.neuron::after {
    animation: energyFlow 2s linear infinite;
}

@keyframes energyFlow {
    0% {
        background: linear-gradient(
            to right,
            rgba(var(--accent-color-rgb), 0.3),
            rgba(var(--accent-color-rgb), 1) 50%,
            rgba(var(--accent-color-rgb), 0.3)
        );
    }
    50% {
        background: linear-gradient(
            to right,
            rgba(var(--accent-color-rgb), 1),
            rgba(var(--accent-color-rgb), 0.3) 50%,
            rgba(var(--accent-color-rgb), 1)
        );
    }
    100% {
        background: linear-gradient(
            to right,
            rgba(var(--accent-color-rgb), 0.3),
            rgba(var(--accent-color-rgb), 1) 50%,
            rgba(var(--accent-color-rgb), 0.3)
        );
    }
}

/* 3D悬浮效果 */
.container {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.neural-button.expanded .container {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateZ(0) rotateX(0) rotateY(0);
    }
    25% {
        transform: translateZ(10px) rotateX(2deg) rotateY(2deg);
    }
    75% {
        transform: translateZ(5px) rotateX(-2deg) rotateY(-2deg);
    }
}

/* 1. 连接线的初始状态 */
.cell.neuron.wave2,
.cell.neuron.wave3 {
    opacity: 0;
    visibility: hidden;
    /* 添加初始旋转角度，防止闪现竖线 */
    transform: scale(0) rotate(var(--rotation, 0deg));
    transform-origin: top center;
    pointer-events: none;
    /* 添加过渡效果，防止突变 */
    transition: visibility 0s linear 0.3s, opacity 0.3s ease-out;
}

/* 连接线的伪元素初始状态 */
.cell.neuron.wave2::after,
.cell.neuron.wave3::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .2rem;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: scaleY(0);
    transform-origin: top center;
    background: linear-gradient(
        to right,
        rgba(var(--accent-color-rgb), 0.3),
        rgba(var(--accent-color-rgb), 1) 50%,
        rgba(var(--accent-color-rgb), 0.3)
    );
    /* 添加过渡效果 */
    transition: visibility 0s linear 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out;
}


/* 3. 修改动画关键帧，完全控制可见性 */
@keyframes pulse-neuron-line {
    0% {
        opacity: 0;
        visibility: hidden;
        transform: scale(0) rotate(var(--rotation));
    }
    1% {
        visibility: visible;
        opacity: 0;
    }
    100% {
        visibility: visible;
        opacity: 1;
        transform: scale(1) rotate(var(--rotation));
    }
}

/* 4. 连接线出现动画 */
.neural-button.clicked .cell.neuron.wave2.n1 { animation: pulse-neuron-line 0.4s ease-out 0.1s forwards; }
.neural-button.clicked .cell.neuron.wave2.n2 { animation: pulse-neuron-line 0.4s ease-out 0.2s forwards; }
.neural-button.clicked .cell.neuron.wave2.n3 { animation: pulse-neuron-line 0.4s ease-out 0.3s forwards; }
.neural-button.clicked .cell.neuron.wave2.n4 { animation: pulse-neuron-line 0.4s ease-out 0.4s forwards; }
.neural-button.clicked .cell.neuron.wave2.n5 { animation: pulse-neuron-line 0.4s ease-out 0.5s forwards; }

.neural-button.clicked .cell.neuron.wave3.n1 { animation: pulse-neuron-line 0.4s ease-out 1.0s forwards; }
.neural-button.clicked .cell.neuron.wave3.n2 { animation: pulse-neuron-line 0.4s ease-out 1.1s forwards; }

/* 5. 连接线内部发光效果动画 */
@keyframes line-glow {
    0% {
        opacity: 0;
        visibility: hidden;
        transform: scaleY(0);
    }
    1% {
        visibility: visible;
        opacity: 0;
    }
    100% {
        visibility: visible;
        opacity: 1;
        transform: scaleY(1);
    }
}

/* 6. 为每个连接线添加发光效果动画 */
.neural-button.clicked .cell.neuron.wave2.n1::after { animation: line-glow 0.4s ease-out 0.15s forwards; }
.neural-button.clicked .cell.neuron.wave2.n2::after { animation: line-glow 0.4s ease-out 0.25s forwards; }
.neural-button.clicked .cell.neuron.wave2.n3::after { animation: line-glow 0.4s ease-out 0.35s forwards; }
.neural-button.clicked .cell.neuron.wave2.n4::after { animation: line-glow 0.4s ease-out 0.45s forwards; }
.neural-button.clicked .cell.neuron.wave2.n5::after { animation: line-glow 0.4s ease-out 0.55s forwards; }

.neural-button.clicked .cell.neuron.wave3.n1::after { animation: line-glow 0.4s ease-out 1.05s forwards; }
.neural-button.clicked .cell.neuron.wave3.n2::after { animation: line-glow 0.4s ease-out 1.15s forwards; }

/* 1. 特别加强第三波连接线的初始隐藏状态 */
.cell.neuron.wave3 {
    opacity: 0;
    visibility: hidden;
    transform: scale(0) rotate(var(--rotation, 0deg));
    transform-origin: top center;
    pointer-events: none;
    /* 确保完全隐藏 */
    clip-path: polygon(0 0, 0 0, 0 0);
    transition: none; /* 防止任何过渡效果导致闪现 */
}

/* 2. 第三波连接线的特定角度预设 */
.cell.neuron.wave3.n1 { --rotation: 48deg; }
.cell.neuron.wave3.n2 { --rotation: -55deg; }

/* 3. 修改第三波连接线的动画 */
@keyframes pulse-neuron-line-wave3 {
    0%, 0.1% {
        opacity: 0;
        visibility: hidden;
        transform: scale(0) rotate(var(--rotation));
        clip-path: polygon(0 0, 0 0, 0 0);
    }
    1% {
        visibility: visible;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        visibility: visible;
        opacity: 1;
        transform: scale(1) rotate(var(--rotation));
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* 4. 使用新的动画关键帧 */
.neural-button.clicked .cell.neuron.wave3.n1 { 
    animation: pulse-neuron-line-wave3 0.4s ease-out 1.0s forwards;
}
.neural-button.clicked .cell.neuron.wave3.n2 { 
    animation: pulse-neuron-line-wave3 0.4s ease-out 1.1s forwards;
}

/* 5. 第三波连接线的发光效果也需要特别处理 */
.cell.neuron.wave3::after {
    clip-path: polygon(0 0, 0 0, 0 0);
    transition: none;
}

@keyframes line-glow-wave3 {
    0%, 0.1% {
        opacity: 0;
        visibility: hidden;
        transform: scaleY(0);
        clip-path: polygon(0 0, 0 0, 0 0);
    }
    1% {
        visibility: visible;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        visibility: visible;
        opacity: 1;
        transform: scaleY(1);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

.neural-button.clicked .cell.neuron.wave3.n1::after { 
    animation: line-glow-wave3 0.4s ease-out 1.05s forwards;
}
.neural-button.clicked .cell.neuron.wave3.n2::after { 
    animation: line-glow-wave3 0.4s ease-out 1.15s forwards;
}
/* 滑动展示区域样式 */
.slideshow-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90vh;
    transform: scale(0.95);
    background: none; /* 移除黑色背景 */
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform-origin: center center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 100px;
}

.slideshow-wrapper.active {
    opacity: 0.95;
    visibility: visible;
    transform: scale(1);
}

/* 修复内容区域的显示 */
.slideshow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 85%; /* 进一步缩小宽度 */
    height: 70vh; /* 进一步减小高度 */
    transform: translate(-50%, -50%);
    display: flex;
    overflow: hidden;
    border-radius: 24px; /* 增加圆角 */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.25); /* 增强阴影效果 */
}

.slideshow-left,
.slideshow-right {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slideshow-left {
    width: 40%;
    position: relative;
    height: 100%;
    overflow: hidden;
    background: transparent; /* 移除任何默认背景 */
}

.slideshow-right {
    width: 60%;
}

/* 确保滑动内容正确显示 */
.Lslide,
.Rslide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Lslide {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem; /* 添加内边距 */
}

.Lslide-content {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.Lslide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2A1810;  /* 更深的褐色标题 */
}

.Lslide-content p {
    margin: 0.5rem 0;
    line-height: 1.4;
    font-size: 1rem;
    color: #3A2318;  /* 更深的褐色文字 */
}

/* 按钮样式 */
.Lslide-content .button {
    background-color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    border-radius: 25px;
    position: relative;
    margin-top: 2.5rem;  /* 增加上边距 */
    transition: all 0.3s ease;
    transform: scale(0.9);  /* 整体缩小按钮 */
}

.Lslide-content .button a {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7em 2.5em 0.7em 1.2em;  /* 进一步减小按钮尺寸 */
    color: #000;
    font-size: 12px;
    font-weight: normal;  /* 取消文字加粗 */
}

.Lslide-content .button p {
    margin: 0;
    padding: 0;
    color: #000;
    text-align: center;  /* 文字居中 */
}

.Lslide-content .button i {
    position: absolute;
    top: 50%;
    right: 1em;  /* 调整箭头位置 */
    color: #000;
    font-size: 9px;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

/* 柔和的悬停效果 */
.Lslide-content .button:hover {
    background-color: rgba(255, 255, 255, 0.7);  /* 悬停时稍微透明 */
    transform: translateY(-2px);
}

.Lslide-content .button:hover i {
    right: 0.8em;  /* 调整箭头移动距离 */
    color: #000;
}

.Lslide-content .button:hover a,
.Lslide-content .button:hover p {
    color: #000;
}

.slideshow-right {
    width: 60%;
    position: relative;
    height: 100%;
}

.Rslide {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: translateY(0); /* 重置初始位置 */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.Rslide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* 防止图片底部间隙 */
}

.control {
    position: absolute;
    left: 61.2%;
    top: 40%;
    transform: translateX(-50%);
}

.control i {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: #aaaaaa;
    transition: all 0.3s;
}

.control .control-top {
    width: 45px;
    height: 50px;
    background-color: #fff;
    position: relative;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.control .control-bottom {
    width: 45px;
    height: 50px;
    background-color: #fff;
    position: relative;
    border-radius: 4px 0 0 4px;
    left: -45px;
    cursor: pointer;
}

.control .control-top:hover i,
.control .control-bottom:hover i {
    color: #333333;
}

/* 添加关闭按钮 */
.slideshow-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slideshow-close:hover {
    transform: rotate(90deg);
}

.slideshow-close::before,
.slideshow-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #333;
}

.slideshow-close::before {
    transform: rotate(45deg);
}

.slideshow-close::after {
    transform: rotate(-45deg);
}

/* 添加过渡动画 */
.Lslide, .Rslide {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 优化图片加载 */
.Rslide img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.Rslide img.loaded {
    opacity: 1;
}

/* 添加移动端样式 */
@media (max-width: 768px) {
    .slideshow-left,
    .slideshow-right {
        width: 100%;
        float: none;
    }
    
    .slideshow-left {
        height: 40%;
    }
    
    .slideshow-right {
        height: 60%;
    }
    
    .control {
        left: 50%;
        top: 40%;
        transform: translateX(-50%);
    }
    
    .Lslide-content h2 {
        font-size: 36px;
    }
    
    .Lslide-content p {
        padding: 1.5em 0;
    }
}

/* 添加加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 头像悬停效果 */
.portrait-container {
    cursor: pointer;
    position: relative;
}

.portrait-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--accent-color-rgb), 0.2);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
}

.portrait-container::after {
    content: '\f065';  /* FontAwesome 展开图标 */
    font-family: 'FontAwesome';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    color: #fff;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.portrait-container:hover::before {
    opacity: 1;
}

.portrait-container:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.portrait-container:hover img {
    transform: scale(1.05);
}

/* 隐藏第三层神经元和连接线 */
.cell.neuron.wave3,
.cell.nucleus.finish {
    display: none;  /* 完全隐藏第三层元素 */
}

/* 修改第二层神经元的动画延迟，使其成为最后一层 */
.neural-button.clicked .cell.neuron.wave2.n1 { animation: pulse-neuron-line 0.4s ease-out 0.1s forwards; }
.neural-button.clicked .cell.neuron.wave2.n2 { animation: pulse-neuron-line 0.4s ease-out 0.2s forwards; }
.neural-button.clicked .cell.neuron.wave2.n3 { animation: pulse-neuron-line 0.4s ease-out 0.3s forwards; }
.neural-button.clicked .cell.neuron.wave2.n4 { animation: pulse-neuron-line 0.4s ease-out 0.4s forwards; }
.neural-button.clicked .cell.neuron.wave2.n5 { animation: pulse-neuron-line 0.4s ease-out 0.5s forwards; }

/* 修改第二层节点的动画延迟 */
.neural-button.clicked .cell.nucleus.midhigh.n1 { animation: nucleus-pulse 0.4s ease-out 0.5s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n2 { animation: nucleus-pulse 0.4s ease-out 0.6s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n3 { animation: nucleus-pulse 0.4s ease-out 0.7s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n4 { animation: nucleus-pulse 0.4s ease-out 0.8s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n5 { animation: nucleus-pulse 0.4s ease-out 0.9s forwards; }

/* 隐藏遮挡面部的连接线和神经元 */
.cell.neuron.wave2.n3,
.cell.nucleus.midhigh.n3 {
    display: initial; /* 恢复显示第3个元素 */
}

/* 重新调整其他连接线的动画顺序 */
.neural-button.clicked .cell.neuron.wave2.n1 { animation: pulse-neuron-line 0.4s ease-out 0.1s forwards; }
.neural-button.clicked .cell.neuron.wave2.n2 { animation: pulse-neuron-line 0.4s ease-out 0.2s forwards; }
.neural-button.clicked .cell.neuron.wave2.n4 { animation: pulse-neuron-line 0.4s ease-out 0.3s forwards; }
.neural-button.clicked .cell.neuron.wave2.n5 { animation: pulse-neuron-line 0.4s ease-out 0.4s forwards; }

/* 重新调整其他节点的动画顺序 */
.neural-button.clicked .cell.nucleus.midhigh.n1 { animation: nucleus-pulse 0.4s ease-out 0.5s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n2 { animation: nucleus-pulse 0.4s ease-out 0.6s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n4 { animation: nucleus-pulse 0.4s ease-out 0.7s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n5 { animation: nucleus-pulse 0.4s ease-out 0.8s forwards; }

/* 隐藏遮挡面部的连接线和神经元（最下方的那个） */
.cell.neuron.wave2.n5,
.cell.nucleus.midhigh.n5 {
    display: none;  /* 完全隐藏遮挡面部的元素 */
}

/* 重新调整其他连接线的动画顺序 */
.neural-button.clicked .cell.neuron.wave2.n1 { animation: pulse-neuron-line 0.4s ease-out 0.1s forwards; }
.neural-button.clicked .cell.neuron.wave2.n2 { animation: pulse-neuron-line 0.4s ease-out 0.2s forwards; }
.neural-button.clicked .cell.neuron.wave2.n3 { animation: pulse-neuron-line 0.4s ease-out 0.3s forwards; }
.neural-button.clicked .cell.neuron.wave2.n4 { animation: pulse-neuron-line 0.4s ease-out 0.4s forwards; }

/* 重新调整其他节点的动画顺序 */
.neural-button.clicked .cell.nucleus.midhigh.n1 { animation: nucleus-pulse 0.4s ease-out 0.5s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n2 { animation: nucleus-pulse 0.4s ease-out 0.6s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n3 { animation: nucleus-pulse 0.4s ease-out 0.7s forwards; }
.neural-button.clicked .cell.nucleus.midhigh.n4 { animation: nucleus-pulse 0.4s ease-out 0.8s forwards; }

/* 添加感谢消息的样式 */
.thank-message {
    position: absolute;
    left: 120%;  /* 水平居中 */
    bottom: calc(100% + 5px);  /* 移到头像上方 */
    transform: translateX(-50%) scale(0);  /* 水平居中 + 初始缩放 */
    background: rgba(var(--accent-color-rgb), 0.1);
    backdrop-filter: blur(4px);
    padding: 10px 20px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform-origin: bottom center;  /* 从底部开始变换 */
}

/* 修改动画关键帧 */
@keyframes thank-message-appear {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes thank-message-disappear {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
}

/* 其他相关样式保持不变 */
.thank-message.show {
    visibility: visible;
    animation: thank-message-appear 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.thank-message.hide {
    animation: thank-message-disappear 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 添加导航栏过渡效果 */
.nav-container {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 当展示页面打开时隐藏导航栏 */
.slideshow-wrapper.active ~ .nav-container {
    opacity: 0;
    visibility: hidden;
}

/* 修复右侧图片显示问题 */
.slideshow {
    height: 100%;
    width: 100%;
    display: flex;
    position: relative;
    overflow: hidden;
}

.slideshow-left {
    width: 40%;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.slideshow-right {
    width: 60%;
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* 修复左侧内容定位 */
.Lslide {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.Lslide-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem;
}

/* 修复右侧图片定位和显示 */
.Rslide {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.Rslide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* 防止图片底部间隙 */
}

/* 确保初始状态正确 */
.slideshow-wrapper:not(.active) .Lslide,
.slideshow-wrapper:not(.active) .Rslide {
    transition: none;
}

/* 优化关闭按钮样式 */
.close-button {
    position: fixed;
    top: 40px;
    right: 40px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;     /* 确保垂直居中 */
    justify-content: center; /* 确保水平居中 */
    cursor: pointer;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 1001;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.close-button::before,
.close-button::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    top: 50%;          /* 调整位置到正中心 */
    left: 50%;         /* 调整位置到正中心 */
    transform-origin: center; /* 设置变换原点为中心 */
}

.close-button::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* 添加下半部分背景容器 */
.bottom-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('./images/bottom-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-out;
    z-index: -2;
    pointer-events: none;
    /* 提高背景亮度 */
    filter: brightness(1.2);
}

/* 优化渐变遮罩，减少暗度 */
.bottom-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,  /* 减少顶部暗度 */
        rgba(0, 0, 0, 0.1) 50%, /* 减少中间暗度 */
        rgba(0, 0, 0, 0.2) 100% /* 减少底部暗度 */
    );
}

/* 当滚动到特定位置时显示背景 */
.bottom-background.visible {
    opacity: 1;
}

/* 添加上方标题文本样式 */
.work-section-title {
    font-size: 2.2rem;
    color: var(--text-color);
    opacity: 0.9;
    margin-bottom: 2rem;
    padding-left: calc((100% - 1200px) / 2 + 2.5rem); /* 与容器左边缘对齐 */
    font-family: var(--font-title);
}

/* 添加下方文本容器 */
.work-section-footer {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2.5rem;
    gap: 2rem; /* 添加间距 */
}

/* 左侧说明文本 */
.work-footer-left {
    font-size: 1.2rem; /* 增大字号 */
    color: var(--text-color);
    opacity: 0.9; /* 降低透明度 */
    font-family: var(--font-main);
    transform: translateY(-0.5rem);
    max-width: 45%;
    line-height: 1.6;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* 右侧说明文本 */
.work-footer-right {
    font-size: 1.2rem; /* 增大字号 */
    color: var(--accent-color);
    opacity: 0.9; /* 降低透明度 */
    font-family: var(--font-main);
    text-align: left;
    transform: translateY(-0.5rem);
    font-weight: 600;
    max-width: 45%;
    letter-spacing: 0.02em;
    margin-left: auto;
}

/* 添加提示消息样式 */
.chat-hint {
    position: absolute;
    left: 30%;
    bottom: min(20vh, calc(276 * var(--base-unit)));
    transform: translateX(-50%) scale(0);
    padding: 20px 30px;  /* 进一步增大内边距 */
    border-radius: 15px;  /* 稍微增大圆角 */
    
    /* 玻璃态效果 */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    
    /* 文字样式 */
    color: var(--text-color);
    font-size: 1.5rem;  /* 增大字号 */
    font-family: var(--font-main);
    line-height: 1.6;  /* 增大行高 */
    white-space: nowrap;
    letter-spacing: 0.02em;  /* 增加字间距 */
    
    opacity: 0;
    visibility: hidden;
    transform-origin: bottom center;

}

/* 相应调整小三角形指示器 */
.chat-hint::after {
    content: '';
    position: absolute;
    bottom: -8px;  /* 调整位置 */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;  /* 增大三角形 */
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.1);
}

/* 保持原有的动画类 */
.chat-hint.show {
    visibility: visible;
    animation: hint-appear 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.chat-hint.hide {
    animation: hint-disappear 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 提示消息显示动画 */
@keyframes hint-appear {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* 提示消息消失动画 */
@keyframes hint-disappear {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
}

/* 修改 LinkedIn 链接的颜色 */
.n-letter a {
    color: #0077ff; /* 更亮的蓝色 */
    text-decoration: none;
    transition: color 0.3s ease;
}

.n-letter a:hover {
    color: #1a8cff; /* 悬停时的颜色更亮一些 */
}

.n-letter .left-text,
.n-letter .right-text {
    color: #0077ff; /* 保持一致的颜色 */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.n-letter:hover .left-text,
.n-letter:hover .right-text {
    opacity: 1;
    color: #1a8cff; /* 悬停时的颜色 */
}

/* C字母样式 */
.c-letter {
    color: #64ffda; /* 使用主题色 */
    transition: color 0.3s ease;
}

.c-letter .left-text,
.c-letter .right-text {
    color: #64ffda;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.c-letter:hover .left-text,
.c-letter:hover .right-text {
    opacity: 1;
    color: #7affda; /* 悬停时稍微变亮 */
}

/* E字母样式 (邮件链接) */
.e-letter a {
    color: #ff6b6b; /* 温暖的红色 */
    text-decoration: none;
    transition: color 0.3s ease;
}

.e-letter a:hover {
    color: #ff8585; /* 悬停时变亮 */
}

/* T字母样式 (GitHub链接) */
.t-letter a {
    color: #2a2a2a; /* 深黑色 */
    text-decoration: none;
    transition: all 0.3s ease;
}

.t-letter a:hover {
    color: #444444; /* 明亮的黑色 */
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8),
                0 0 4px rgba(255, 255, 255, 0.6); /* 白色光晕效果 */
}

.t-letter .left-text,
.t-letter .right-text {
    color: #2a2a2a;
    opacity: 0;
    transition: all 0.3s ease;
}

.t-letter:hover .left-text,
.t-letter:hover .right-text {
    opacity: 1;
    color: #444444;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8),
                0 0 4px rgba(255, 255, 255, 0.6);
}

/* LinkedIn (n字母) 链接样式 */
.n-letter a {
    color: #0077ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.n-letter a:hover {
    color: #1a8cff;
    text-shadow: 0 0 10px rgba(26, 140, 255, 0.4); /* 减弱的淡蓝色发光 */
}

.n-letter .left-text,
.n-letter .right-text {
    color: #0077ff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.n-letter:hover .left-text,
.n-letter:hover .right-text {
    opacity: 1;
    color: #1a8cff;
    text-shadow: 0 0 10px rgba(26, 140, 255, 0.4);
}

/* Email (e字母) 链接样式 */
.e-letter a {
    color: #ff6b6b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.e-letter a:hover {
    color: #ff8585;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3); /* 减弱的发光效果 */
}

/* 添加新链接的样式 */
.link-share {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-share:hover {
    color: #64ffda; /* 使用主题色 */
    background: rgba(255, 255, 255, 0.2);
}

/* 导航链接通用样式 */
nav ul li a {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Share 链接特定样式 */
.link-share {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1); /* 添加基础背景 */
}

.link-share:hover {
    color: #64ffda;
    background: rgba(255, 255, 255, 0.2); /* 只修改悬停时的背景透明度 */
    transform: translateY(-2px);
}

/* Share 对应的过渡动画 */
.transition-share {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #64ffda;
    clip-path: circle(0% at 80% 10%);
    transition: clip-path 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    pointer-events: none;
}

.transition-share.is-active {
    clip-path: circle(150% at 80% 10%);
}

/* 课程动画文本样式 */
.course-animation,
.course-title {  /* 添加新的选择器 */
    font-family: 'Inconsolata', source code pro, consolas, monospace;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0.8;
}

.course-animation {
    margin-top: 0.5rem;  /* 减小与标题的间距 */
    min-height: 1.5em;
}

.course-animation span {
    display: inline;
    transition: color 0.3s ease;
}

/* 加载界面样式 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;  /* 改为纯黑色 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    visibility: visible; /* 确保加载界面可见 */
}

#wrap {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wrap canvas {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    outline: none;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* 移除 works 部分的黑色遮罩 */
.transition-projects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* background: #000000; */ /* 移除黑色背景 */
    clip-path: circle(0% at 40% 10%);
    transition: clip-path 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    pointer-events: none;
}

.transition-projects.is-active {
    clip-path: circle(150% at 40% 10%);
    /* 保持 pointer-events: none 以确保不会阻挡交互 */
}

/* 3D卡片容器 */
.card-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: transparent;
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.card-container.active {
    opacity: 1;
    visibility: visible;
}

/* 卡片包装器 */
.cards-wrapper {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    perspective: 1000px;
    transform-style: preserve-3d; /* 添加这行 */
}

/* 3D卡片样式 */
.card {
    width: 300px;
    height: 400px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    backdrop-filter: blur(4px);
    transform-style: preserve-3d; /* 添加这行 */
    will-change: transform; /* 添加这行，优化性能 */
}

.card-container.active .card {
    transform: scale(1);
}

/* 为每张卡片添加不同的延迟 */
.card-container.active .card:nth-child(1) {
    transition-delay: 0s;
}

.card-container.active .card:nth-child(2) {
    transition-delay: 0.1s;
}

.card-container.active .card:nth-child(3) {
    transition-delay: 0.2s;
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.card .content {
    padding: 20px;
}

.card .content h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    font-family: "Montserrat", serif;
    margin-bottom: 10px;
}

.card .content p {
    color: #333;
    font-size: 14px;
    margin-top: 10px;
    font-family: "Montserrat", serif;
}

/* 确保卡片内容不影响3D效果 */
.card img,
.card .content {
    transform-style: preserve-3d; /* 添加这行 */
    backface-visibility: hidden; /* 添加这行 */
}

/* 移除可能影响3D变换的样式 */
.card-container.active .card:nth-child(2),
.card-container.active .card:nth-child(3) {
    transform: scale(1); /* 只保留缩放效果 */
    transition: transform 0.3s ease;
}

/* 第一个幻灯片 - 深褐色主题 */
.Lslide:nth-child(1) h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2A1810;
    opacity: 1;  /* 确保完全不透明 */
}

.Lslide:nth-child(1) p {
    margin: 0.5rem 0;
    line-height: 1.4;
    font-size: 1.2rem;
    color: #3A2318;
    opacity: 1;
}

/* 第二个幻灯片 - 深蓝色主题 */
.Lslide:nth-child(2) h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #0A1A2F;  /* 加深蓝色 */
    opacity: 1;
}

.Lslide:nth-child(2) p {
    margin: 0.5rem 0;
    line-height: 1.4;
    font-size: 1.2rem;
    color: #1A2A3F;  /* 加深蓝色 */
    opacity: 1;
}

/* 第三个幻灯片 - 深紫色主题 */
.Lslide:nth-child(3) h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #1A0F2F;  /* 加深紫色 */
    opacity: 1;
}

.Lslide:nth-child(3) p {
    margin: 0.5rem 0;
    line-height: 1.4;
    font-size: 1.2rem;
    color: #2A1F3F;  /* 加深紫色 */
    opacity: 1;
}

@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);

.game-lessons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.game-lessons-wrapper {
    display: flex;
    gap: 2.5rem; /* 增加卡片间距 */
    padding: 3rem;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* 使用更平滑的过渡 */
}

.game-lessons-container.active {
    opacity: 1;
    visibility: visible;
}

.game-lessons-container.active .game-lessons-wrapper {
    transform: scale(1);
    opacity: 1;
}

/* 卡片样式 */
.snip1401 {
    font-family: 'Playfair Display', Arial, sans-serif;
    position: relative;
    overflow: hidden;
    margin: 10px;
    min-width: 230px;
    max-width: 315px;
    min-height: 220px;  /* 改用最小高度而不是最大高度 */
    width: 100%;
    color: #000000;
    text-align: right;
    font-size: 16px;
    background-color: #000000;
}

.snip1401 * {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: all 0.35s ease;
    transition: all 0.35s ease;
}

.snip1401 img {
    max-width: 100%;
    backface-visibility: hidden;
}

.snip1401 figcaption {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
    opacity: 1;
    padding: 30px 0 30px 10px;
    background-color: #ffffff;
    width: 40%;
    -webkit-transform: translateX(150%);
    transform: translateX(150%);
}

.snip1401 figcaption:before {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    right: 100%;
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 120px 120px 120px 0;
    border-color: transparent #ffffff transparent transparent;
}

.snip1401:after {
    position: absolute;
    bottom: 50%;
    right: 40%;
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 120px 120px 0 120px;
    border-color: rgba(255, 255, 255, 0.5) transparent transparent transparent;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    -webkit-transition: all 0.35s ease;
    transition: all 0.35s ease;
}

.snip1401 h3,
.snip1401 p {
    line-height: 1.5em;
    -webkit-transform: translateX(-30px);
    transform: translateX(-30px);
    margin: 0;
}

.snip1401 h3 {
    margin: 0 0 5px;
    line-height: 1.1em;
    font-weight: 900;
    font-size: 1.4em;
    opacity: 0.75;
}

.snip1401 p {
    font-size: 0.8em;
}

.snip1401 i {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 20px 30px;
    font-size: 44px;
    color: #ffffff;
    opacity: 0;
}

.snip1401 a {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

.snip1401:hover img,
.snip1401.hover img {
    zoom: 1;
    filter: alpha(opacity=50);
    -webkit-opacity: 0.5;
    opacity: 0.5;
}

.snip1401:hover:after,
.snip1401.hover:after,
.snip1401:hover figcaption,
.snip1401.hover figcaption,
.snip1401:hover i,
.snip1401.hover i {
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: 1;
}

/* 添加容器样式 */
.game-lessons-wrapper {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    justify-content: center;
    align-items: flex-start;  /* 改为顶部对齐 */
}

/* 卡片容器——利用 CSS Grid 实现上2下1倒三角形排列 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 让第三个卡片跨越所有列，并居中显示 */
.cards-container figure:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
}

/* 放大后卡片样式（尺寸均乘以1.5） */
.snip1401 {
    font-family: 'Playfair Display', Arial, sans-serif;
    position: relative;
    overflow: hidden;
    margin: 10px;
    min-width: 345px;      /* 230px * 1.5 */
    max-width: 473px;      /* 315px * 1.5 */
    max-height: 330px;     /* 220px * 1.5 */
    width: 100%;
    color: #000000;
    text-align: right;
    font-size: 16px;
    background-color: #000000;
}

.snip1401 * {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: all 0.35s ease;
    transition: all 0.35s ease;
}

.snip1401 img {
    max-width: 100%;
    backface-visibility: hidden;
}

.snip1401 figcaption {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
    opacity: 1;
    padding: 45px 0 45px 15px;  /* 原来 30px 0 30px 10px，乘以1.5 */
    background-color: #ffffff;
    width: 40%;
    -webkit-transform: translateX(150%);
    transform: translateX(150%);
}

/* 其他样式保持不变，但尺寸都乘以1.5 */
.snip1401 figcaption:before {
    border-width: 180px 180px 180px 0;  /* 原来 120px，各值乘以1.5 */
}

.snip1401:after {
    border-width: 180px 180px 0 180px;  /* 原来 120px，各值乘以1.5 */
}

.snip1401 h3,
.snip1401 p {
    -webkit-transform: translateX(-45px);  /* 原来 -30px，乘以1.5 */
    transform: translateX(-45px);
}

.snip1401 i {
    padding: 30px 45px;   /* 原来 20px 30px，乘以1.5 */
    font-size: 66px;      /* 原来 44px，乘以1.5 */
}

/* 容器样式 */
.game-lessons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.game-lessons-container.active {
    opacity: 1;
    visibility: visible;
}

/* 卡片容器布局 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-gap: 30px;  /* 增加间距 */
    justify-content: center;
    align-items: center;
    padding: 30px;
    max-width: 1600px;  /* 限制最大宽度 */
    margin: 0 auto;
}

/* 第三个卡片布局 */
.cards-container figure:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
}

/* 统一卡片尺寸和样式 */
.snip1401 {
    font-family: 'Playfair Display', Arial, sans-serif;
    position: relative;
    overflow: hidden;
    margin: 10px;
    width: 473px;       /* 固定宽度 */
    height: 330px;      /* 固定高度 */
    color: #000000;
    text-align: right;
    font-size: 16px;
    background-color: #000000;
    border-radius: 15px;  /* 添加圆角 */
}

/* 优化图片布局 */
.snip1401 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    z-index: 0;
}

/* 调整 figcaption 以适应圆角 */
.snip1401 figcaption {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
    opacity: 1;
    padding: 45px 0 45px 15px;
    background-color: #ffffff;
    width: 40%;
    -webkit-transform: translateX(150%);
    transform: translateX(150%);
    border-radius: 0 15px 15px 0;  /* 右侧圆角 */
}

/* 调整三角形装饰 */
.snip1401 figcaption:before {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    right: 100%;
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 180px 180px 180px 0;
    border-color: transparent #ffffff transparent transparent;
}

.snip1401:after {
    position: absolute;
    bottom: 50%;
    right: 40%;
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 180px 180px 0 180px;
    border-color: rgba(255, 255, 255, 0.5) transparent transparent transparent;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    -webkit-transition: all 0.35s ease;
    transition: all 0.35s ease;
}

/* 容器样式优化 */
.game-lessons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;  /* 添加内边距 */
}

.game-lessons-container.active {
    opacity: 1;
    visibility: visible;
}

/* 修改卡片容器样式 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-gap: 30px;
    justify-content: center;
    align-items: center;
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
    transform-style: preserve-3d;  /* 添加3D渲染上下文 */
    backface-visibility: hidden;   /* 防止渲染闪烁 */
    will-change: transform;        /* 优化动画性能 */
}

/* 优化卡片样式 */
.snip1401 {
    font-family: 'Playfair Display', Arial, sans-serif;
    position: relative;
    overflow: hidden;
    margin: 10px;
    width: 473px;
    height: 330px;
    color: #000000;
    text-align: right;
    font-size: 16px;
    background-color: #000000;
    border-radius: 15px;
    transform: translateZ(0);      /* 强制GPU加速 */
    backface-visibility: hidden;   /* 防止渲染闪烁 */
    will-change: transform;        /* 优化动画性能 */
}

/* 优化图片渲染 */
.snip1401 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    z-index: 0;
    transform: translateZ(0);      /* 强制GPU加速 */
    will-change: transform;        /* 优化动画性能 */
}

/* 优化白色区域渲染 */
.snip1401 figcaption {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
    opacity: 1;
    padding: 45px 0 45px 15px;
    background-color: #ffffff;
    width: 40%;
    -webkit-transform: translateX(150%);
    transform: translateX(150%);
    border-radius: 0 15px 15px 0;
    backface-visibility: hidden;   /* 防止渲染闪烁 */
    will-change: transform;        /* 优化动画性能 */
}

/* 图标样式 */
.snip1401 i {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 44px;
    color: #ffffff;
    opacity: 0;
    transition: all 0.35s ease;
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);  /* 初始无发光 */
    z-index: 2;
}

/* 图标悬停发光动画 */
.snip1401:hover i,
.snip1401.hover i {
    opacity: 1;
    transform: translateX(0);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);  /* 白色发光效果 */
    animation: iconGlow 1.5s ease-in-out infinite alternate;
}

/* 发光动画关键帧 */
@keyframes iconGlow {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.6),
                     0 0 20px rgba(255, 255, 255, 0.4),
                     0 0 30px rgba(255, 255, 255, 0.2);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                     0 0 30px rgba(255, 255, 255, 0.6),
                     0 0 40px rgba(255, 255, 255, 0.4);
    }
}

/* 图标包装器样式 */
.snip1401 .icon-wrapper {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
    opacity: 0;
    transition: all 0.35s ease;
}

/* 图标样式 */
.snip1401 ion-icon {
    font-size: 44px;
    color: #ffffff;
    transition: all 0.35s ease;
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);
}

/* 图标悬停发光动画 */
.snip1401:hover .icon-wrapper,
.snip1401.hover .icon-wrapper {
    opacity: 1;
    transform: translateX(0);
}

.snip1401:hover ion-icon,
.snip1401.hover ion-icon {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    animation: iconGlow 1.5s ease-in-out infinite alternate;
}

/* 发光动画关键帧 */
@keyframes iconGlow {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.6),
                     0 0 20px rgba(255, 255, 255, 0.4),
                     0 0 30px rgba(255, 255, 255, 0.2);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                     0 0 30px rgba(255, 255, 255, 0.6),
                     0 0 40px rgba(255, 255, 255, 0.4);
    }
}

/* 添加 loading 文字样式 */
.loading-text {
    position: absolute;
    bottom: min(46.11vh, calc(650 * var(--base-unit))); /* 转换为相对单位 */
    left: 50.3%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: min(2 vw, calc(14 * var(--base-unit))); /* 字体大小也转换为相对单位 */
    font-family: var(--font-mono);
    white-space: nowrap;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards 0.3s,
               fadeOut 0.3s ease forwards 1.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 添加淡出动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 卡片容器动画 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-gap: 30px;
    justify-content: center;
    align-items: center;
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

/* 卡片加载动画 */
.snip1401 {
    opacity: 0;
    transform: translateY(30px);
}

/* 第一张卡片动画 */
.game-lessons-container.active .snip1401:nth-child(1) {
    animation: cardFadeIn 0.6s ease forwards 0.2s;
}

/* 第二张卡片动画 */
.game-lessons-container.active .snip1401:nth-child(2) {
    animation: cardFadeIn 0.6s ease forwards 0.4s;
}

/* 第三张卡片动画 */
.game-lessons-container.active .snip1401:nth-child(3) {
    animation: cardFadeIn 0.6s ease forwards 0.6s;
}

/* 定义卡片加载动画 */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 优化卡片关闭动画 */
.game-lessons-container .snip1401 {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.game-lessons-container:not(.active) .snip1401 {
    opacity: 0;
    transform: translateY(30px);
    transition-delay: 0s !important;
}

/* 个人照片样式 */
.profile-photo {
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 400px;
    height: 400px;
    opacity: 0;
    transition: opacity 0.8s ease;
    /* 缩小渐变容器范围 */
    -webkit-mask-image: radial-gradient(circle closest-side at center, 
        black 25%, 
        rgba(0, 0, 0, 0.8) 40%, 
        rgba(0, 0, 0, 0.3) 65%, 
        transparent 100%
    );
    mask-image: radial-gradient(circle closest-side at center, 
        black 25%, 
        rgba(0, 0, 0, 0.8) 40%, 
        rgba(0, 0, 0, 0.3) 65%, 
        transparent 100%
    );
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.95) contrast(1.1);
}

.name-container:hover .profile-photo {
    opacity: 0.8;
}


.slide-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 12px;
    transition: opacity 0.5s ease;
}

.slide-loading-indicator.fade-out {
    opacity: 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.loading-progress {
    color: white;
    font-size: 14px;
    font-family: var(--font-mono);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 移动端样式优化 */
@media (max-width: 768px) {
    /* 容器基础样式 */
    .slide-container {
        padding: 1rem;
    }

    .slide-container .slide-content {
        padding: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* 标题样式优化 */
    .slide-container .slide-title {
        font-size: 1.6rem;
        margin: 1rem 0;
        padding: 0 1rem;
        text-align: left;
    }

    /* 内容区域布局 */
    .slide-container .slide-body {
        flex-direction: column;
        gap: 1rem;
        height: calc(100% - 4rem);
        overflow-y: auto;
        padding: 0 1rem;
    }

    /* 图片区域优化 */
    .slide-container .slide-image {
        width: 100%;
        height: 35vh;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 12px;
    }

    .slide-container .slide-image img,
    .slide-container .slide-image video {
        max-height: 100%;
        width: 100%;
        object-fit: contain;
        border-radius: 8px;
    }

    /* 文本区域优化 */
    .slide-container .slide-text {
        font-size: 0.9rem;
        line-height: 1.6;
        padding: 1.2rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    /* 导航按钮优化 */
    .slide-container .slide-nav {
        position: fixed;
        bottom: 1rem;
        left: 0;
        right: 0;
        padding: 0 1rem;
        display: flex;
        justify-content: space-between;
        pointer-events: none;
    }

    .slide-container .slide-nav-button {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        pointer-events: auto;
        transform: none;
    }

    .slide-container .slide-nav-button svg {
        width: 24px;
        height: 24px;
    }

    /* 关闭按钮优化 */
    .slide-container .slide-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    /* 滚动条美化 */
    .slide-container .slide-body::-webkit-scrollbar {
        width: 4px;
    }

    .slide-container .slide-body::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .slide-container .slide-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
}

/* slideshow-wrapper 响应式布局 */
@media (max-width: 768px) {
    .slideshow-wrapper {
        height: 90vh;  /* 改为90vh，不要全屏 */
        width: 95%;    /* 留出边距 */
        margin: 5vh auto;  /* 上下留空 */
        padding: 0;
        transform-origin: center center;
        border-radius: 16px;  /* 添加圆角 */
        overflow: hidden;     /* 确保内容不溢出 */
    }

    .slideshow {
        width: 100%;
        height: 100%;
        flex-direction: column;
        border-radius: 16px;
        overflow: hidden;
    }

    /* 调整左右区域比例 */
    .slideshow-left {
        width: 100%;
        height: 45vh;  /* 调整高度比例 */
        overflow-y: auto;
    }

    .slideshow-right {
        width: 100%;
        height: 45vh;
    }

    /* 左侧内容区域优化 */
    .Lslide {
        padding: 1.2rem;
        height: 100%;
        background: rgba(255, 255, 255, 0.02);
        backdrop-filter: blur(8px);
    }

    .Lslide-content {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    /* 文本样式优化 */
    .Lslide-content h2 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;  /* 减小标题底部间距 */
        line-height: 1.2;
    }

    .Lslide-content p {
        font-size: 0.85rem;
        line-height: 1.3;      /* 减小行高 */
        margin-bottom: 0.3rem;  /* 减小段落间距 */
    }

    /* 列表样式优化 */
    .Lslide-content div[style*="padding-left: 1rem"] {
        padding-left: 0.5rem !important;  /* 减小左边距 */
    }

    .Lslide-content div[style*="text-indent"] {
        text-indent: -0.5em !important;
        padding-left: 0.8em !important;   /* 减小缩进 */
        margin-bottom: 0.2rem !important; /* 减小列表项间距 */
    }

    /* 强调文本样式调整 */
    .Lslide-content strong[style*="margin-bottom"] {
        margin-bottom: 0.3rem !important; /* 减小强调文本底部间距 */
    }

    /* 内容容器调整 */
    .Lslide-content {
        padding: 1rem;  /* 减小内边距 */
    }

    /* 调整分组间距 */
    .Lslide-content div[style*="margin-top"] {
        margin-top: 1rem !important;  /* 减小分组之间的间距 */
    }

    /* 控制按钮优化 */
    .control {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 45vh; /* 调整到分界线位置 */
        width: 140px; /* 设置固定宽度 */
        height: 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        z-index: 10;
        pointer-events: none;
    }

    .control .control-top,
    .control .control-bottom {
        width: 44px;  /* 增大按钮尺寸 */
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        pointer-events: auto;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 调整图标大小 */
    .control i {
        font-size: 1.4rem;
        color: rgba(255, 255, 255, 0.9);
    }

    .control .control-top:hover,
    .control .control-bottom:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.1);
    }

    /* 移除之前的左右定位 */
    .control .control-top {
        position: static;
    }

    .control .control-bottom {
        position: static;
    }

    /* 滚动条美化 */
    .slideshow-left::-webkit-scrollbar {
        width: 4px;
    }

    .slideshow-left::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .slideshow-left::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
}

@media (max-width: 768px) {
    /* ... 其他样式保持不变 ... */

    /* 调整左右区域比例和滚动 */
    .slideshow-left {
        width: 100%;
        height: 45vh;
        overflow: visible; /* 移除overflow限制 */
        position: relative;
    }

    .Lslide {
        padding: 1rem;
        min-height: 100%; /* 改为最小高度 */
        height: auto;     /* 允许内容自然增长 */
        background: rgba(255, 255, 255, 0.02);
        backdrop-filter: blur(8px);
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
    }

    .Lslide-content {
        width: 100%;
        height: auto;     /* 允许内容自然增长 */
        min-height: 100%; /* 保持最小高度 */
        margin: 0;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        overflow-y: auto; /* 添加内容滚动 */
        max-height: 43vh; /* 限制最大高度，留出边距 */
    }

    /* 调整文本间距 */
    .Lslide-content div[style*="line-height"] {
        line-height: 1.4 !important;
    }

    .Lslide-content div[style*="margin-top"] {
        margin-top: 0.8rem !important;
    }

    /* 调整列表样式 */
    .Lslide-content div[style*="padding-left"] {
        padding-left: 0.5rem !important;
    }

    .Lslide-content div[style*="text-indent"] {
        text-indent: -0.5em !important;
        padding-left: 0.8em !important;
        margin-bottom: 0.15rem !important;
    }

    /* 优化标题样式 */
    .Lslide-content strong[style*="font-size"] {
        font-size: 1.1em !important;
        margin-bottom: 0.3rem !important;
        display: block;
    }

    /* 调整滚动条样式 */
    .Lslide-content::-webkit-scrollbar {
        width: 3px;
    }

    .Lslide-content::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .Lslide-content::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }

    /* 调整右侧图片区域 */
    .slideshow-right {
        width: 100%;
        height: 45vh;
        overflow: hidden;
    }

    .Rslide {
        height: 100%;
    }

    .Rslide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* 添加针对所有横屏设备的媒体查询 */
@media screen and (min-width: 1024px) and (max-width: 1400px) and (min-height: 700px) and (max-height: 1000px),
       screen and (width: 1325px) and (height: 881px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.8rem !important;
    width: 90% !important;
    margin: 0 auto !important;
  }
  
  .work-item {
    height: 330px !important; /* 固定高度确保方形比例 */
    max-height: 60vh !important;
    aspect-ratio: 1.2 / 1 !important; /* 强制近似方形比例 */
    border-radius: 12px !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }
  
  .work-image {
    height: 100% !important;
  }
  
  .work-content {
    padding: 1.2rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  
  .work-content h3 {
    font-size: 1.3rem !important;
    margin-bottom: 0.6rem !important;
  }
  
  .work-content p {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    max-height: 4.2em !important;
  }
  
  .view-project {
    margin-top: 0.8rem !important;
    font-size: 0.95rem !important;
  }
}

/* 针对所有横屏设备的通用样式 */
@media screen and (orientation: landscape) and (max-width: 1400px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    width: 90% !important;
    margin: 0 auto !important;
  }
  
  .work-item {
    aspect-ratio: 1.2 / 1 !important; /* 强制近似方形比例 */
    max-height: 40vh !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }
}

/* 针对iPad和类似设备的特殊样式 */
@media screen and (width: 1024px) and (height: 768px),
       screen and (width: 1366px) and (height: 1024px),
       screen and (width: 1280px) and (height: 800px) {
  .work-item {
    height: 320px !important;
    max-height: 45vh !important; 
  }
}

/* 全局强制限制工作项目高度(移动端) */
@media screen and (max-width: 1400px) {
  .work-item {
    max-height: 40vh !important;
    height: auto !important;
  }
  
  .work-image {
    max-height: 40vh !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  
  .work-image img {
    max-height: 40vh !important;
    object-fit: cover !important;
  }
}

/* 特别针对横屏设备 */
@media screen and (orientation: landscape) and (max-width: 1400px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    width: 92% !important;
    margin: 0 auto !important;
    gap: 2rem !important;
  }

  .work-item {
    max-height: 40vh !important;
    height: auto !important;
    min-height: 350px !important;
    border-radius: 12px !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }
  
  /* 强制宽高比接近正方形 */
  .work-image-container {
    aspect-ratio: 1.2 / 1 !important;
    overflow: hidden !important;
  }
}

/* 精确匹配不同横屏设备尺寸 */
@media screen and (min-width: 1000px) and (max-width: 1400px) and (min-height: 700px),
       screen and (width: 1325px) and (height: 881px) {
  .work-item {
    max-height: 40vh !important;
    height: 300px !important;
  }
}

/* 特别针对横屏设备 - 增加容器间距 */
@media screen and (orientation: landscape) and (max-width: 1400px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    width: 92% !important;
    margin: 0 auto !important;
    gap: 3rem !important; /* 增加了间距 */
  }

  .work-item {
    max-height: 40vh !important;
    height: auto !important;
    min-height: 250px !important;
    border-radius: 12px !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }
  
  /* 确保正确的宽高比 */
  .work-image-container {
    aspect-ratio: 1.2 / 1 !important;
    overflow: hidden !important;
  }
}

/* 小尺寸横屏设备 - 进一步增加间距 */
@media screen and (orientation: landscape) and (max-width: 1200px) {
  .work-grid {
    gap: 4.5rem !important; /* 更大的间距 */
    margin-bottom: 3rem !important; /* 底部增加间距 */
  }
}

/* 更小尺寸设备 - 最大间距 */
@media screen and (orientation: landscape) and (max-width: 1000px) {
  .work-grid {
    gap: 6rem !important; /* 最大间距 */
    margin-bottom: 4rem !important;
  }
  
  /* 减小项目高度以平衡 */
  .work-item {
    max-height: 35vh !important;
  }
}

/* 精确匹配不同横屏设备尺寸 */
@media screen and (min-width: 1000px) and (max-width: 1400px) and (min-height: 700px),
       screen and (width: 1325px) and (height: 881px) {
  .work-item {
    max-height: 40vh !important;
    height: 300px !important;
  }
  
  /* 为特定设备调整间距 */
  .work-grid {
    gap: 4rem !important;
    margin-bottom: 3.5rem !important;
  }
}

/* 全局强制限制工作项目高度但增加整体尺寸(移动端) */
@media screen and (max-width: 1400px) {
  .work-item {
    max-height: 45vh !important; /* 稍微增加最大高度 */
    height: auto !important;
  }
  
  .work-image {
    max-height: 45vh !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  
  .work-image img {
    max-height: 45vh !important;
    object-fit: cover !important;
  }
}

/* 特别针对横屏设备 - 增加容器间距与尺寸 */
@media screen and (orientation: landscape) and (max-width: 1400px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    width: 96% !important; /* 增加整体宽度 */
    margin: 0 auto !important;
    gap: 12rem !important; /* 大幅增加两容器间距 */
    margin-top: 2rem !important;
    margin-bottom: 6rem !important; /* 底部增加大量空间 */
  }

  .work-item {
    max-height: 45vh !important;
    height: auto !important;
    min-height: 400px !important; /* 增加最小高度 */
    border-radius: 12px !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }
  
  /* 确保正确的宽高比 */
  .work-image-container {
    aspect-ratio: 1.2 / 1 !important;
    overflow: hidden !important;
  }
}

/* 中等尺寸屏幕调整 */
@media screen and (orientation: landscape) and (max-width: 1200px) {
  .work-grid {
    gap: 15rem !important; /* 更大的间距 */
    margin-bottom: 7rem !important; /* 底部增加更多空间 */
  }
}

/* 较小尺寸横屏设备 - 保持最大间距 */
@media screen and (orientation: landscape) and (max-width: 1000px) {
  .work-grid {
    gap: 18rem !important; /* 最大间距 */
    margin-bottom: 8rem !important;
    width: 94% !important; /* 略微减小宽度以适应小屏幕 */
  }
  
  .work-item {
    max-height: 45vh !important;
    min-height: 350px !important; /* 略微减小高度适应小屏幕 */
  }
}

/* 精确匹配不同横屏设备尺寸 */
@media screen and (min-width: 1000px) and (max-width: 1400px) and (min-height: 700px),
       screen and (width: 1325px) and (height: 881px) {
  .work-item {
    max-height: 45vh !important;
    height: 350px !important; /* 增加固定高度 */
  }
  
  /* 为特定设备调整间距 */
  .work-grid {
    gap: 16rem !important; /* 增大间距与底部文字对齐 */
    margin-bottom: 7rem !important;
  }
}

/* ======= 移动端工作项目布局优化 ======= */
/* 基础样式重置 - 但保留动画效果 */
.work-grid,
.work-item,
.work-image-container {
  animation: none !important;
}

/* 保留原有的悬停动画效果 */
.work-item:hover .work-image {
  transform: scale(1.05) !important;
  transition: transform 0.5s ease-in-out !important;
}

/* 全局移动端调整 - 适用于所有设备 */
@media screen and (max-width: 1400px) {
  .work-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    width: 85% !important;
    max-width: 1200px !important;
    margin: 2rem auto 1rem auto !important; /* 进一步减少底部间距 */
    gap: 15vw !important;
    justify-content: center !important;
    align-items: start !important;
  }
  
  .work-item {
    max-height: 45vh !important;
    height: auto !important;
    min-height: 350px !important;
    min-width: calc(75% * 350px) !important; /* 最小宽度为高度的75% */
    width: 100% !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    /* 保留transition用于hover效果 */
    transition: all 0.3s ease-in-out !important; 
  }
  
  .work-image-container {
    aspect-ratio: 1.2 / 1 !important;
    overflow: hidden !important;
    width: 100% !important;
  }
  
  .work-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    /* 确保图片有平滑过渡效果 */
    transition: transform 0.5s ease-in-out !important;
  }
  
  .work-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  
  /* 减少工作区与文本之间的间距 */
  .work-section {
    margin-bottom: 0 !important;
  }
}

/* iPad和类似设备的特定优化 */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .work-grid {
    gap: 20vw !important;
    margin-bottom: 1rem !important;
  }
  
  .work-item {
    min-height: 350px !important;
    min-width: calc(75% * 350px) !important;
  }
}

/* 小型平板和大型手机的优化 */
@media screen and (max-width: 767px) and (orientation: landscape) {
  .work-grid {
    gap: 15vw !important;
    width: 90% !important;
    margin-bottom: 1rem !important;
  }
  
  .work-item {
    min-height: 300px !important;
    min-width: calc(75% * 300px) !important;
  }
}

/* 确保所有横向设备都有正确的间距设置 */
@media screen and (orientation: landscape) {
  .work-section {
    padding-bottom: 1rem !important;
  }
}

/* 特定设备精确匹配 - 最高优先级 */
@media screen and (width: 1024px) and (height: 768px),
       screen and (width: 1366px) and (height: 1024px),
       screen and (width: 1325px) and (height: 881px) {
  .work-grid {
    gap: 20vw !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
  }
  
  .work-item {
    min-height: 380px !important;
    min-width: calc(75% * 380px) !important;
  }
}

/* Scale work items on screens smaller than 2K resolution */
@media screen and (max-width: 2560px) {
    .work-item.active-view {
        transform: scale(0.67);
        transform-origin: top center;
        margin: 0 auto;
        /* Add overflow handling to prevent scrollbars */
        overflow: auto;
        /* Adjust container height to account for scaling */
        height: 150%;
        /* Ensure content stays centered */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Adjust container to accommodate the scaled content */
    .work-item.active-view .work-content,
    .work-item.active-view .work-image {
        width: 150%;
        max-width: 150%;
    }
}

/* 缩放提示气泡样式 */
.zoom-suggestion {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.3);
    padding: 5px;
    z-index: 9999;
    max-width: 320px;
    backdrop-filter: blur(10px);
    display: none; /* 初始隐藏 */
    animation: fadeIn 0.5s ease-out;
    font-family: var(--font-main);
}

.zoom-content {
    padding: 15px;
    color: var(--text-color);
}

.zoom-content h3 {
    margin-top: 0;
    color: var(--accent-color);
    font-size: 18px;
    margin-bottom: 10px;
}

.zoom-content p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.zoom-apology {
    font-style: italic;
    opacity: 0.8;
    font-size: 13px !important;
    border-top: 1px solid rgba(var(--accent-color-rgb), 0.3);
    padding-top: 10px;
    margin-top: 15px !important;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}

.close-btn:hover {
    opacity: 1;
    color: var(--accent-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 第三张幻灯片特殊处理 */
.Lslide:nth-child(3) {
    min-height: 100%; /* 确保最小高度充满容器 */
}

/* 确保内容足够长，可触发滚动 */
.Lslide:nth-child(3) .Lslide-content::after {
    content: '';
    display: block;
    height: 1px; /* 非常小的高度，只为触发滚动 */
    margin-top: 20px; /* 添加一些底部间距 */
}

/* 外层容器 - 完全禁用滚动 */
.slideshow-left {
    width: 50%;
    height: 100%;
    overflow: hidden !important; /* 强制禁用滚动 */
    position: relative;
    box-sizing: border-box;
}

/* 幻灯片容器 - 也禁用滚动 */
.Lslide {
    width: 100%;
    height: 100%;
    overflow: hidden !important; /* 强制禁用滚动 */
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
}

/* 内容容器 - 只允许这一层滚动 */
.Lslide-content {
    width: 100%;
    height: 100%;
    overflow-y: auto !important; /* 强制启用纵向滚动 */
    box-sizing: border-box;
    padding: 40px;
}

/* 统一滚动条样式 */
.Lslide-content::-webkit-scrollbar {
    width: 4px;
}

.Lslide-content::-webkit-scrollbar-track {
    background: rgba(30, 39, 50, 0.1);
    border-radius: 4px;
}

.Lslide-content::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.5);
    border-radius: 4px;
}

/* 防止动画过渡时导致的布局变化 */
.slideshow-left,
.Lslide,
.Lslide-content {
    transition: transform 0.5s ease, opacity 0.5s ease !important;
    transition-property: transform, opacity !important;
}

