/* 🎬 PROFESSIONAL DOWNLOAD BUTTON - ULTRA PRO DESIGN */

.download-button-container {
    position: relative;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.download-btn-wrapper {
    position: relative;
    display: inline-block;
    perspective: 1000px;
}

.download-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    min-width: 200px;
    user-select: none;
    -webkit-user-select: none;
}

.download-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #7c8ff0 0%, #8a5fb8 100%);
    color: #ffffff;
    text-decoration: none;
}

.download-btn:active {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.1s ease;
}

.download-btn:focus {
    outline: none;
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Download Icon */
.download-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.download-btn:hover .download-icon {
    transform: translateY(2px);
    animation: downloadBounce 0.6s ease-in-out;
}

@keyframes downloadBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

.download-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    transition: all 0.3s ease;
}

/* Download Text */
.download-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Ripple Effect */
.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.download-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Loading State */
.download-btn.loading {
    pointer-events: none;
    background: linear-gradient(135deg, #94a3d3 0%, #a084c7 100%);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.download-btn.loading .download-icon {
    animation: loadingSpin 1s linear infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes loadingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success State */
.download-btn.success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    animation: successPulse 0.6s ease-out;
}

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

/* Progress Bar */
.download-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 0 50px 50px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.download-btn.loading .download-progress {
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(0.7); }
    100% { transform: scaleX(1); }
}

/* Floating Particles */
.download-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 50px;
}

.download-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
}

.download-particle:nth-child(1) { left: 20%; animation-delay: 0s; }
.download-particle:nth-child(2) { left: 40%; animation-delay: 0.5s; }
.download-particle:nth-child(3) { left: 60%; animation-delay: 1s; }
.download-particle:nth-child(4) { left: 80%; animation-delay: 1.5s; }

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% { 
        transform: translateY(-20px) scale(1);
        opacity: 1;
    }
}

/* Glow Effect */
.download-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

.download-btn:hover::after {
    opacity: 0.7;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .download-btn {
        padding: 14px 28px;
        font-size: 15px;
        min-width: 180px;
    }
    
    .download-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .download-btn {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 160px;
        gap: 8px;
    }
    
    .download-icon {
        width: 18px;
        height: 18px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .download-btn {
        box-shadow: 
            0 8px 32px rgba(102, 126, 234, 0.4),
            0 4px 16px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .download-btn:hover {
        box-shadow: 
            0 16px 48px rgba(102, 126, 234, 0.5),
            0 8px 24px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Accessibility */
.download-btn:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .download-btn,
    .download-icon,
    .download-text,
    .download-progress,
    .download-particle {
        animation: none !important;
        transition: none !important;
    }
    
    .download-btn:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .download-btn {
        background: #000000;
        color: #ffffff;
        border: 2px solid #ffffff;
    }
    
    .download-btn:hover {
        background: #ffffff;
        color: #000000;
    }
}
