/* Auth Loading Screen Styles */
.auth-loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-loading-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 20px;
}

.auth-loading-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: logoFloat 3s ease-in-out infinite;
}

.auth-loading-logo img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.auth-loading-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleFadeIn 1s ease-out;
}

.auth-loading-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.5;
    animation: subtitleFadeIn 1s ease-out 0.3s both;
}

.auth-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.auth-loading-message {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
    min-height: 20px;
    animation: messageFadeIn 0.5s ease-out;
}

.auth-loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
    animation: progressContainerFadeIn 0.5s ease-out 0.5s both;
}

.auth-loading-progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    animation: progress 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.auth-loading-status {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 20px;
    min-height: 16px;
    animation: statusFadeIn 0.5s ease-out 0.7s both;
}

.beta-badge {
    position: fixed;
    top: 0;
    right: 0;
    background: red;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10000;
    border-bottom-left-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: betaBadgeSlideIn 0.5s ease-out;
}

.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

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

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

@keyframes subtitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.8;
    }
}

@keyframes progressContainerFadeIn {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes statusFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}

@keyframes betaBadgeSlideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-loading-content {
        max-width: 320px;
        padding: 15px;
    }
    
    .auth-loading-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .auth-loading-logo img {
        width: 40px;
        height: 40px;
    }
    
    .auth-loading-title {
        font-size: 24px;
    }
    
    .auth-loading-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .auth-loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .auth-loading-progress {
        width: 150px;
    }
    
    .beta-badge {
        padding: 6px 12px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .auth-loading-content {
        max-width: 280px;
        padding: 10px;
    }
    
    .auth-loading-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .auth-loading-logo img {
        width: 30px;
        height: 30px;
    }
    
    .auth-loading-title {
        font-size: 20px;
    }
    
    .auth-loading-subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }
    
    .auth-loading-spinner {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }
    
    .auth-loading-progress {
        width: 120px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-loading-container {
        background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
    }
    
    .auth-loading-logo {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .auth-loading-progress {
        background: rgba(255, 255, 255, 0.25);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-loading-container {
        background: linear-gradient(135deg, #000080 0%, #800080 100%);
    }
    
    .auth-loading-logo {
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid white;
    }
    
    .auth-loading-progress {
        background: rgba(255, 255, 255, 0.3);
        border: 1px solid white;
    }
    
    .auth-loading-progress-bar {
        background: white;
        box-shadow: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .auth-loading-logo,
    .auth-loading-spinner,
    .auth-loading-progress-bar {
        animation: none;
    }
    
    .auth-loading-logo {
        transform: none;
    }
    
    .auth-loading-progress-bar {
        width: 100%;
    }
}
