/* 
 * Premium Splash Screen Styles 
 * Part of Rumah Inggris Lampung PWA
 */
#pwa-custom-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
    z-index: 99999;
    display: none; /* Hide by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
    overflow: hidden;
}

/* Show ONLY in PWA Standalone Mode */
@media (display-mode: standalone), (display-mode: fullscreen) {
    #pwa-custom-splash {
        display: flex;
    }
}

/* Fallback for iOS which sometimes uses different media queries or properties */
@media (display-mode: minimal-ui) {
    #pwa-custom-splash {
        display: none; /* Keep hidden in browser with UI */
    }
}


/* Glassmorphism Background Pattern */
#pwa-custom-splash::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 25%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 25%),
                radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.2) 0%, transparent 50%);
    animation: splashBgRotate 30s linear infinite;
    pointer-events: none;
}

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

/* Logo & Text Container */
.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: splashFadeUp 1s ease-out forwards;
}

.splash-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.splash-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    animation: splashPulse 2.5s ease-in-out infinite;
}

.splash-logo-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    filter: blur(30px);
    opacity: 0.15;
    border-radius: 50%;
    animation: splashGlow 2.5s ease-in-out infinite;
}

.splash-title {
    font-family: 'Outfit', sans-serif;
    color: white;
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.splash-subtitle {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Loader Bar */
.splash-loader {
    position: absolute;
    bottom: 80px;
    width: 240px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.splash-loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #fff, #eef2ff);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    animation: splashLoadProgress 3.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes splashLoadProgress {
    0% { width: 0%; }
    20% { width: 30%; }
    60% { width: 70%; }
    90% { width: 95%; }
    100% { width: 100%; }
}

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

@keyframes splashGlow {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.2); }
}

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

/* Dismiss State */
.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
