/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-pink: #ff6b9d;
    --secondary-pink: #ffb3d1;
    --light-pink: #ffe6f0;
    --white: #ffffff;
    --light-gray: #fff5f9; /* 改为淡粉色 */
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    /* 点缀色 - 淡蓝色和淡紫色 */
    --accent-blue: #a8d8ea;
    --accent-purple: #d4a5f7;
    --accent-yellow: #ffeaa7;
    /* 统一背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #fff5f9;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* 首页部分 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 50px 20px 100px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
    animation: backgroundShift 15s ease-in-out infinite;
    z-index: 1;
}

@keyframes backgroundShift {
    0%, 100% {
        background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
    }
    50% {
        background: linear-gradient(135deg, #fff5f9 0%, var(--light-gray) 100%);
    }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
    will-change: transform, opacity;
}

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

/* MindMarket 风格的淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* 视差滚动效果 */
.parallax-slow {
    transition: transform 0.1s ease-out;
}

.parallax-fast {
    transition: transform 0.1s ease-out;
}

/* 头像框样式 */
.avatar-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    animation: avatarFloat 3s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.avatar-frame {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, #d0d0d0, #e8e8e8);
    animation: avatarRotate 8s linear infinite;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

@keyframes avatarRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d0d0d0, #e8e8e8);
    opacity: 0.2;
    animation: avatarPulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes avatarPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

.avatar-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: var(--white);
    z-index: 1;
}

.avatar-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    transition: transform 0.3s ease;
}

.avatar-image {
    cursor: pointer;
}

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

/* 表情流星动画 */
.emoji-popup {
    position: absolute;
    font-size: 2.5rem;
    pointer-events: none;
    z-index: 1000;
    user-select: none;
    will-change: transform, opacity;
}
/* 流星飞向头像的动画 */
@keyframes emojiMeteor
{
    0%
    {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    80%
    {
        opacity: 1;
        transform: scale(1.5) rotate(360deg);
    }
    90% {
        opacity: 1;
        transform: scale(2) rotate(450deg);
    }
    100%
    {
        opacity: 0;
        transform: scale(0) rotate(540deg);
    }
}
/* 消失特效 - 爆炸效果 */
@keyframes emojiExplode {
    0%
    {
        opacity: 1;
        transform: scale(2);
        filter: brightness(1) blur(0px);
    }
    50%
    {
        opacity: 0.8;
        transform: scale(3);
        filter: brightness(2) blur(2px);
    }
    100%
    {
        opacity: 0;
        transform: scale(4);
        filter: brightness(3) blur(5px);
    }
}
/* 消失特效 - 闪烁效果 */
@keyframes emojiFlicker {
    0%, 100% {
        opacity: 1;
        transform: scale(2);
    }
    25%
    {
        opacity: 0.3;
        transform: scale(2.2);
    }
    50% {
        opacity: 1;
        transform: scale(2);
    }
    75% {
        opacity: 0.5;
        transform: scale(2.1);
    }
}

.emoji-popup.exploding {
    animation: emojiExplode 0.4s ease-out forwards;
}

.emoji-popup.flickering {
    animation: emojiFlicker 0.3s ease-out forwards;
}

/* 头像闪光点 */
.avatar-sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 3;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle-1 {
    top: 20px;
    right: 30px;
    animation-delay: 0s;
}

.sparkle-2 {
    bottom: 30px;
    left: 25px;
    animation-delay: 0.7s;
}

.sparkle-3 {
    top: 50%;
    right: 10px;
    animation-delay: 1.4s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.text-gradient {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
}

/* 点缀色应用 - 5%占比 */
.name-highlight {
    display: block;
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 0.5rem;
    position: relative;
}

.name-highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-pink), var(--secondary-pink));
    border-radius: 2px;
    opacity: 0.7;
}

.name-highlight {
    display: block;
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
    animation: buttonBreathe 3s ease-in-out infinite;
}

@keyframes buttonBreathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-primary {
    background: var(--text-dark);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: none;
    background: #1a1a1a;
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
}

/* 按钮光泽效果 */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover .btn-shine {
    left: 100%;
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: none;
}

.btn-secondary:active {
    transform: translateY(-1px) scale(1.02);
}

/* 按钮涟漪效果 */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0);
    animation: ripple 2s ease-out infinite;
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    margin-top: -50px;
    margin-left: -50px;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 下滑提示 */
.scroll-down-indicator {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: scrollDownBounce 2s ease-in-out infinite, scrollDownFade 3s ease-in-out infinite;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.scroll-down-indicator:hover {
    animation-play-state: paused;
    opacity: 1;
}

.scroll-down-arrow {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-pink);
    font-size: 32px;
    animation: scrollDownArrow 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(255, 107, 157, 0.3));
}

