@font-face {
    font-family: "a";
    /*中文字体*/
    src: url();
    font-display: swap;
}

@font-face {
    font-family: "b";
    /*English font*/
    src: url();
    font-display: swap;
}

/* 粒子背景 */
#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* 酷炫背景特效层 */
.background-fx {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* 在粒子之下，在主内容之下 */
    overflow: hidden;
    pointer-events: none;
    opacity: 0.6; /* 默认浅色模式下稍微淡一点 */
    transition: opacity 0.5s ease;
    will-change: opacity; /* Performance optimization */
}

/* 动态流光 Orb */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 20s infinite ease-in-out alternate;
    will-change: transform; /* Performance optimization */
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(162, 210, 255, 0.8) 0%, rgba(205, 174, 255, 0) 70%);
    animation-delay: 0s;
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(255, 175, 204, 0.6) 0%, rgba(255, 200, 221, 0) 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(169, 222, 249, 0.5) 0%, rgba(214, 236, 255, 0) 70%);
    animation: floatOrb 15s infinite ease-in-out alternate-reverse;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 50px) scale(1.1); }
    100% { transform: translate(-20px, -30px) scale(0.95); }
}

/* 暗色模式下的流光 Orb */
html[data-theme="dark"] .background-fx {
    opacity: 1; /* 深色模式下更明显 */
}

html[data-theme="dark"] .orb-1 {
    background: radial-gradient(circle, rgba(65, 105, 225, 0.4) 0%, rgba(106, 90, 205, 0) 70%); /* RoyalBlue to SlateBlue */
}

html[data-theme="dark"] .orb-2 {
    background: radial-gradient(circle, rgba(255, 20, 147, 0.25) 0%, rgba(199, 21, 133, 0) 70%); /* DeepPink to MediumVioletRed */
}

html[data-theme="dark"] .orb-3 {
    background: radial-gradient(circle, rgba(0, 255, 255, 0.15) 0%, rgba(0, 206, 209, 0) 70%); /* Cyan to DarkTurquoise */
}

/* 流星特效 (Shooting Stars) - 仅在暗色模式显示 */
.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

html[data-theme="dark"] .star-field {
    opacity: 1;
}

.shooting-star {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 2px;
    background: linear-gradient(-45deg, rgba(255, 255, 255, 1), rgba(0, 0, 255, 0));
    border-radius: 999px;
    filter: drop-shadow(0 0 6px rgba(105, 155, 255, 1));
    animation: tail 3000ms ease-in-out infinite, shooting 3000ms ease-in-out infinite;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    right: 0;
    height: 2px;
    background: linear-gradient(-45deg, rgba(0, 0, 255, 0), rgba(255, 255, 255, 1), rgba(0, 0, 255, 0));
    transform: translateX(50%) rotateZ(45deg);
    border-radius: 100%;
    animation: shining 3000ms ease-in-out infinite;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    right: 0;
    height: 2px;
    background: linear-gradient(-45deg, rgba(0, 0, 255, 0), rgba(255, 255, 255, 1), rgba(0, 0, 255, 0));
    transform: translateX(50%) rotateZ(45deg);
    border-radius: 100%;
    animation: shining 3000ms ease-in-out infinite;
}

/* Configure different stars */
.shooting-star:nth-child(1) {
    top: 0;
    left: 50%;
    animation-delay: 2000ms;
}
.shooting-star:nth-child(1)::before, .shooting-star:nth-child(1)::after {
    animation-delay: 2000ms;
}

.shooting-star:nth-child(2) {
    top: 20%;
    left: 80%;
    animation-delay: 5000ms;
}
.shooting-star:nth-child(2)::before, .shooting-star:nth-child(2)::after {
    animation-delay: 5000ms;
}

@keyframes tail {
    0% { width: 0; }
    30% { width: 100px; }
    100% { width: 0; }
}

@keyframes shooting {
    0% { transform: translateX(0) translateY(0) rotateZ(45deg); }
    100% { transform: translateX(300px) translateY(300px) rotateZ(45deg); }
}

@keyframes shining {
    0% { width: 0; }
    50% { width: 30px; }
    100% { width: 0; }
}

