/* Web Loader - Replicating App LoadingScreen.js */

#web-loader {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: floatUpDown 4s ease-in-out infinite;
}

/* Animations */
@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

@keyframes shimmerEffect {
    0% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

@keyframes progressSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* The Masked Logo Structure */
.logo-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 20px;
}

.spinning-border {
    position: absolute;
    top: -20px; left: -20px; width: 180px; height: 180px;
    background: conic-gradient(#0ca5ed, rgba(12, 165, 237, 0.4), transparent, transparent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    mask-image: url('./assets/logo.png');
    mask-size: 140px 140px;
    mask-position: center;
    mask-repeat: no-repeat;
    -webkit-mask-image: url('./assets/logo.png');
    -webkit-mask-size: 140px 140px;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    transform-origin: center;
    z-index: 1;
}

.static-logo {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('./assets/logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    overflow: hidden;
}

/* Shimmer Layer */
.shimmer-layer {
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 25%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(255, 255, 255, 0.3) 75%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmerEffect 2.5s linear infinite;
    mix-blend-mode: overlay;
    z-index: 3;
    pointer-events: none;
}

/* Text Logo */
.text-logo-wrapper {
    position: relative;
    width: 220px;
    height: 55px;
    background-image: url('./assets/skssf-text.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: 10px;
    overflow: hidden;
}

.text-logo-wrapper .shimmer-layer {
    animation-delay: 1.25s; /* Staggered shimmer */
}

/* Motto Text */
.motto-container {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.motto-word {
    font-size: 11px;
    color: #64748b;
    letter-spacing: 0.8px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s, font-weight 0.3s;
}

.motto-word.active {
    opacity: 1;
    transform: translateY(0);
    color: #334155;
    font-weight: bold;
}

.motto-word.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Bottom Progress Slider */
.slider-container {
    position: absolute;
    bottom: 60px;
    width: 120px;
    height: 3px;
    background-color: #e2e8f0;
    border-radius: 1.5px;
    overflow: hidden;
}

.slider-fill {
    width: 50px;
    height: 100%;
    background-color: #0ca5ed;
    border-radius: 1.5px;
    animation: progressSlide 1.2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}
