/* Jumping Machine Lyrics - Custom Styles */

/* 歌词行样式 */
.lyrics-line {
    transition: all 0.3s ease;
    cursor: pointer;
}
.lyrics-line:hover {
    background-color: #f3f4f6;
    border-radius: 8px;
}
.pinyin {
    color: #6b7280;
    font-size: 0.875rem;
}
.chinese {
    font-size: 1.125rem;
    /* font-weight: 500; */
}

/* 背景渐变 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 音乐图标动画 */
.music-note {
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 语音播放状态样式 */
.speech-icon {
    transition: all 0.3s ease;
    cursor: pointer;
}
.speech-icon[data-state="ready"] {
    color: #3b82f6 !important;
}
.speech-icon[data-state="playing"] {
    color: #10b981 !important;
    transform: scale(1.1);
}
.speech-icon:hover {
    transform: scale(1.2);
    opacity: 1 !important;
}
.speech-icon[data-state="playing"]:hover {
    transform: scale(1.3);
}

/* 播放中的歌词行高亮 */
.lyrics-line:has(.speech-icon[data-state="playing"]) {
    background-color: #ecfdf5 !important;
    border-left-color: #10b981 !important;
    border-left-width: 4px !important;
}

/* 喇叭播放动画效果 */
.speaker-playing {
    position: relative;
    animation: speakerPulse 1.5s ease-in-out infinite;
}

.speaker-playing::before,
.speaker-playing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid currentColor;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.speaker-playing::before {
    width: 20px;
    height: 20px;
    animation: soundWave 1.5s ease-out infinite;
}

.speaker-playing::after {
    width: 30px;
    height: 30px;
    animation: soundWave 1.5s ease-out infinite 0.5s;
}

@keyframes speakerPulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.1);
    }
}

@keyframes soundWave {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* 音乐播放器样式 */
.music-player-container {
    position: relative;
    overflow: hidden;
    contain: layout style;
    will-change: auto;
}

.music-player-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 音乐可视化器动画 */
.music-visualizer {
    animation: musicBars 1s ease-in-out infinite alternate;
    transform-origin: bottom;
    will-change: transform;
    flex-shrink: 0;
}

.music-visualizer:nth-child(1) { animation-delay: 0s; }
.music-visualizer:nth-child(2) { animation-delay: 0.2s; }
.music-visualizer:nth-child(3) { animation-delay: 0.4s; }
.music-visualizer:nth-child(4) { animation-delay: 0.6s; }

@keyframes musicBars {
    0% { 
        transform: scaleY(0.3);
        opacity: 0.6;
    }
    100% { 
        transform: scaleY(1);
        opacity: 1;
    }
}

/* 播放按钮特效 */
#playPauseBtn {
    position: relative;
    overflow: hidden;
}

#playPauseBtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

#playPauseBtn:active::after {
    width: 120px;
    height: 120px;
}

/* 进度条增强样式 */
#progressContainer:hover #progressThumb {
    opacity: 1 !important;
    animation: progressPulse 1.5s infinite;
}

#progressThumb {
    transition: all 0.3s ease;
}

@keyframes progressPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

/* 音量按钮特效 */
#volumeBtn:hover {
    text-shadow: 0 0 10px currentColor;
}

/* 播放器容器渐变动画 */
.music-player-container {
    background: linear-gradient(-45deg, #8B5CF6, #3B82F6, #06B6D4, #8B5CF6);
    background-size: 400% 400%;
    animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 时间显示框特效 */
#currentTime, #duration {
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

#currentTime:hover, #duration:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: scale(1.05);
}

/* 进度条容器悬停效果 */
#progressContainer:hover {
    transform: scaleY(1.2);
    filter: brightness(1.2);
}

#volumeContainer:hover {
    transform: scaleY(1.2);
    filter: brightness(1.2);
}

/* 播放状态指示器 */
.animate-pulse {
    animation: statusPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* 音乐播放时歌词高亮 */
.music-playing-highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border-left: 4px solid #f59e0b !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    z-index: 10;
    position: relative;
}

.music-playing-highlight .chinese {
    color: #92400e !important;
    font-weight: 500;
}

.music-playing-highlight .pinyin {
    color: #b45309 !important;
    font-weight: 500;
}

/* 播放器按钮悬停效果 */
#playPauseBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#volumeBtn:hover {
    transform: scale(1.1);
}

/* 进度条和音量条悬停效果 */
#progressContainer:hover {
    transform: scaleY(1.5);
}

#volumeContainer:hover {
    transform: scaleY(1.5);
}

/* 歌词双击跳转效果 */
.lyrics-line {
    position: relative;
}

.lyrics-line::after {
    content: '双击跳转';
    position: absolute;
    top: 50%;
    right: 80px;
    transform: translateY(-50%);
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.lyrics-line:hover::after {
    opacity: 1;
}

.lyric-jump-effect {
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%) !important;
    border-left: 4px solid #10b981 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5) !important;
    animation: jumpPulse 1s ease-in-out;
}

@keyframes jumpPulse {
    0%, 100% { 
        transform: scale(1.05);
    }
    50% { 
        transform: scale(1.08);
    }
}

/* 播放器区域提示 */
.music-player-hint {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: #92400e;
}

.music-player-hint i {
    margin-right: 6px;
    color: #f59e0b;
}

/* 播放状态特效 */
.music-player-container.playing-state {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4), 0 0 60px rgba(59, 130, 246, 0.3);
    animation: gradientFlow 6s ease infinite, playingGlow 2s ease-in-out infinite alternate;
}

@keyframes playingGlow {
    0% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.4), 0 0 60px rgba(59, 130, 246, 0.3);
    }
    100% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6), 0 0 80px rgba(59, 130, 246, 0.4);
    }
}

/* 播放器头部布局稳定性 */
.music-player-container .flex.items-center.justify-between {
    min-height: 2rem;
    contain: layout;
}

/* 可视化器容器稳定性 */
.music-visualizer {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .music-player-container {
        padding: 1.5rem;
    }
    
    #playPauseBtn {
        padding: 0.75rem;
    }
    
    .music-visualizer {
        width: 1.5px;
    }
    
    #progressContainer, #volumeContainer {
        height: 10px;
    }
    
    .music-player-container .flex.items-center.justify-between {
        min-height: 1.5rem;
    }
} 