:root {
    --main-bg-color: #f0f4f8; /* 更柔和的冷灰白 */
    --main-text-color: #2d3748; /* 深蓝灰，比纯黑更舒适 */
    --gradient-start: #4facfe;
    --gradient-middle: #a18cd1;
    --gradient-end: #fbc2eb;
    --purple-text-color: #667eea;
    --text-bg-color: #e2e8f0;
    --icon-bg-color: #edf2f7;
    --pop-up-box-shadow: rgba(0, 0, 0, 0.1);
    
    /* Glassmorphism Variables Light */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        inset 0 0 20px rgba(255, 255, 255, 0.5); /* 增加内发光提升通透感 */
    --glass-blur: blur(16px);

    --tab-button-bg-color: rgba(255, 255, 255, 0.5);
    --tab-button-hover-bg-color: rgba(255, 255, 255, 0.8);
    --tab-button-selected-bg-color: #667eea;
    --tab-button-text-color: #2d3748;
    
    --project-item-bg-color: rgba(255, 255, 255, 0.7);
    --project-item-hover-color: rgba(255, 255, 255, 0.9);
    
    --project-item-left-title-color: #1a202c;
    --project-item-left-text-color: #718096;
    --footer-text-color: #a0aec0;
    --footer-text-hover-color: #667eea;
    
    /* 交互动效变量 */
    --hover-transform: translateY(-4px) scale(1.01);
    --hover-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* {
    font-family: "b", "a", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* 优化全局过渡曲线为弹跳效果 */
}

a:hover,
a:link,
a:visited,
a:active,
a:focus {
    text-decoration: none;
    outline: none;
    color: inherit;
    border: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 交互动效增强 */
.projectItem {
    transition: var(--transition-bounce, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease);
}

/* 性能优化：主题切换期间禁用所有过渡动画 */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: none !important;
  animation: none !important;
}

.projectItem:hover {
    transform: var(--hover-transform);
    box-shadow: var(--hover-shadow);
    background: var(--project-item-hover-color);
    z-index: 2;
}

.tab-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.tab-button:active::after {
    width: 200px;
    height: 200px;
}

.icon {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.projectItem:hover .icon {
    transform: scale(1.15) rotate(5deg);
}

.gallery-item {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* 优化滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(136, 136, 136, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(136, 136, 136, 0.6);
}

::-webkit-scrollbar-track {
    background: transparent;
}


html[data-theme="dark"] {
    --main-bg-color: #0d1117; /* 极客深色背景 */
    --main-text-color: #c9d1d9;
    --gradient-start: #238636; /* GitHub 风格绿/蓝/紫渐变 */
    --gradient-middle: #2ea043;
    --gradient-end: #58a6ff;
    --purple-text-color: #58a6ff;
    --text-bg-color: #161b22;
    --icon-bg-color: #21262d;
    --pop-up-box-shadow: rgba(0, 0, 0, 0.5);
    
    /* Glassmorphism Variables Dark */
    --glass-bg: rgba(22, 27, 34, 0.75);
    --glass-border: rgba(240, 246, 252, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-blur: blur(20px);
    
    --tab-button-bg-color: rgba(22, 27, 34, 0.7);
    --tab-button-hover-bg-color: rgba(48, 54, 61, 0.8);
    --tab-button-selected-bg-color: #1f6feb;
    --tab-button-text-color: #f0f6fc;
    
    --project-item-bg-color: rgba(22, 27, 34, 0.75);
    --project-item-hover-color: rgba(33, 38, 45, 0.9);
    
    --project-item-left-title-color: #f0f6fc;
    --project-item-left-text-color: #8b949e;
    --footer-text-color: #484f58;
    --footer-text-hover-color: #58a6ff;
}


body {
    display: flex;
    height: 100%;
    min-height: 100vh;
    width: 100%;
    background: var(--main-bg-color);
    overflow-x: hidden;
    justify-content: center;
    color: var(--main-text-color);

}

#PageLoading {
    background: radial-gradient(white);
    background-size: 100%;
    background-position: center;
    background-color: #ffffff;
    height: 100%;
    width: 100%;
    position: fixed;
    z-index: 999999;
    margin-top: 0px;
    top: 0px;
    pointer-events: none;
    opacity: 1;
    transition: all 0.5s ease;
}

.object {
    -moz-border-radius: 50% 50% 50% 50%;
    -webkit-border-radius: 50% 50% 50% 50%;
    border-radius: 50% 50% 50% 50%;
    position: absolute;
    border-left: 5px solid #8887fa;
    border-right: 5px solid #FFC0CB;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    -webkit-animation: animate 2.5s infinite;
    animation: animate 2.5s infinite;
}

#object_one {
    width: 20%;
    height: 20%;
}

#object_two {
    width: 35%;
    height: 35%;
    -webkit-animation-delay: 0.1s;
    animation-delay: 0.1s;
}

#object_three {
    width: 45%;
    height: 45%;
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
}

#object_four {
    width: 55%;
    height: 55%;
    -webkit-animation-delay: 0.3s;
    animation-delay: 0.3s;
}

@-webkit-keyframes animate {
    50% {
        /*-ms-transform: rotate(180deg);*/
        /*-webkit-transform: rotate(180deg);*/
        /*transform: rotate(180deg);*/
    }

    100% {
        /*-ms-transform: rotate(0deg);*/
        /*-webkit-transform: rotate(0deg);*/
        /*transform: rotate(0deg);*/
    }
}

@keyframes animate {
    50% {
        /*-ms-transform: rotate(180deg);*/
        /*-webkit-transform: rotate(180deg);*/
        /*transform: rotate(180deg);*/
    }

    100% {
        /*-ms-transform: rotate(0deg);*/
        /*-webkit-transform: rotate(0deg);*/
        /*transform: rotate(0deg);*/
    }
}




.main {
    width: 100%;
    max-width: 1200px;
    position: relative;
    flex-direction: row;
}

.left {
    width: 250px;
    height: 100vh;
    display: flex;
    padding: 0 15px;
    position: fixed;
    align-items: center;
    flex-direction: column;
}

