/**
 * Splash Screen Styles - Elegant & Modern
 * Yayasan Berkat Bintang Bangsa
 */

@font-face {
    font-family: 'Roboto';
    src: url('../font/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    background: #0a0e27;
}

/* Splash Screen Container */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-screen.hidden {
    display: none !important;
}

/* Animated Background Orbs */
.splash-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.4) 100%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.8) 0%, rgba(102, 126, 234, 0.4) 100%);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.8) 0%, rgba(240, 147, 251, 0.4) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Main Content */
.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    gap: 3rem;
}

/* Logo Container */
.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.logo-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulseGlow 2s ease-in-out infinite;
    filter: blur(30px);
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Logo Image */
.splash-logo {
    position: relative;
    max-width: 400px;
    width: 60%;
    max-height: 80vh;
    height: auto;
    object-fit: contain;
    animation: zoomInElegant 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
    z-index: 1;
    opacity: 0;
}

@keyframes zoomInElegant {
    0% {
        transform: scale(0.1) rotate(-10deg);
        opacity: 0;
        filter: blur(10px);
    }
    50% {
        transform: scale(1.15) rotate(2deg);
        opacity: 0.8;
        filter: blur(2px);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: blur(0);
    }
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 10px;
    width: 0%;
    animation: loadingProgress 2.5s ease-out forwards;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

.loading-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Floating Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat 15s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
    animation-duration: 15s;
}

.particle:nth-child(4) {
    left: 70%;
    animation-delay: 1s;
    animation-duration: 20s;
}

.particle:nth-child(5) {
    left: 85%;
    animation-delay: 3s;
    animation-duration: 14s;
}

.particle:nth-child(6) {
    left: 20%;
    animation-delay: 5s;
    animation-duration: 16s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px) scale(1);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .splash-logo {
        max-width: 280px;
        width: 70%;
    }
    
    .loading-bar {
        width: 180px;
    }
    
    .orb-1, .orb-2, .orb-3 {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 576px) {
    .splash-logo {
        max-width: 220px;
        width: 75%;
    }
    
    .loading-bar {
        width: 150px;
    }
    
    .loading-text {
        font-size: 0.75rem;
    }
    
    .splash-content {
        gap: 2rem;
    }
}

/* Smooth transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