.scroll-down-text {
    font-size: 16px;
    color: var(--primary-pink);
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(255, 107, 157, 0.2);
}

@keyframes scrollDownBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(12px);
    }
}

@keyframes scrollDownFade {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes scrollDownArrow {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.9;
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

/* 装饰圆圈 */
.hero-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    animation: float 6s ease-in-out infinite;
    filter: blur(1px);
    will-change: transform;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: #999;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation: float 8s ease-in-out infinite, rotate 20s linear infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background: #bbb;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
    animation: float 7s ease-in-out infinite, rotate 25s linear infinite reverse;
}

/* 可交互的背景元素 */
.interactive-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.interactive-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-pink);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4;
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.3);
    animation: dotPulse 3s ease-in-out infinite;
}

.interactive-dot.dot-1 { animation-delay: 0s; }
.interactive-dot.dot-2 { animation-delay: 0.6s; }
.interactive-dot.dot-3 { animation-delay: 1.2s; }
.interactive-dot.dot-4 { animation-delay: 1.8s; }
.interactive-dot.dot-5 { animation-delay: 2.4s; }

.interactive-dot:hover {
    transform: scale(2);
    opacity: 0.8;
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.6);
}

.interactive-dot:active {
    transform: scale(2.5);
    opacity: 1;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.6;
    }
}

/* Dock 导航栏样式 */
.dock-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 107, 157, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(255, 107, 157, 0.1);
    pointer-events: all;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dock:hover {
    box-shadow: 0 12px 40px rgba(255, 107, 157, 0.2),
                0 0 0 2px rgba(255, 107, 157, 0.15);
}

.dock-icon {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: transparent;
}

.dock-icon i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dock-icon:hover {
    background: rgba(255, 107, 157, 0.1);
    color: var(--primary-pink);
}

.dock-icon:hover i {
    transform: scale(1.1);
}

.dock-icon.active {
    background: linear-gradient(135deg, var(--light-pink), rgba(255, 107, 157, 0.1));
    color: var(--primary-pink);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.dock-divider {
    width: 1px;
    height: 32px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 4px;
}

/* Dock 图标放大效果 */
.dock-icon {
    transform-origin: center bottom;
}

.dock-icon.magnified {
    transform: scale(1.4);
    z-index: 10;
}

/* Canvas 粒子容器 - 仅在首页 */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    overflow: hidden;
}

.particles-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
    }
    33% {
        transform: translateY(-20px) translateX(10px) scale(1.05);
    }
    66% {
        transform: translateY(10px) translateX(-10px) scale(0.95);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* 通用部分样式 */
section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 如果JavaScript加载，初始状态为隐藏 */
.js-loaded .section-title {
    opacity: 0;
    transform: translateY(20px);
}

.js-loaded .section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-pink), var(--secondary-pink));
    border-radius: 2px;
    opacity: 0.8;
}

/* 关于部分 */
.about {
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
}

/* 高亮文本样式 - 参考 highlighter.tsx */
.highlighter-text {
    position: relative;
    display: inline-block;
    background: transparent;
    padding: 2px 4px;
    margin: 0 2px;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 如果JavaScript加载，初始状态为隐藏 */
.js-loaded .about-content {
    opacity: 0;
    transform: translateY(30px);
}

.js-loaded .about-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-text {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1rem;
}

/* 移除关于我部分的列表标记 */
.about-text ul {
    list-style: none;
    padding-left: 0;
}

.about-text li {
    list-style: none;
    padding-left: 0;
}

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-tag {
    padding: 8px 20px;
    background: var(--light-pink);
    color: var(--primary-pink);
    border-radius: 20px;
    font-weight: 500;
    border: 2px solid rgba(255, 107, 157, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpStagger 0.6s ease-out forwards;
}

.skill-tag:nth-child(1) { animation-delay: 0.1s; }
.skill-tag:nth-child(2) { animation-delay: 0.2s; }
.skill-tag:nth-child(3) { animation-delay: 0.3s; }
.skill-tag:nth-child(4) { animation-delay: 0.4s; }
.skill-tag:nth-child(5) { animation-delay: 0.5s; }

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

.skill-tag:hover {
    background: var(--primary-pink);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    border-color: var(--primary-pink);
}

/* 项目部分 */
.projects {
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
    border: 1px solid rgba(255, 107, 157, 0.1);
}

/* 如果JavaScript加载，初始状态为隐藏 */
.js-loaded .project-card {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
}

.js-loaded .project-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
    border-color: var(--primary-pink);
    border-width: 2px;
}

.project-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    background: var(--light-gray);
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

/* Hero Video 按钮样式 - 参考 hero-video-dialog.tsx */
.hero-video-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: filter 0.2s ease-out;
    filter: blur(2px); /* 轻微模糊效果 */
}

