/* Стили для модального окна скачивания */

#downloadModal .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Стили для кнопки закрытия */
#downloadModal .btn-close {
    cursor: pointer !important;
    opacity: 0.8 !important;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    background-size: 18px;
}

#downloadModal .btn-close:hover {
    opacity: 1 !important;
    transform: rotate(90deg) scale(1.1);
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

#downloadModal .btn-close:focus {
    box-shadow: none;
    outline: none;
}

/* Анимация заголовка на фоне */
#downloadModal .modal-header {
    animation: headerSlideIn 0.4s ease-out;
}

@keyframes headerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#downloadModal .modal-header .bi-music-note-beamed {
    animation: iconBounceIn 0.6s ease-out 0.2s both;
}

@keyframes iconBounceIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
        opacity: 1;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#downloadModal #modal-track-title {
    animation: titleFadeIn 0.4s ease-out 0.3s both;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#downloadModal #modal-track-artist {
    animation: artistFadeIn 0.4s ease-out 0.4s both;
}

@keyframes artistFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


#downloadModal .btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#downloadModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

#downloadModal .btn-primary:active {
    transform: translateY(0);
}

#downloadModal .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#downloadModal .btn-secondary {
    transition: all 0.3s ease;
}

/* Эффект пульсации для иконки музыки */
#downloadModal .modal-header .bi-music-note-beamed {
    animation: musicPulse 2s ease-in-out infinite;
}

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

/* Стили для блока с информацией о файле */
#downloadModal .modal-body > div:first-child {
    animation: infoSlideIn 0.4s ease-out 0.5s both;
}

@keyframes infoSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Плавное появление alert */
#downloadModal .alert {
    animation: alertSlideIn 0.4s ease-out 0.3s both;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
    #downloadModal .modal-dialog {
        margin: 10px;
    }
    
    #downloadModal .modal-content {
        border-radius: 10px;
    }
    
    #downloadModal .modal-header,
    #downloadModal .modal-body,
    #downloadModal .modal-footer {
        padding: 20px !important;
    }
    
    #downloadModal .modal-title {
        font-size: 20px !important;
    }
    
    #downloadModal .btn {
        padding: 8px 20px !important;
        font-size: 14px;
    }
}
