/* ═══════════════════════════════════════════════════
   IPTV Manager Pro - Loading Animation
   Clean white background, modern design
   ═══════════════════════════════════════════════════ */

.iptv-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.iptv-loading-overlay.active {
    display: flex !important;
}

.iptv-loading-content {
    text-align: center;
    max-width: 420px;
    padding: 48px 40px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

/* Spinner */
.iptv-loading-spinner {
    width: 72px;
    height: 72px;
    margin: 0 auto 28px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: iptv-loading-spin 1s linear infinite;
}

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

/* Title */
.iptv-loading-content h3 {
    color: #0f172a;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

/* Description */
.iptv-loading-content p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 24px;
}

/* Progress Bar Container */
.iptv-progress-bar {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin: 24px 0 12px;
    position: relative;
}

/* Progress Bar Fill */
.iptv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: iptv-fillProgress 10s linear forwards;
}

@keyframes iptv-fillProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Countdown Text */
.iptv-loading-countdown {
    color: #6366f1;
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0 0;
}

/* Subtle breathing animation */
.iptv-loading-content {
    animation: iptv-loading-breathe 3s ease-in-out infinite;
}

@keyframes iptv-loading-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.005); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .iptv-loading-content {
        max-width: 90%;
        padding: 36px 24px;
    }

    .iptv-loading-spinner {
        width: 56px;
        height: 56px;
        margin-bottom: 20px;
    }

    .iptv-loading-content h3 {
        font-size: 18px;
    }

    .iptv-loading-content p {
        font-size: 14px;
    }
}

/* Success State */
.iptv-loading-overlay.success .iptv-loading-spinner {
    border-top-color: #10b981;
    animation: none;
}

.iptv-loading-overlay.success .iptv-progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Loading Dots Animation */
.iptv-loading-dots {
    display: inline-block;
}

.iptv-loading-dots::after {
    content: '';
    animation: iptv-loading-dots 1.5s steps(4, end) infinite;
}

@keyframes iptv-loading-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}
