/* 二次元主题增强样式 */

/* 新增二次元主题变量 */
:root {
    /* 动画相关变量 */
    --anime-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --anime-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --anime-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* 二次元色彩扩展 */
    --anime-pink: #ff69b4;
    --anime-purple: #da70d6;
    --anime-blue: #87ceeb;
    --anime-yellow: #ffd700;
    --anime-green: #98fb98;
    --anime-orange: #ffa500;
    --anime-red: #ff6b6b;
    
    /* 渐变效果 */
    --gradient-anime: linear-gradient(135deg, #ff69b4, #87ceeb, #da70d6);
    --gradient-rainbow: linear-gradient(45deg, #ff69b4, #ffd700, #98fb98, #87ceeb, #da70d6);
    --gradient-sunset: linear-gradient(135deg, #ff6b6b, #ffa500, #ffd700);
    --gradient-ocean: linear-gradient(135deg, #87ceeb, #4682b4, #6495ed);
    
    /* 阴影效果 */
    --shadow-soft: 0 8px 32px rgba(255, 182, 193, 0.3);
    --shadow-hover: 0 12px 40px rgba(255, 182, 193, 0.4);
    --shadow-glow: 0 0 20px rgba(255, 105, 180, 0.5);
    --shadow-neon: 0 0 30px rgba(135, 206, 235, 0.6);
}

/* 增强的卡片悬停效果 */
.card-item {
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--anime-elastic);
}

.card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.card-item:hover::before {
    left: 100%;
}

.card-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--shadow-hover);
    border: 2px solid var(--anime-pink);
}

/* 头像增强效果 */
.hero-card .avatar {
    position: relative;
    transition: all 0.4s var(--anime-bounce);
    border: 4px solid transparent;
    background: var(--gradient-anime);
    background-clip: padding-box;
}

.hero-card .avatar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: var(--gradient-rainbow);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-card .avatar:hover::before {
    opacity: 1;
}

.hero-card .avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow);
}

/* 社交图标增强 */
.social-icon {
    position: relative;
    background: var(--gradient-anime);
    transition: all 0.3s var(--anime-bounce);
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-sunset);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon:hover {
    transform: scale(1.2) rotate(360deg);
    box-shadow: var(--shadow-neon);
}

/* 文字动画效果 */
.highlight {
    background: var(--gradient-anime);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 3s ease-in-out infinite alternate;
}

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

/* 装饰性分割线增强 */
.decorative-hr {
    position: relative;
    background: var(--gradient-rainbow);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 2s linear infinite;
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* 项目卡片增强 */
.project-card {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 209, 217, 0.8));
    border: 2px solid transparent;
    transition: all 0.4s var(--anime-elastic);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-ocean);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--anime-blue);
    box-shadow: var(--shadow-neon);
}

/* 音乐播放器增强 */
.progress-container {
    position: relative;
    background: linear-gradient(90deg, #e0e0e0, #f0f0f0);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-anime);
    position: relative;
    border-radius: 10px;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 控制按钮增强 */
.control-btn {
    position: relative;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s var(--anime-bounce);
}

.control-btn:hover {
    background: var(--gradient-anime);
    color: white;
    transform: scale(1.2);
    box-shadow: var(--shadow-glow);
}

.control-btn.play-pause {
    width: 50px;
    height: 50px;
    background: var(--gradient-sunset);
}

.control-btn.play-pause:hover {
    transform: scale(1.3) rotate(360deg);
    box-shadow: var(--shadow-neon);
}

/* 主题切换按钮增强 */
.theme-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--anime-bounce);
}

.theme-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gradient-rainbow);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.theme-item:hover::before {
    width: 100%;
    height: 100%;
}

.theme-item:hover {
    transform: scale(1.1);
    color: white;
}

/* 樱花飘落效果增强 */
.sakura {
    position: fixed;
    pointer-events: none;
    animation: sakuraFall linear infinite;
}

@keyframes sakuraFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 背景动画增强 */
.background-image {
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.05) rotate(0.5deg);
    }
}

/* 页脚增强 */
.footer {
    background: var(--gradient-anime);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-rainbow);
    animation: rainbow 3s linear infinite;
}

/* 响应式动画 */
@media (max-width: 768px) {
    .card-item:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    .hero-card .avatar:hover {
        transform: scale(1.05) rotate(3deg);
    }
    
    .social-icon:hover {
        transform: scale(1.1) rotate(180deg);
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* 特殊效果 */
.anime-glow {
    animation: animeGlow 2s ease-in-out infinite alternate;
}

@keyframes animeGlow {
    from {
        box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(135, 206, 235, 0.8);
    }
}