body {
    margin: 0;
    overflow: hidden;
    background-color: black; /* 黑色背景，突出效果 */
    font-family: 'Arial', sans-serif;
    color: white;
    cursor: none; /* 隐藏默认鼠标指针 */
}

#mainCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; /* 确保在最底层 */
}

#phrases-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* 允许鼠标事件穿透 */
    z-index: 10; /* 在 Canvas 和背景粒子之上 */
}

.heart-particle-bg {
    position: fixed;
    font-size: 20px;
    color: #ff4081; /* 浪漫的粉红色 */
    opacity: 0;
    animation: floatAndFadeBg linear forwards;
    pointer-events: none;
    z-index: 2; /* 在 Canvas 之上，但在文字之下 */
}

@keyframes floatAndFadeBg {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { transform: translateY(90vh) scale(1); opacity: 1; }
    100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

.phrase-text {
    position: absolute;
    font-size: 1.5em; /* 调小字体 */
    font-weight: bold;
    color: #ff69b4; /* 改为粉红色，不那么黄 */
    text-shadow: 0 0 8px rgba(255, 105, 180, 0.6), 0 0 15px rgba(255, 105, 180, 0.4);
    opacity: 0;
    animation: phraseFadeInAndOut 5s ease-out forwards; /* 句子动画时间更长 */
    white-space: nowrap;
}

@keyframes phraseFadeInAndOut {
    0% { opacity: 0; transform: translateY(20px) scale(0.8); }
    10% { opacity: 1; transform: translateY(0px) scale(1); }
    90% { opacity: 1; transform: translateY(-10px) scale(1.05); }
    100% { opacity: 0; transform: translateY(-30px) scale(1.1); }
}

#signature {
    position: fixed !important;
    bottom: 10px !important;
    right: 15px !important;
    left: auto !important;
    top: auto !important;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
    z-index: 9999 !important;
    pointer-events: none;
    font-family: 'Arial', sans-serif;
    white-space: nowrap; /* 防止换行 */
    text-align: right;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

/* 响应式设计 - 手机端优化 */
@media (max-width: 768px) {
    .phrase-text {
        font-size: 1.2em; /* 手机端字体稍微调大 */
    }
    
    #signature {
        font-size: 0.8em !important;
        bottom: 8px !important;
        right: 12px !important;
        left: auto !important;
        top: auto !important;
    }
}

@media (max-width: 480px) {
    .phrase-text {
        font-size: 1em; /* 小屏手机字体 */
    }
    
    #signature {
        font-size: 0.65em !important;
        bottom: 5px !important;
        right: 8px !important;
        left: auto !important;
        top: auto !important;
    }
}
