/* Music Player Modal Styles */
.music-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.music-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    width: 90vw;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.music-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.karaoke-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.karaoke-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.3);
}

.track-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.player-main-content {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.visualizer-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.lyrics-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow: hidden;
    z-index: 10;
    display: block;
    background: rgba(0,0,0,0.7);
}

.visualizer-canvas {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.visualizer-section,
.karaoke-section {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.visualizer-canvas {
    flex: 1;
    width: 100%;
    background: #000;
    border-radius: 0;
}

.music-controls {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: nowrap;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 1000;
    position: relative;
    min-height: 80px;
}

.play-btn {
    background: linear-gradient(45deg, #ff006e, #8338ec);
    border: none;
    color: white;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 0, 110, 0.4);
    margin-right: 10px;
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 0, 110, 0.5);
}

.progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff006e, #8338ec, #3a86ff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

.simple-lyrics-line {
    padding: 6px 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    margin-bottom: 4px;
}

.simple-lyrics-line:hover {
    opacity: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: #ccc;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    flex-shrink: 0;
    min-width: 120px;
}

.volume-control span {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #ff006e, #8338ec);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 0, 110, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #ff006e, #8338ec);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(255, 0, 110, 0.3);
}

/* Update existing music cards to be interactive */
.music-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.music-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.music-card:hover::before {
    left: 100%;
}

.music-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 0, 110, 0.2);
}

.play-btn-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #ff006e, #8338ec);
    border: none;
    color: white;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 0, 110, 0.4);
}

.music-card:hover .play-btn-card {
    opacity: 1;
}

.music-card:hover .music-card-cover {
    filter: brightness(0.6);
}

/* Responsive design */
@media (max-width: 768px) {
    .music-modal-content {
        width: 95vw;
        height: 85vh;
        border-radius: 15px;
    }
    
    .music-modal-header {
        padding: 15px 20px;
    }
    
    .track-title {
        font-size: 1.2rem;
    }
    
    .music-controls {
        padding: 15px 20px;
        gap: 15px;
    }
    
    .play-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .volume-container {
        display: none; /* Hide on mobile to save space */
    }
}

/* AI-themed loading animation */
@keyframes aiThinking {
    0%, 20% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.ai-loading {
    animation: aiThinking 1.5s infinite;
}

/* Glitch effect for text */
@keyframes glitch {
    0% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    100% { transform: translateX(0); }
}

.glitch-text {
    animation: glitch 0.3s infinite;
}