.left-main {
    width: 100%;
     height: 100vh;
    overflow-y: scroll;
    display: flex;
  
    align-items: center;
    flex-direction: column;

}

.left-main::-webkit-scrollbar {
   display: none;
}


.logo {
    flex-shrink: 0;
    width: 90%;
    position: relative;
    aspect-ratio: 1/1;
    margin-top: 50px;
    background-size: cover;
    border-radius: 50%;
    
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 4px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.logo:hover {
    transform: rotate(360deg) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--purple-text-color);
}



/* 侧边栏卡片优化 */
.left-div {
    flex-shrink: 0;
    width: 100%;
    border-radius: 16px; /* 更圆润 */
    margin-top: 15px;
    padding: 20px;
    background: var(--project-item-bg-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.3); /* 更通透的边框 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* 基础阴影 */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* 悬停时添加光泽扫描效果 */
.left-div::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
    pointer-events: none;
}

.left-div:hover::before {
    left: 100%;
}

.left-div:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
}

.left-des {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.left-div-item {
    display: flex;
    align-items: center;
    line-height: 20px;
    font-size: 15px;
    gap: 8px;
    overflow: hidden;
}

.left-tag {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
}

/* 标签样式优化 */
.left-tag-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 28px;
    padding: 5px 12px; /* 调整内边距 */
    font-size: 12px;
    font-weight: 500;
    border-radius: 14px; /* 胶囊状 */
    background: rgba(var(--purple-text-color-rgb), 0.1); /* 浅色背景 */
    color: var(--purple-text-color);
    border: 1px solid rgba(var(--purple-text-color-rgb), 0.2);
    transition: all 0.3s ease;
}

.left-tag-item:hover {
    background: var(--purple-text-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(108, 99, 255, 0.3);
}

/* 3D Cute Ball & Magic Effects */
.left-canvas {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    overflow: visible; /* Allow ball to float outside slightly */
}

.magic-ball-container {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 800px;
}

.magic-ball {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    /* 清新通透的 3D 玻璃质感 */
    background: radial-gradient(circle at 35% 35%, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(200, 230, 255, 0.8) 25%, 
        rgba(100, 180, 255, 0.6) 50%, 
        rgba(60, 100, 200, 0.8) 100%
    );
    box-shadow: 
        inset -15px -15px 30px rgba(0, 50, 100, 0.2),
        inset 10px 10px 20px rgba(255, 255, 255, 0.8),
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(150, 200, 255, 0.4);
    
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    
    animation: floatBall 4s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    overflow: hidden;
}

.magic-ball:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 
        inset -15px -15px 30px rgba(0, 50, 100, 0.25),
        inset 10px 10px 20px rgba(255, 255, 255, 0.9),
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(150, 200, 255, 0.6);
}

.magic-ball::after {
    /* 简化的流光效果 */
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 55%
    );
    transform: rotate(30deg);
    animation: shineFlow 5s infinite linear;
    pointer-events: none;
}

.magic-ball::before {
    /* 底部反光 */
    content: '';
    position: absolute;
    bottom: 8%;
    right: 15%;
    width: 50%;
    height: 25%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    filter: blur(8px);
    opacity: 0.8;
}

.ball-shine {
    /* 顶部高光 */
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30%;
    height: 18%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-radius: 50%;
    transform: rotate(-45deg);
    filter: blur(2px);
    opacity: 0.9;
    z-index: 2;
}

.ball-shine::after {
    display: none;
}

.ball-face {
    position: absolute;
    top: 55%; /* 稍微下移，让额头更大显得更可爱 */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 45px; /* 眼睛间距 */
    padding-bottom: 30px; 
}

.eye {
    position: relative;
    width: 20px; /* 眼睛变大 */
    height: 26px;
    background: #2c3e50;
    border-radius: 50%;
    animation: blink 4s infinite;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.eye::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px; /* 眼神光变大 */
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(calc(-50% + var(--pupil-x, 0px)), calc(-50% + var(--pupil-y, 0px))); /* 眼球跟随 */
}

.eye.eye-left, .eye.eye-right {
    transform: none;
    left: auto;
    right: auto;
}

.mouth {
    position: absolute;
    top: 58%; /* 嘴巴位置调整 */
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 12px;
    border-bottom: 3px solid #2c3e50;
    border-radius: 0 0 15px 15px;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* 悬停时嘴巴变化 */
.magic-ball:hover .mouth {
    height: 18px;
    width: 26px;
    background: #2c3e50;
    border-radius: 50% 50% 50% 50% / 0% 0% 100% 100%;
    border: none;
    transform: translateX(-50%) scale(1.1);
}

/* 增强的 Q 弹跳动效果 */
@keyframes bounceBall {
    0% { transform: scale(1) translateY(0); }
    30% { transform: scale(1.1, 0.9) translateY(10px); } /* 压扁 */
    50% { transform: scale(0.9, 1.1) translateY(-20px); } /* 拉长跳起 */
    70% { transform: scale(1.05, 0.95) translateY(5px); } /* 落地缓冲 */
    100% { transform: scale(1) translateY(0); }
}

.bounce-animation {
    animation: bounceBall 0.6s cubic-bezier(0.28, 0.84, 0.42, 1);
}

/* 点击时的表情变化 */
.ball-face.active .eye {
    height: 4px;
    border-radius: 2px;
    background: #2c3e50;
    animation: none; /* 停止眨眼 */
}

.ball-face.active .eye::after {
    display: none; /* 闭眼隐藏瞳孔 */
}

.ball-face.active .mouth {
    height: 18px;
    width: 24px;
    border-radius: 50%;
    background: #2c3e50;
    border: none;
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%); /* 半圆嘴 */
}

