/* ========================================
   动画效果样式
   ======================================== */

/* 点击爱心效果 - 升级版 */
.click-heart {
    position: fixed;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 9999;
    animation: heartFloat 5s ease-out forwards;
    opacity: 0.7;
    filter: blur(0.05px);
}

.click-heart::before,
.click-heart::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 70%;
    border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    box-shadow:
        0 0 8px currentColor,
        0 0 16px currentColor,
        0 0 24px currentColor,
        inset 0 0 8px currentColor;
}

.click-heart::before {
    transform: translateX(-50%) rotate(45deg);
}

.click-heart::after {
    transform: translateY(-50%) rotate(45deg);
}

/* 12种颜色的爱心 - 增强版 */
.click-heart.pink::before,
.click-heart.pink::after {
    background: radial-gradient(ellipse at center, rgba(255, 107, 157, 0.8) 0%, rgba(255, 195, 208, 0.4) 70%);
    color: rgba(255, 107, 157, 0.6);
}

.click-heart.red::before,
.click-heart.red::after {
    background: radial-gradient(ellipse at center, rgba(255, 71, 87, 0.8) 0%, rgba(255, 107, 129, 0.4) 70%);
    color: rgba(255, 71, 87, 0.6);
}

.click-heart.purple::before,
.click-heart.purple::after {
    background: radial-gradient(ellipse at center, rgba(165, 94, 234, 0.8) 0%, rgba(136, 84, 208, 0.4) 70%);
    color: rgba(165, 94, 234, 0.6);
}

.click-heart.coral::before,
.click-heart.coral::after {
    background: radial-gradient(ellipse at center, rgba(255, 159, 67, 0.8) 0%, rgba(255, 107, 107, 0.4) 70%);
    color: rgba(255, 159, 67, 0.6);
}

.click-heart.rose::before,
.click-heart.rose::after {
    background: radial-gradient(ellipse at center, rgba(253, 121, 168, 0.8) 0%, rgba(232, 67, 147, 0.4) 70%);
    color: rgba(253, 121, 168, 0.6);
}

/* 新增颜色 */
.click-heart.orange::before,
.click-heart.orange::after {
    background: radial-gradient(ellipse at center, rgba(255, 140, 0, 0.8) 0%, rgba(255, 200, 100, 0.4) 70%);
    color: rgba(255, 140, 0, 0.6);
}

.click-heart.yellow::before,
.click-heart.yellow::after {
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.8) 0%, rgba(255, 235, 100, 0.4) 70%);
    color: rgba(255, 215, 0, 0.6);
}

.click-heart.green::before,
.click-heart.green::after {
    background: radial-gradient(ellipse at center, rgba(80, 200, 120, 0.8) 0%, rgba(50, 220, 100, 0.4) 70%);
    color: rgba(80, 200, 120, 0.6);
}

.click-heart.teal::before,
.click-heart.teal::after {
    background: radial-gradient(ellipse at center, rgba(0, 206, 209, 0.8) 0%, rgba(0, 180, 200, 0.4) 70%);
    color: rgba(0, 206, 209, 0.6);
}

.click-heart.blue::before,
.click-heart.blue::after {
    background: radial-gradient(ellipse at center, rgba(74, 144, 226, 0.8) 0%, rgba(100, 180, 255, 0.4) 70%);
    color: rgba(74, 144, 226, 0.6);
}

.click-heart.indigo::before,
.click-heart.indigo::after {
    background: radial-gradient(ellipse at center, rgba(75, 0, 130, 0.8) 0%, rgba(100, 50, 180, 0.4) 70%);
    color: rgba(75, 0, 130, 0.6);
}

.click-heart.violet::before,
.click-heart.violet::after {
    background: radial-gradient(ellipse at center, rgba(138, 43, 226, 0.8) 0%, rgba(180, 100, 255, 0.4) 70%);
    color: rgba(138, 43, 226, 0.6);
}

.click-heart.magenta::before,
.click-heart.magenta::after {
    background: radial-gradient(ellipse at center, rgba(255, 0, 255, 0.8) 0%, rgba(200, 50, 220, 0.4) 70%);
    color: rgba(255, 0, 255, 0.6);
}

@keyframes heartFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.5) rotate(var(--rotation));
    }
}

/* 添加星星闪烁效果 */
.star {
    position: fixed;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8),
                0 0 12px rgba(255, 255, 255, 0.4);
}

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

/* 星座连线Canvas */
#constellationCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* 流星效果 */
.meteor {
    position: fixed;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #fff, transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
    animation: meteorFall linear forwards;
    box-shadow:
        0 0 6px 2px rgba(255, 255, 255, 0.8),
        0 0 12px 4px rgba(255, 255, 255, 0.4),
        0 0 18px 6px rgba(255, 255, 255, 0.2);
}

.meteor::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    right: 0;
}

@keyframes meteorFall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(-45deg);
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--meteor-x), var(--meteor-y)) rotate(-45deg);
    }
}

/* 鼠标光晕效果 */
.mouse-glow {
    position: fixed;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* 星云背景层 */
.nebula-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(138, 43, 226, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 107, 157, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(75, 0, 130, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
    animation: nebulaFloat 20s ease-in-out infinite;
}

@keyframes nebulaFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10px, -10px) scale(1.02); }
    66% { transform: translate(-10px, 10px) scale(0.98); }
}

/* 波浪效果Canvas */
#waveCanvas {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    pointer-events: none;
    z-index: 3;
    opacity: 0.6;
}

/* 心形粒子Canvas - 确保在最上层，仅显示在第一屏 */
#pinkboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* 限制高度为第一屏 */
    z-index: 15 !important;
    opacity: 0.9;
    pointer-events: none;
    /* 剪裁超出部分 */
    clip-path: inset(0 0 calc(100% - 100vh) 0);
}

/* 加载屏幕样式 */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}

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

.loading-heart {
    width: 80px;
    height: 80px;
    position: relative;
    animation: heartbeat 1.2s ease-in-out infinite;
}

.loading-heart::before,
.loading-heart::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    border-radius: 50px 50px 0 0;
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.6),
                inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.loading-heart::before {
    left: 50px;
    transform: translateX(-50%) rotate(-45deg);
    transform-origin: 0 100%;
}

.loading-heart::after {
    left: 0;
    transform: translateX(-50%) rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(0.9); }
    20%, 40% { transform: scale(1.1); }
    50% { transform: scale(1); }
}

.loading-text {
    margin-top: 40px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 2px;
    animation: pulse 2s ease-in-out infinite;
}

.loading-text::after {
    content: '...';
    animation: dots 2s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.loading-progress {
    position: absolute;
    bottom: 100px;
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d 0%, #ff8fab 100%);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.8);
}

/* 触摸反馈波纹效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ========================================
   Pinkboard心形粒子 - 仅在第一屏显示
   ======================================== */

/* p span确保粒子只显示在第一屏范围内（通过JS控制透明度） */
#pinkboard-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 15;
    pointer-events: none;
    overflow: hidden;
}
