/**
 * Cinematic Logo Preloader - Netflix Style
 * Premium intro animation with dramatic effects
 */

/* Preloader Container */
.cinematic-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    overflow: hidden;
}

/* Background Effects */
.preloader-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a0a0a 0%, #000 70%);
}

.preloader-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(229, 9, 20, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(229, 9, 20, 0.1) 0%, transparent 50%);
    animation: bgPulse 4s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Particle Effects */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(229, 9, 20, 0.6);
    border-radius: 50%;
    animation: particleFloat 8s infinite;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* Logo Container */
.logo-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Main Logo */
.main-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoReveal 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: scale(0.8);
}

@keyframes logoReveal {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(20px);
    }
    50% {
        opacity: 1;
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* Logo Icon */
.logo-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #e50914 0%, #b20710 50%, #8b0000 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    box-shadow: 
        0 0 60px rgba(229, 9, 20, 0.6),
        0 0 100px rgba(229, 9, 20, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 -5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: iconShine 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes iconShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Glow Ring */
.glow-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 3px solid transparent;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.5), transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ringRotate 4s linear infinite;
    opacity: 0;
    animation-delay: 0.5s;
}

@keyframes ringRotate {
    0% { 
        transform: rotate(0deg) scale(1);
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
    100% { 
        transform: rotate(360deg) scale(1);
        opacity: 0.8;
    }
}

/* Logo Text */
.logo-text-container {
    margin-top: 30px;
    text-align: center;
    opacity: 0;
    animation: textReveal 1s ease-out forwards;
    animation-delay: 0.8s;
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.logo-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.logo-text .super {
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: superGlow 2s ease-in-out infinite;
    display: inline;
}

.logo-text .iptv {
    color: #e50914;
    font-weight: 900;
    text-shadow: 0 0 40px rgba(229, 9, 20, 0.8);
    animation: iptvGlow 2s ease-in-out infinite;
    display: inline;
}

@keyframes superGlow {
    0%, 100% { text-shadow: 0 0 30px rgba(255, 255, 255, 0.5); }
    50% { text-shadow: 0 0 50px rgba(255, 255, 255, 0.8); }
}

@keyframes iptvGlow {
    0%, 100% { text-shadow: 0 0 40px rgba(229, 9, 20, 0.6); }
    50% { text-shadow: 0 0 60px rgba(229, 9, 20, 1); }
}

/* Text gradient animation removed - using separate colors for Super/IPTV */

.logo-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-top: 10px;
    opacity: 0;
    animation: subtitleReveal 1s ease-out forwards;
    animation-delay: 1.2s;
}

@keyframes subtitleReveal {
    0% {
        opacity: 0;
        letter-spacing: 20px;
    }
    100% {
        opacity: 1;
        letter-spacing: 8px;
    }
}

/* Loading Bar */
.loading-bar-container {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    opacity: 0;
    animation: barReveal 0.5s ease-out forwards;
    animation-delay: 1.5s;
}

@keyframes barReveal {
    0% { opacity: 0; transform: translateX(-50%) scaleX(0); }
    100% { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

.loading-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #e50914, #ff6b6b, #e50914);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: loadingProgress 2s ease-in-out forwards, barGlow 1s ease-in-out infinite;
    animation-delay: 1.8s, 1.8s;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.8);
}

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes barGlow {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.loading-text {
    text-align: center;
    margin-top: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Fade Out Animation */
.cinematic-preloader.fade-out {
    animation: preloaderFadeOut 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes preloaderFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
        visibility: hidden;
    }
}

/* Sound Wave Effect */
.sound-waves {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    animation: wavesReveal 0.5s ease-out forwards;
    animation-delay: 2s;
}

@keyframes wavesReveal {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.wave-bar {
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #e50914, #ff6b6b);
    border-radius: 2px;
    animation: waveAnimation 0.8s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; height: 15px; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; height: 25px; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 35px; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; height: 25px; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; height: 15px; }

@keyframes waveAnimation {
    0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .logo-icon-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .logo-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
        border-radius: 16px;
    }
    
    .glow-ring {
        width: 110px;
        height: 110px;
        border-radius: 20px;
    }
    
    .logo-text {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .logo-subtitle {
        font-size: 0.8rem;
        letter-spacing: 5px;
    }
    
    .loading-bar-container {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .logo-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .logo-icon {
        width: 65px;
        height: 65px;
        font-size: 32px;
        border-radius: 14px;
    }
    
    .glow-ring {
        width: 90px;
        height: 90px;
        border-radius: 18px;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
        letter-spacing: 4px;
    }
}