/* 爱心表情 (Love) */
.ball-face.love .eye {
    background: #ff5e78;
    border-radius: 0;
    height: 20px;
    width: 20px;
    animation: none;
    clip-path: path('M10,3.3 C10,3.3 6.6,0 3.3,0 C1.5,0 0,1.5 0,3.3 C0,6.6 10,16.6 10,16.6 C10,16.6 20,6.6 20,3.3 C20,1.5 18.5,0 16.7,0 C13.4,0 10,3.3 10,3.3 Z');
}
.ball-face.love .eye::after { display: none; }
.ball-face.love .mouth {
    height: 12px;
    width: 20px;
    border-radius: 50%;
    border-bottom: 3px solid #ff5e78;
    background: transparent;
}
.ball-face.love .blush {
    opacity: 0.8;
    transform: scale(1.2);
}

/* 晕眩表情 (Dizzy) */
.ball-face.dizzy .eye {
    height: 20px;
    width: 20px;
    background: transparent;
    border-radius: 0;
    border: 3px solid #2c3e50;
    border-top-color: transparent;
    animation: spinEye 0.5s linear infinite;
}
.ball-face.dizzy .eye::after { display: none; }
.ball-face.dizzy .mouth {
    height: 8px;
    width: 20px;
    background: transparent;
    border: 2px solid #2c3e50;
    border-radius: 10px;
    transform: rotate(15deg);
}
@keyframes spinEye {
    to { transform: rotate(360deg); }
}

/* 惊讶表情 (Shock) */
.ball-face.shock .eye {
    height: 28px;
    width: 28px;
    background: #fff;
    border: 3px solid #2c3e50;
    animation: none;
}
.ball-face.shock .eye::after {
    width: 6px;
    height: 6px;
    background: #2c3e50;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.ball-face.shock .mouth {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #2c3e50;
    border: none;
}

/* 视差悬浮动画 */
.magic-ball-container {
    transition: transform 0.1s ease-out;
}

.blush {
    position: absolute;
    top: 55%;
    width: 24px;
    height: 14px;
    background: rgba(255, 120, 120, 0.4);
    border-radius: 50%;
    filter: blur(4px);
}

/* 
   计算腮红位置以确保与眼睛对齐:
   眼睛间距 gap: 45px
   眼睛宽度: 20px
   中心到眼睛中心距离: 22.5 + 10 = 32.5px
   腮红中心应在 +/- 32.5px
   腮红宽度 24px -> left = 50% - 32.5px - 12px = 50% - 44.5px
*/
.blush.blush-left { 
    left: calc(50% - 45px);
}
.blush.blush-right { 
    right: calc(50% - 45px); /* 镜像对称 */
}

.ball-shadow {
    position: absolute;
    bottom: -10px;
    width: 140px;
    height: 25px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(6px);
    animation: shadowScale 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes shineFlow {
    0% { transform: translate(-50%, -50%) rotate(30deg); }
    100% { transform: translate(50%, 50%) rotate(30deg); }
}

/* View Transitions API 样式覆盖 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2147483646; /* 确保新视图在最上层 */
}

/* Dark Mode 适配 */
html[data-theme="dark"] .eye { background: #fff; }
html[data-theme="dark"] .mouth { border-bottom-color: #fff; }
html[data-theme="dark"] .magic-ball:hover .mouth { background: #fff; }
html[data-theme="dark"] .magic-ball:hover .mouth::after { background: #ff8da1; }
html[data-theme="dark"] .magic-ball {
    /* 暗黑模式下：发光的魔法球 */
    background: radial-gradient(circle at 35% 35%, 
        rgba(200, 220, 255, 0.9) 0%, 
        rgba(100, 150, 255, 0.6) 30%, 
        rgba(40, 60, 140, 0.8) 60%, 
        rgba(10, 20, 50, 0.95) 100%
    );
    box-shadow: 
        inset -15px -15px 30px rgba(0, 0, 0, 0.6),
        inset 10px 10px 20px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(100, 150, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.chat-bubble {
    position: absolute;
    top: -50px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    white-space: nowrap;
    z-index: 20;
}

.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.9) transparent transparent transparent;
}

.magic-ball-container:hover .chat-bubble {
    opacity: 1;
    transform: translateY(0) scale(1);
    top: -60px;
}

/* Animations */
@keyframes floatBall {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes shadowScale {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(0.8); opacity: 0.1; }
}

@keyframes pulseGlow {
    from { opacity: 0.5; transform: scale(1); }
    to { opacity: 0.8; transform: scale(1.1); }
}

@keyframes blink {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}

/* Dark Mode Adjustments */
html[data-theme="dark"] .chat-bubble {
    background: rgba(30, 30, 40, 0.9);
    color: #fff;
}
html[data-theme="dark"] .chat-bubble::after {
    border-color: rgba(30, 30, 40, 0.9) transparent transparent transparent;
}

#line {
    width: 100%;
    height: 200px;
    font-size: 13px;
    padding-left: 10px;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

/* 时间线样式优化 */
#line li {
    list-style: none;
    position: relative;
    padding: 15px 0px 10px 20px;
    border-left: 2px solid rgba(173, 190, 255, 0.5);
    margin-left: 10px;
}

.focus {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--purple-text-color);
    border: 3px solid var(--project-item-bg-color); /* 增加边框使其与线分离 */
    position: absolute;
    left: -7px;
    top: 20px;
    box-shadow: 0 0 0 2px rgba(141, 161, 255, 0.3);
    transition: all 0.3s ease;
}

#line li:hover .focus {
    background-color: #ff5e78;
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(255, 94, 120, 0.2);
}

#line li div:nth-child(2) { /* 日期 */
    font-size: 12px;
    color: var(--main-text-color);
    opacity: 0.7;
    margin-bottom: 4px;
}