.hero-video-btn:hover .hero-video-thumbnail {
    filter: blur(1px) brightness(0.8);
}

.hero-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: scale(0.9);
    transition: transform 0.2s ease-out;
}

.hero-video-btn:hover .hero-play-overlay {
    transform: scale(1);
}

.hero-play-bg {
    width: 112px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease-out;
}

.hero-video-btn:hover .hero-play-bg {
    background: rgba(255, 107, 157, 0.2);
}

.hero-play-button {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.3), rgba(255, 107, 157, 0.5));
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 3px rgba(0, 0, 0, 0.07), 0 2px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-out;
    padding-left: 4px; /* 视觉居中 */
    transform: scale(1);
}

.hero-video-btn:hover .hero-play-button {
    transform: scale(1.2);
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.5), rgba(255, 107, 157, 0.7));
}

/* 视频对话框样式 */
.video-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-dialog.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.video-dialog-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.video-dialog-content {
    position: relative;
    width: 90%;
    max-width: 896px;
    aspect-ratio: 16 / 9;
    z-index: 1;
    transform: scale(0.5);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
}

.video-dialog.active .video-dialog-content {
    transform: scale(1);
    opacity: 1;
}

.video-dialog-close {
    position: absolute;
    top: -64px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-dialog-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.video-dialog-iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-dialog-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-dialog-iframe-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

/* 确保视频元素可见 */
#video-dialog-video[style*="display: block"] {
    display: block !important;
}

/* 动画变体 */
.video-dialog-content.from-bottom {
    transform: translateY(100%);
}

.video-dialog.active .video-dialog-content.from-bottom {
    transform: translateY(0);
}

.video-dialog-content.from-top {
    transform: translateY(-100%);
}

.video-dialog.active .video-dialog-content.from-top {
    transform: translateY(0);
}

.video-dialog-content.from-left {
    transform: translateX(-100%);
}

.video-dialog.active .video-dialog-content.from-left {
    transform: translateX(0);
}

.video-dialog-content.from-right {
    transform: translateX(100%);
}

.video-dialog.active .video-dialog-content.from-right {
    transform: translateX(0);
}

.video-dialog-content.fade {
    transform: scale(1);
    opacity: 0;
}

.video-dialog.active .video-dialog-content.fade {
    opacity: 1;
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-pink);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.project-link:hover {
    color: var(--secondary-pink);
    transform: translateX(5px);
}

.project-link i {
    font-size: 0.9rem;
}

/* 联系部分 */
.contact {
    background: var(--white);
}

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

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--light-gray);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 如果JavaScript加载，初始状态为隐藏 */
.js-loaded .social-link {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
}

.js-loaded .social-link.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.social-link:nth-child(1) { transition-delay: 0.1s; }
.social-link:nth-child(2) { transition-delay: 0.2s; }
.social-link:nth-child(3) { transition-delay: 0.3s; }
.social-link:nth-child(4) { transition-delay: 0.4s; }
.social-link:nth-child(5) { transition-delay: 0.5s; }
.social-link:nth-child(6) { transition-delay: 0.6s; }

.social-link:hover {
    background: var(--text-dark);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.social-link i {
    font-size: 2rem;
}

.social-link span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* 页脚 */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        min-width: 100px;
        padding: 1rem 1.5rem;
    }

    .avatar-frame {
        width: 150px;
        height: 150px;
    }

    .circle-1,
    .circle-2 {
        display: none;
    }

    .interactive-dot {
        width: 10px;
        height: 10px;
    }
}

/* 平滑滚动增强 */
html {
    scroll-behavior: smooth;
}

/* 性能优化 */
* {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 优化动画性能 */
.project-card,
.social-link,
.about-content,
.section-title {
    will-change: transform, opacity;
}

/* 选中文本样式 */
::selection {
    background: var(--light-gray);
    color: var(--text-dark);
}

/* 响应式 - 底部导航栏 */
@media (max-width: 768px) {
    /* Dock 响应式 */
    .dock-container {
        bottom: 15px;
    }

    .dock {
        padding: 10px 16px;
        gap: 6px;
    }

    .dock-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .dock-divider {
        height: 24px;
    }
}

/* 启动特效 */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    visibility: visible;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: splashFadeIn 1s ease-out;
}

