/* Loading Screen Styles - UPDATED WITH SIZE CONTROL */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00375f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 0.8s ease-in-out, opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* UPDATED: Lottie Animation Container with Size Control */
.lottie-container {
    width: 150px; /* Adjust this to make logo bigger/smaller */
    height: 150px; /* Adjust this to make logo bigger/smaller */
    margin-bottom: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure Lottie animation fills container properly */
.lottie-container svg,
.lottie-container lottie-player {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

/* Loading Bar */
.loading-bar-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background: white;
    width: 0;
    border-radius: 2px;
    animation: loadingProgress 3s ease-in-out forwards;
}

@keyframes loadingProgress {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* NEW: Slide out animation to top */
.loading-screen.slide-out-top {
    transform: translateY(-100%);
}

/* Responsive sizes */
@media (max-width: 768px) {
    .lottie-container {
        width: 250px; /* Smaller on mobile */
        height: 250px;
    }
    
    .loading-bar-container {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .lottie-container {
        width: 200px; /* Even smaller on small mobile */
        height: 200px;
    }
    
    .loading-bar-container {
        width: 200px;
    }
}

@keyframes loadingProgress {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Page Transition Overlay */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00375f;
    z-index: 8888;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Transition Directions */
.transition-overlay.slide-left {
    transform: translateX(-100%);
}

.transition-overlay.slide-right {
    transform: translateX(100%);
}

.transition-overlay.slide-up {
    transform: translateY(-100%);
}

.transition-overlay.slide-down {
    transform: translateY(100%);
}

.transition-overlay.active.slide-left,
.transition-overlay.active.slide-right {
    animation: slideHorizontal 0.5s ease-out forwards;
}

.transition-overlay.active.slide-up,
.transition-overlay.active.slide-down {
    animation: slideVertical 0.5s ease-out forwards;
}

@keyframes slideHorizontal {
    0% { transform: translateX(var(--start-x)); }
    100% { transform: translateX(0); }
}

@keyframes slideVertical {
    0% { transform: translateY(var(--start-y)); }
    100% { transform: translateY(0); }
}

/* Transition GIF */
.transition-gif {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transition-gif img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Prevent body scroll during transitions */
body.transitioning {
    overflow: hidden;
}