body {
    margin: 0;
    background-color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
    perspective: 1200px; /* PC */
    touch-action: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

#sparkle-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; overflow: hidden;
}

.sparkle {
    position: absolute; background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%; animation-name: twinkle; animation-iteration-count: infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; transform: scale(0.6); }
    50% { opacity: 0.8; transform: scale(1); }
}

.container {
    position: relative; width: 100vw; height: 100vh;
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out; /* PC */
    overflow: hidden; z-index: 1;
}

.falling-text, .falling-heart {
    position: absolute; white-space: nowrap; user-select: none;
    animation: fall var(--fall-duration) linear var(--fall-delay) infinite;
    will-change: transform, opacity;
}

/* Chữ trắng với hiệu ứng glow "ánh sao" */
.falling-text {
    color: #fff;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff,  /* Lớp glow trắng mạnh hơn */
        0 0 25px #ffdde5, /* Thêm một lớp glow hồng rất nhạt, rộng hơn */
        0 0 35px #ffc0cb; /* Lớp glow hồng nhạt nhất, rộng nhất */
}

/* Chữ hồng với hiệu ứng glow "ánh sao" */
.falling-text.pink {
    color: #ff99cc; /* Màu hồng chính */
    text-shadow:
        0 0 5px #fff,       /* Lớp glow trắng sát chữ */
        0 0 10px #ffe5f0,   /* Lớp glow hồng rất nhạt */
        0 0 15px #ffb3da,   /* Lớp glow hồng nhạt */
        0 0 25px #ff80bf,   /* Lớp glow hồng đậm hơn một chút */
        0 0 35px #ff66b3;   /* Lớp glow hồng đậm nhất, rộng nhất */
}

/* Bỏ các class màu .red, .blue, .yellow */

.falling-heart {
    font-size: var(--heart-size);
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.7), 0 0 15px rgba(255, 80, 80, 0.5);
}

@keyframes fall {
    0% { transform: translateY(-120px) var(--initial-z-transform); opacity: 0; }
    5% { opacity: 0.3; } 10% { opacity: 0.8; } 12% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(105vh) var(--initial-z-transform); opacity: 0; }
}

@media (max-width: 768px) {
    body { perspective: 700px; }
    .container { transition: transform 0.12s ease-out; }
}
@media (max-width: 480px) {
    body { perspective: 600px; }
}