.splash-logo {
    margin-bottom: 2rem;
    animation: splashScale 1.2s ease-out;
}

.splash-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-pink);
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.3);
}

.splash-text {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    animation: splashTextFadeIn 1s ease-out 0.3s both;
}

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

@keyframes splashScale {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* 拍一拍照片展示部分 - Marquee 水平滚动效果 */
.photos {
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
    padding: 80px 0;
    overflow: hidden;
}

.photos .section-title {
    position: relative;
    z-index: 10;
    margin-bottom: 3rem;
}

.marquee-demo-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    gap: 1rem;
}

.marquee-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: fit-content;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    /* 动画由 JavaScript 动态设置 */
}

.marquee-row-reverse {
    /* 动画由 JavaScript 动态设置 */
}

/* 悬停暂停 - 通过 JavaScript 处理 */
.marquee-row.paused {
    animation-play-state: paused !important;
}

.marquee-row-reverse.paused {
    animation-play-state: paused !important;
}

.marquee-item {
    width: 256px;
    height: auto;
    min-height: 200px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.01);
    padding: 1rem;
}

.marquee-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
    border-color: var(--primary-pink);
    background: rgba(255, 107, 157, 0.05);
    z-index: 10;
}

.marquee-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: filter 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.marquee-item:hover img {
    filter: brightness(0.9);
}

/* 水平滚动动画 - 平滑无缝循环 */
/* 第一行：从左往右移动，初始时第一张在最右边 */
@keyframes marquee-horizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 第二行：从右往左移动，初始时第一张在最左边 */
@keyframes marquee-horizontal-reverse {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50%);
    }
}

/* 渐变遮罩 */
.marquee-gradient-left,
.marquee-gradient-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 25%;
    pointer-events: none;
    z-index: 5;
}

.marquee-gradient-left {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.marquee-gradient-right {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .marquee-item {
        width: 200px;
    }
    
    .marquee-item img {
        height: 160px;
    }
}

@media (max-width: 768px) {
    .marquee-item {
        width: 180px;
    }
    
    .marquee-item img {
        height: 140px;
    }
}

/* 照片查看对话框 */
.photo-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.photo-dialog.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.photo-dialog-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.photo-dialog-content {
    position: relative;
    max-width: 80%;
    max-height: 80vh;
    width: auto;
    height: auto;
    z-index: 1;
    transform: scale(0.5);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease;
}

.photo-dialog.active .photo-dialog-content {
    transform: scale(1);
    opacity: 1;
}

.photo-dialog-close {
    position: absolute;
    top: -64px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.photo-dialog-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.photo-dialog-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-dialog-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    /* 进一步限制4K图片的显示尺寸 */
    max-width: min(80vw, 1200px);
    max-height: min(80vh, 800px);
}

/* 照片对话框动画变体 */
.photo-dialog-content.from-bottom {
    transform: translateY(100%);
    opacity: 0;
}

.photo-dialog.active .photo-dialog-content.from-bottom {
    transform: translateY(0);
    opacity: 1;
}

.photo-dialog-content.from-center {
    transform: scale(0.5);
    opacity: 0;
}

.photo-dialog.active .photo-dialog-content.from-center {
    transform: scale(1);
    opacity: 1;
}

.photo-dialog-content.from-top {
    transform: translateY(-100%);
    opacity: 0;
}

.photo-dialog.active .photo-dialog-content.from-top {
    transform: translateY(0);
    opacity: 1;
}

.photo-dialog-content.from-left {
    transform: translateX(-100%);
    opacity: 0;
}

.photo-dialog.active .photo-dialog-content.from-left {
    transform: translateX(0);
    opacity: 1;
}

.photo-dialog-content.from-right {
    transform: translateX(100%);
    opacity: 0;
}

.photo-dialog.active .photo-dialog-content.from-right {
    transform: translateX(0);
    opacity: 1;
}

.photo-dialog-content.fade {
    transform: scale(1);
    opacity: 0;
}

.photo-dialog.active .photo-dialog-content.fade {
    opacity: 1;
}

.photo-dialog-content.top-in-bottom-out {
    transform: translateY(-100%);
    opacity: 0;
}

.photo-dialog.active .photo-dialog-content.top-in-bottom-out {
    transform: translateY(0);
    opacity: 1;
}

.photo-dialog-content.left-in-right-out {
    transform: translateX(-100%);
    opacity: 0;
}

.photo-dialog.active .photo-dialog-content.left-in-right-out {
    transform: translateX(0);
    opacity: 1;
}