#line li div:nth-child(3) { /* 事件 */
    font-size: 14px;
    font-weight: 600;
    color: var(--main-text-color);
}

#line li:first-child .focus:first-child {
    background-color: #2ecc71;
    animation: focus 1.8s ease infinite;
}
#line::-webkit-scrollbar {
   display: none;
}
.left-title {
    font-size: 20px;
    margin-top: 30px;
}


.right {
    width: calc(100% - 250px);
    display: flex;
    padding: 25px;
    position: relative;
    float: right;
    flex-direction: column;
}

.welcome {

    font-size: 55px;
    font-weight: 800;
    margin: 30px 0;
}

.description {

    font-size: 20px;
    margin-top: 7px;
}

.gradientText {

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200%;
    background-position: 0%;
    animation: backgroundSizeAnimation 5s ease-in-out infinite;
    background-image: linear-gradient(120deg, var(--gradient-start, #bd34fe), var(--gradient-middle, #e0321b) 30%, var(--gradient-end, #41d1ff) 60%);
}

@keyframes backgroundSizeAnimation {
    0% {
        background-position: 100%;
    }

    25% {
        background-position: 50%;
    }

    50% {
        background-position: 0%;
    }

    75% {
        background-position: 50%;
    }

    100% {
        background-position: 100%;
    }

}

.purpleText {
    color: var(--purple-text-color);
    font-weight: 800;
}

.textBackground {
    font-weight: 800;
    background: var(--text-bg-color);
    border-radius: 5px;
    font-size: 15px;
    padding: 3px 5px;

}

/* 幽默名言组件 */
.funny-quotes-container {
    margin-top: 15px;
    font-size: 14px;
    font-style: italic;
    color: var(--project-item-left-text-color);
    min-height: 20px;
    max-width: 90%;
    opacity: 0.8;
}

#funny-quote {
    transition: opacity 0.3s ease;
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--purple-text-color);
    animation: blinkCursor 0.8s infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.iconContainer {
    width: 100%;
    gap: 8px;
    height: 60px;
    display: flex;
    align-items: center;
    overflow-x: scroll;
    margin-top: 20px;

}

.iconContainer::-webkit-scrollbar {
   display: none;
}



.iconItem {
    width: 44px;
    height: 40px;
    box-sizing: border-box;
    background: var(--icon-bg-color);
    border-radius: 7px;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.iconItemLong {
    width: 80px;
    height: 40px;
    box-sizing: border-box;
    background: var(--icon-bg-color);
    border-radius: 7px;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.switch {
    width: 55px;
    display: flex;
}

.iconTip {
    white-space: nowrap;
    display: flex;
}


.iconItemLong:nth-child(1):hover {
    background: var(--icon-1-hover-color);
}

.iconItem:nth-child(2):hover {
    background: var(--icon-2-hover-color);
}

.iconItem:nth-child(3):hover {
    background: var(--icon-3-hover-color);
}

.iconItem:nth-child(4):hover {
    background: var(--icon-4-hover-color);
}

.iconItem:nth-child(5):hover {
    background: var(--icon-5-hover-color);
}

/* .iconItem:nth-child(6):hover {
    background: var(--icon-6-hover-color);
} */

.iconItem:hover .iconTip {
    display: block;
}

.switch:hover {
    width: 55px;

    background: var(--icon-6-hover-color);
}

.tanChiShe {
    width: 85%;
    margin: 20px auto 0; /* 居中并增加顶部间距 */
    transition: transform 0.4s ease;
}

.tanChiShe img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.tanChiShe:hover {
    transform: translateY(-5px);
}

.tanChiShe:hover img {
    filter: drop-shadow(0 12px 20px rgba(0,0,0,0.15));
}

.title {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 26px;
    font-weight: 800;
    margin: 20px 0;
    transition: all 0.4s ease;
}

.title:hover {
    /*transform: translateY(-5px);*/
}

/* Tab 按钮优化 */
.button-container {
    display: flex;
    gap: 10px; /* 间距调整 */
    margin: 30px 0;
    align-items: center;
    padding: 6px;
    background: rgba(255, 255, 255, 0.2); /* 更淡的背景 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px; /* 更大的圆角 */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tab-button {
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.but-active {
    background: linear-gradient(135deg, var(--purple-text-color), #8e8aff); /* 渐变背景 */
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
    transform: translateY(-1px);
}

/* 音乐播放器优化 */
.music-player {
    display: flex;
    align-items: center;
    background: var(--project-item-bg-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    gap: 20px;
}

.music-image-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.music-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* 圆形唱片 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.5s linear; /* 旋转动画基础 */
}

/* 播放时旋转 */
.music-player.playing .music-cover {
    animation: spinRecord 10s linear infinite;
}

@keyframes spinRecord {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
    background: linear-gradient(90deg, var(--main-text-color), var(--purple-text-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--main-text-color);
    opacity: 0.7;
    transition: all 0.2s;
}

.control-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--purple-text-color);
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(108, 99, 255, 0.3);
    opacity: 1;
}

.play-btn:hover {
    transform: scale(1.1) rotate(90deg); /* 播放按钮趣味旋转 */
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--project-item-left-text-color);
    width: 100%;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(136, 136, 136, 0.2);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--purple-text-color), #ff9a9e);
    border-radius: 3px;
    width: 0%;
    position: relative;
}

/* 进度条末端光点 */
.progress::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* 定义RGB变量以便使用 rgba */
:root {
    --purple-text-color-rgb: 102, 126, 234; /* #667eea */
}

.tab-button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--project-item-left-text-color);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.tab-button:not(.but-active):hover {
    background: var(--tab-button-hover-bg-color);
    color: var(--tab-button-text-color);
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
}

.but-active {
    background: var(--purple-text-color);
    color: white;
    /* box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3); */
}

.but-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    pointer-events: none;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.content-active {
    display: block;
}

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

/* 个人简介 (Intro) 优化 */
.intro-content {
    animation: fadeIn 0.8s ease-out;
    background: var(--project-item-bg-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid var(--glass-border);
}

.about-content {
    background: var(--project-item-bg-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid var(--glass-border);
}

.intro-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--main-text-color);
    background: rgba(var(--purple-text-color-rgb), 0.05);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--purple-text-color);
    margin-bottom: 25px;
}

.intro-content h3 {
    margin: 30px 0 15px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--main-text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.intro-content h3::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: linear-gradient(to bottom, var(--purple-text-color), #ff9a9e);
    border-radius: 3px;
}

.intro-ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.intro-ul li {
    background: var(--project-item-bg-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    font-size: 15px;
    color: var(--project-item-left-text-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.intro-ul li:hover {
    transform: translateX(5px) translateY(-2px);
    background: var(--project-item-hover-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: rgba(var(--purple-text-color-rgb), 0.3);
}

/* 列表项前的装饰点 */
.intro-ul li::before {
    content: '🔹';
    margin-right: 10px;
    font-size: 12px;
    vertical-align: middle;
    opacity: 0.8;
}

/* 特殊高亮链接 */
.highlight-link {
    color: var(--purple-text-color);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.highlight-link:hover {
    background: rgba(var(--purple-text-color-rgb), 0.1);
    text-decoration: none;
}

/* 荣誉列表特殊样式：交错动画 */
.intro-ul li {
    animation: slideInRight 0.5s ease-out backwards;
}

/* 为前20个列表项设置交错延迟 */
.intro-ul li:nth-child(1) { animation-delay: 0.05s; }
.intro-ul li:nth-child(2) { animation-delay: 0.1s; }
.intro-ul li:nth-child(3) { animation-delay: 0.15s; }
.intro-ul li:nth-child(4) { animation-delay: 0.2s; }
.intro-ul li:nth-child(5) { animation-delay: 0.25s; }
.intro-ul li:nth-child(6) { animation-delay: 0.3s; }
.intro-ul li:nth-child(7) { animation-delay: 0.35s; }
.intro-ul li:nth-child(8) { animation-delay: 0.4s; }
.intro-ul li:nth-child(9) { animation-delay: 0.45s; }
.intro-ul li:nth-child(10) { animation-delay: 0.5s; }

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

/* 优雅的自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(162, 162, 162, 0.4);
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-text-color);
}

/* Page Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--main-bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(108, 99, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--purple-text-color);
    animation: spin 1s ease-in-out infinite;
}

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

.hidden {
    opacity: 0;
    visibility: hidden;
}

/* 优化 Tab 内容渲染性能 */
.tab-content {
    content-visibility: auto; /* 仅渲染可见内容 */
    contain-intrinsic-size: 1px 500px; /* 防止布局偏移 */
}

/* FAQ Styles */
.faq-container {
    margin: 20px 0;
}

.faq-item {
    background: var(--project-item-bg-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid var(--glass-border);
}

.faq-item:hover {
    background: var(--project-item-hover-color); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    color: var(--main-text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
}

/* 点击时的波纹效果需要配合 JS 实现，这里仅做 hover 优化 */
.faq-question:active {
    background: rgba(0, 0, 0, 0.05);
}

.faq-question span {
    flex: 1;
    margin-right: 15px;
    font-size: 16px;
    line-height: 1.4;
}

.faq-arrow {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* 弹跳动画 */
    color: var(--purple-text-color);
    opacity: 0.7;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg) scale(1.2);
    color: var(--purple-text-color);
    opacity: 1;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.3s ease;
    background: rgba(var(--project-item-color-rgb), 0.3); /* 稍微变深一点 */
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* 增加最大高度以适应更多内容 */
    padding: 0 20px 20px 20px;
    opacity: 1;
}

.faq-answer p {
    margin: 0;
    line-height: 1.8;
    color: var(--project-item-left-text-color);
    font-size: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(136, 136, 136, 0.2);
}

/* .faq-answer a {
    color: var(--purple-text-color);
    text-decoration: underline;
    transition: all 0.25s ease;
}

.faq-answer a:hover {
    color: #b0b4f7;
} */

.intro-content p, .about-content p {
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--project-item-left-text-color);
}

.intro-content p:first-child, .about-content p:first-child {
    margin-top: 0;
}

.intro-content p:last-child, .about-content p:last-child {
    margin-bottom: 0;
}

.intro-ul {
    padding-left: 20px; 
    margin: 12px 0;
    font-size: 16px;
    line-height: 2;
    color: var(--project-item-left-text-color);
    list-style-type: disc; 
}

.highlight-text {
    color: var(--purple-text-color);
    font-weight: 500;
}

.highlight-link {
    color: var(--purple-text-color) !important;
    text-decoration: underline !important;
    transition: all 0.25s ease;
}

.highlight-link:hover {
    color: #b0b4f7 !important;
}

.projectList {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 5px;
}

.projectItem {
    display: flex;
    background-color: var(--project-item-bg-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 18px;
    height: 105px;
    width: calc(50% - 60px);
}


.projectItem:hover {
    box-shadow: 0 8px 16px -4px #2c2d300c;
    background-color: var(--project-item-hover-color);
}



.projectItemLeft p {
    font-size: 13px;
    margin-top: 5px;
    color: var(--project-item-left-text-color);
}

.projectItemLeft h1 {
    font-weight: normal;
    font-size: 18px;
    margin: 0px;

    transition: all 0.4s ease;
    color: var(--project-item-left-title-color);
}

.projectItemLeft {
    transition: all 0.4s ease;
    height: 100%;
    width: 80%;
}


.projectItemRight {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20%;
    height: 100%;
}

.projectItemRight img {
    height: 44px;
    width: 44px;

}

.skill {
    padding: 25px;
    width: 100%;
}

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

.skill #skillWap {
    display: none;
}

footer {
    padding: 5px;
    color: var(--footer-text-color);
    font-size: 13px;
    margin-top: 20px;
}

.footer-links {
    color: var(--footer-text-color);
}

.footer-links:hover {
    color: var(--footer-text-hover-color);
    transition: 0.3;
}




@media (max-width: 1000px) {

    .projectItem {
        width: calc(100% - 25px);
    }


  


}

@media (max-width: 800px) {


    .right {
        width: 100%;
    }
.tanChiShe {
    width: 100%;
}
    .description {
        font-size: 16px;
    }

    .welcome {
        font-size: 48px;

    }

    .button-container {
        margin: 20px 0;
        padding: 6px;
        gap: 8px;
    }

    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 40px;
    }

    .projectItemLeft p {
        font-size: 14px;
    }

    .projectItemLeft h1 {

        font-size: 15px;
    }

    .projectItem:hover h1 {

        /* font-size: 20px; */

    }

    .projectList {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .skill #skillWap {
        display: block;
    }

    .skill #skillPc {
        display: none;
    }

    /* FAQ Mobile Styles */
    .faq-question {
        padding: 16px;
        font-size: 14px;
    }

    .faq-answer {
        font-size: 14px;
    }

    .faq-item.active .faq-answer {
        padding: 0 16px 16px 16px;
    }

    .left {
        position: fixed;
        z-index: 9999;
        padding: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        background: none;
        transition: all 0.3s linear;
    }

    .left-main {
        position: absolute;
        float: left;
        width: 60vw;
        /*侧边栏+按钮宽度*/
        left: -60vw;
        /*侧边栏隐藏在屏外宽度*/
        padding: 15px;
        box-sizing: border-box;
        background: var(--main-bg-color);
        transition: all 0.25s ease-out;
    }

 

    .left-open {
        pointer-events: auto;
        background: rgba(100, 100, 100, 0.5);
    }


    .left-main-open {
        left: 0;
    }

}





.pop-up {
    position: fixed;
    display: flex;
    visibility: hidden;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.pop-up-main {
    z-index: 100000;
    width: 80%;
    max-width: 300px;
    /* 根据需要调整最大宽度 */
    min-height: 200px;
    background-color: #ffffff;
    border-radius: 12px;
    opacity: 0;
    display: flex;
    transition: all 0.15s linear;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--pop-up-box-shadow);
    /*transform: translateY(20%);*/
}


.pop-up-img {
    width: 100%;
    height: 100%;
}

/* Gallery Styles */
.gallery-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: var(--project-item-bg-color);
    color: var(--main-text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--purple-text-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    min-height: 200px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    background: var(--project-item-bg-color);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    font-size: 12px;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--project-item-left-text-color);
    background: var(--project-item-bg-color);
    border-radius: 12px;
    border: 1px dashed var(--glass-border);
}

.pop-up.active {
    visibility: visible;
}

.pop-up-main.active {
    opacity: 1;
    /*transform: translateY(0);*/
}

.pop-up-close {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    box-shadow: 0 4px 16px var(--pop-up-box-shadow);
    background-color: var(--project-item-bg-color);
    margin-top: 30px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s linear;
}

.pop-up-close.active {
    opacity: 1;
}







.onoffswitch {
    position: relative;
    width: 38px;
    height: 20px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.onoffswitch-checkbox {
    display: none;
}

.onoffswitch-label {
    display: block;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
    border-radius: 50px;
}

.onoffswitch-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200%;
    height: 100%;
    margin-left: -100%;
    transition: margin 0.2s ease-in 0s;
}

.onoffswitch-inner:before,
.onoffswitch-inner:after {
    display: flex;
    justify-content: center;
    align-items: center;
    float: left;
    width: 50%;
    height: 100%;
    padding: 0;
    font-size: 12px;
    color: white;
    font-family: Trebuchet, Arial, sans-serif;
    font-weight: bold;
    box-sizing: border-box;
}

.onoffswitch-inner:before {
    content: "";
    background-color: #e4e4e4;
    color: #FFFFFF;
    text-align: left;
}

.onoffswitch-inner:after {
    content: "";
    background-color: #272727;
    color: #FAFAFA;
    text-align: right;
}

.onoffswitch-switch {
    display: block;
    height: 70%;
    aspect-ratio: 1/1;
    background: #FFFFFF;
    position: absolute;
    top: 12.5%;
    bottom: 12.5%;
    right: 5px;

    border-radius: 20px;
    transition: all 0.2s ease-in 0s;
}

.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner {
    margin-left: 0;
}

.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch {
    right: 50%;
}

.tab-button, .button-container button {
    -webkit-tap-highlight-color: transparent;
}

/* 音乐播放器样式 */
.music-player {
    background: var(--project-item-bg-color);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    max-width: 780px;
    width: 100%;
    min-height: 170px;
}

.music-player:hover {
    box-shadow: 0 6px 24px var(--pop-up-box-shadow);
    transform: translateY(-2px);
}

/* 左边：固定大小的图片容器 */
.music-image-container {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--border-color);
    position: relative;
}

.music-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 音频可视化效果 */
.audio-visualizer {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
    padding: 0 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.visualizer-bar {
    width: 4px;
    background: linear-gradient(to top, 
        #ff6b6b 0%, 
        #feca57 30%, 
        #48dbfb 60%, 
        #ff9ff3 100%);
    border-radius: 2px;
    transition: height 0.1s ease;
    animation: visualizer-pulse 1.5s ease-in-out infinite;
}

.visualizer-bar:nth-child(1) { animation-delay: 0s; }
.visualizer-bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer-bar:nth-child(3) { animation-delay: 0.2s; }
.visualizer-bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer-bar:nth-child(5) { animation-delay: 0.4s; }
.visualizer-bar:nth-child(6) { animation-delay: 0.5s; }
.visualizer-bar:nth-child(7) { animation-delay: 0.6s; }
.visualizer-bar:nth-child(8) { animation-delay: 0.7s; }
.visualizer-bar:nth-child(9) { animation-delay: 0.8s; }
.visualizer-bar:nth-child(10) { animation-delay: 0.9s; }

@keyframes visualizer-pulse {
    0%, 100% {
        height: 8px;
        opacity: 0.6;
    }
    50% {
        height: 25px;
        opacity: 1;
    }
}

/* 右边：播放器控制区域 */
.music-player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.music-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.music-info h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--main-text-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-info p {
    font-size: 18px;
    color: var(--project-item-left-text-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.control-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--icon-bg-color);
    color: var(--main-text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    font-size: 18px;
}

.control-btn:hover {
    background: var(--tab-button-hover-bg-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.play-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-middle));
    color: white;
    font-size: 22px;
}

.play-btn:hover {
    background: linear-gradient(135deg, var(--gradient-middle), var(--gradient-end));
    transform: translateY(-2px);
}

.progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 16px;
    color: var(--project-item-left-text-color);
    width: 100%;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-middle));
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .music-player {
        padding: 15px;
        gap: 15px;
    }
    
    .music-image-container {
        width: 60px;
        height: 60px;
    }
    
    .music-player-controls {
        gap: 10px;
    }
    
    .control-buttons {
        gap: 12px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .play-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .music-info h3 {
        font-size: 14px;
    }
    
    .music-info p {
        font-size: 12px;
    }
    
    .progress-container {
        font-size: 11px;
        gap: 8px;
    }
}
/* Particles Background */
#tsparticles {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}
