/* Music player animations */
#music_container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    z-index: 999;
    cursor: pointer;
}

#music_play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: rotate 3s linear infinite;
    animation-play-state: running;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.music-notes {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 60px;
    height: 60px;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.note-item {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.item-1 {
    top: -15px;
    right: 10px;
    animation: float1 2s ease-in-out infinite;
}

.item-2 {
    top: 5px;
    right: -15px;
    animation: float2 2.5s ease-in-out infinite;
}

.item-3 {
    top: 20px;
    right: 5px;
    animation: float3 3s ease-in-out infinite;
}

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

@keyframes float2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-10deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(5deg); }
}

/* Barrage animations */
.barrage {
    position: fixed;
    width: 100%;
    overflow: hidden;
    z-index: 10;
    pointer-events: none;
}

.danmu-1 {
    position: absolute;
    padding: 5px 15px;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 14px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.danmu-1 img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-inline-end: 5px;
    border-radius: 50%;
    object-fit: cover;
}

.danmu-1 span {
    vertical-align: middle;
}

.danmu-1 b {
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes ani {
    from {
        right: -100%;
    }
    to {
        right: 100%;
    }
}

/* Fix for barrage animation on mobile */
@media (max-width: 768px) {
    .danmu-1 {
        font-size: 12px;
        padding: 3px 10px;
    }
    
    .danmu-1 img {
        width: 16px;
        height: 16px;
    }
}
