/* 
* Lion IPTV - Download Section Enhancements
* Author: Lion Team
* Version: 2.0
*/

/* ===== DOWNLOAD NOTIFICATION STYLES ===== */
.download-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.download-notification.show {
    transform: translateX(0);
}

.download-notification i {
    font-size: 1.2rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ===== ENHANCED BUTTON EFFECTS ===== */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.98);
}

/* ===== LOADING SPINNER ===== */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* ===== PULSE ANIMATION FOR NEW BADGE ===== */
@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    }
}

/* ===== SPARKLE ANIMATION ===== */
@keyframes sparkle {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
        color: #ffd700;
    }
    25% { 
        transform: rotate(90deg) scale(1.1);
        color: #ffed4e;
    }
    50% { 
        transform: rotate(180deg) scale(1.2);
        color: #ffd700;
    }
    75% { 
        transform: rotate(270deg) scale(1.1);
        color: #ffed4e;
    }
}

/* ===== BLINK ANIMATION FOR SERVER STATUS ===== */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* ===== FADE IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== STAGGERED ANIMATIONS ===== */
.download-card:nth-child(1) { transition-delay: 0.1s; }
.download-card:nth-child(2) { transition-delay: 0.2s; }
.download-card:nth-child(3) { transition-delay: 0.3s; }

.note-item:nth-child(1) { transition-delay: 0.1s; }
.note-item:nth-child(2) { transition-delay: 0.2s; }
.note-item:nth-child(3) { transition-delay: 0.3s; }
.note-item:nth-child(4) { transition-delay: 0.4s; }

.step:nth-child(1) { transition-delay: 0.1s; }
.step:nth-child(2) { transition-delay: 0.2s; }
.step:nth-child(3) { transition-delay: 0.3s; }
.step:nth-child(4) { transition-delay: 0.4s; }

/* ===== HOVER EFFECTS ===== */
.download-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.note-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.step:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
.btn:focus,
.download-card:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus:not(:focus-visible) {
    outline: none;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .download-notification {
        right: 10px;
        left: 10px;
        top: 10px;
        transform: translateY(-100%);
    }
    
    .download-notification.show {
        transform: translateY(0);
    }
    
    .download-card:hover {
        transform: none;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .download-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .version-info {
        background: #4a5568;
    }
    
    .note-item {
        background: #4a5568;
        color: #e2e8f0;
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    .new-release-badge,
    .download-notification i,
    .fa-spinner {
        animation: none;
    }
    
    .fade-in {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    .btn::before {
        display: none;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .download-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .new-release-badge {
        border: 2px solid #fff;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .download-notification,
    .new-release-badge,
    .download-section {
        display: none;
    }
    
    .download-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
.download-card::-webkit-scrollbar {
    width: 6px;
}

.download-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.download-card::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.download-card::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
