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;
}

#music-player {
    position: fixed;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 105, 180, 0.3);
}

#playPauseBtn {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#playPauseBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.6);
}

#speedControl {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#speedControl::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #ff69b4;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

#speedControl::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.8);
}

#speedControl::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ff69b4;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

#speedControl::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.8);
}

#speedLabel {
    font-size: 12px;
    color: #ff69b4;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

#start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    cursor: pointer;
    animation: fadeIn 0.5s ease-in;
}

#start-overlay.hidden {
    animation: fadeOut 0.5s ease-out forwards;
}

#start-button {
    font-size: 3em;
    color: #ff69b4;
    font-weight: bold;
    padding: 30px 60px;
    border: 3px solid #ff69b4;
    border-radius: 50px;
    background: rgba(255, 105, 180, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 20px rgba(255, 105, 180, 0.8);
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

#start-button:hover {
    background: rgba(255, 105, 180, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(255, 105, 180, 0.8);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 响应式设计 - 手机端优化 */
@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;
    }

    #music-player {
        bottom: 10px;
        left: 10px;
        padding: 6px 10px;
        gap: 6px;
    }

    #playPauseBtn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    #speedControl {
        width: 60px;
    }

    #speedLabel {
        font-size: 11px;
        min-width: 30px;
    }
}

@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;
    }

    #music-player {
        bottom: 8px;
        left: 8px;
        padding: 5px 8px;
        gap: 5px;
    }

    #playPauseBtn {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    #speedControl {
        width: 50px;
    }

    #speedLabel {
        font-size: 10px;
        min-width: 28px;
    }
}
