/* YouTube Preview Styles */

/* Preview container animations */
#youtube-preview-container {
    animation: slideInRight 0.3s ease-out;
}

#youtube-preview-container.hiding {
    animation: slideOutRight 0.3s ease-out;
}

/* Song card preview states */
.song-card.preview-loading {
    position: relative;
}

.song-card.preview-loading::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.song-card.preview-playing {
    border: 2px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.song-card.preview-playing::before {
    content: '♪';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #ff0000;
    animation: musicNote 1s ease-in-out infinite;
}

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

/* Preview toggle checkbox */
#preview-toggle label {
    display: flex;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

#preview-toggle label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#preview-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* YouTube player overlay */
#youtube-preview-container button {
    transition: all 0.2s ease;
}

#youtube-preview-container button:hover {
    background: rgba(255, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #youtube-preview-container {
        width: 280px;
        height: 157px;
        bottom: 60px;
        right: 10px;
    }
    
    #preview-toggle {
        bottom: 10px !important;
        left: 10px !important;
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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