/* Loading Screen Component Styles */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Archivo', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Update the loader content to match desktop on mobile */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    animation: loader-fade-in 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    /* ADD: Ensure consistent sizing on mobile */
    max-width: 300px;
    width: 80vw;
    margin: 0 auto;
}

@keyframes loader-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo and Propeller Row - Keep horizontal on mobile */
.logo-propeller-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    /* Ensure it stays horizontal on all screens */
    flex-direction: row !important;
}

/* Propeller Styles */
.propeller-container {
    width: 120px;
    height: 120px;
    position: relative;
}

.propeller {
    width: 100%;
    height: 100%;
    animation: propeller-spin 1.8s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
    filter: drop-shadow(0 0 10px rgba(229, 24, 37, 0.3));
}

@keyframes propeller-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Brand Logo */
.brand-logo {
    position: relative;
}

.logo-text {
    width: 360px;
    height: auto;
    animation: logo-glow 2s ease-in-out infinite alternate;
}

@keyframes logo-glow {
    from {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
    }
    to {
        filter: drop-shadow(0 0 15px rgba(229, 24, 37, 0.4));
    }
}

/* Progress Bar */
.loading-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 300px;
    animation: progress-fade-in 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

@keyframes progress-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-track {
    width: 100%;
    height: 3px;
    background: #1a1a1a;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #e51825, #ff3344, #e51825);
    background-size: 200% 100%;
    border-radius: 3px;
    width: 0%;
    animation: 
        progress-load 3s cubic-bezier(0.4, 0, 0.2, 1) forwards,
        progress-shimmer 1.5s linear infinite;
    box-shadow: 
        0 0 10px rgba(229, 24, 37, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes progress-load {
    0% { width: 0%; }
    20% { width: 15%; }
    40% { width: 35%; }
    60% { width: 55%; }
    80% { width: 80%; }
    95% { width: 98%; }
    100% { width: 100%; }
}

@keyframes progress-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-text {
    font-size: 10px;
    font-weight: 700;
    color: #707070;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    animation: text-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes text-pulse {
    from {
        opacity: 0.6;
        color: #707070;
    }
    to {
        opacity: 1;
        color: #909090;
    }
}

/* Update mobile media queries to maintain desktop layout */
@media (max-width: 768px) {
    .loader-content {
        gap: 2.5rem;
        padding: 2rem;
        /* Keep the same layout as desktop */
        max-width: 300px;
        width: 80vw;
    }
    
    .logo-propeller-row {
        /* Remove the column direction - keep it horizontal */
        flex-direction: row !important;
        gap: 2rem;
        text-align: center;
    }
    
    /* Keep propeller and logo sizes proportional */
    .propeller-container {
        width: 80px;
        height: 80px;
    }
    
    .logo-text {
        width: 220px; /* Reduced proportionally */
        height: auto;
    }
    
    .loading-progress {
        width: 100%; /* Full width of container */
    }
    
    .loading-text {
        font-size: 9px;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .loader-content {
        gap: 2rem;
        padding: 1.5rem;
        /* Maintain consistent sizing */
        max-width: 300px;
        width: 80vw;
    }
    
    .logo-propeller-row {
        /* Keep horizontal layout */
        flex-direction: row !important;
        gap: 1.5rem;
    }
    
    .propeller-container {
        width: 60px;
        height: 60px;
    }
    
    .logo-text {
        width: 180px; /* Further reduced proportionally */
        height: auto;
    }
    
    .loading-progress {
        width: 100%;
    }
    
    .progress-track {
        height: 2px;
    }
    
    .loading-text {
        font-size: 8px;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 480px) {
    .loader-content {
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .propeller-container {
        width: 70px;
        height: 70px;
    }
    
    .logo-text {
        width: 240px;
    }
    
    .loading-progress {
        width: 200px;
    }
    
    .progress-track {
        height: 2px;
    }
    
    .loading-text {
        font-size: 8px;
        letter-spacing: 1.5px;
    }
}

/* Accessibility - Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .propeller {
        animation-duration: 3s;
    }
    
    .progress-fill {
        animation: progress-load 2s linear forwards;
    }
    
    .logo-glow,
    .text-pulse,
    .progress-shimmer {
        animation: none;
    }
    
    .loader-content {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .loading-progress {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .page-loader {
        background: #000000;
    }
    
    .progress-track {
        background: #333333;
    }
    
    .progress-fill {
        background: #ff0000;
        box-shadow: none;
    }
    
    .loading-text {
        color: #ffffff;
    }
}

/* Dark mode override (for consistency) */
@media (prefers-color-scheme: dark) {
    .page-loader {
        background: #000000;
    }
    
    .progress-track {
        background: #1a1a1a;
    }
}