/* USC Preloader Styles */
.usc-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #5d121e 0%, #830000 50%, #5d121e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease-in-out;
}

.usc-preloader.active {
    opacity: 1;
    visibility: visible;
}

.usc-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* USC Logo Animation Container */
.preloader-logo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

/* USC Logo */
.preloader-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
    animation: logoFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* USC Text */
.preloader-text {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
    animation: textGlow 2s ease-in-out infinite alternate;
}

.preloader-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 2rem;
    animation: subtitleFade 2s ease-in-out infinite alternate;
}

/* Loading Animation */
.preloader-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: rgba(255, 215, 0, 0.6);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: rgba(255, 215, 0, 0.3);
    animation-duration: 2s;
}

/* Loading Text */
.preloader-loading-text {
    margin-top: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

/* Loading Dots Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

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

@keyframes textGlow {
    0% {
        text-shadow: 2px 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(255, 215, 0, 0.3);
    }
    100% {
        text-shadow: 2px 2px 8px rgba(0,0,0,0.5), 0 0 30px rgba(255, 215, 0, 0.6);
    }
}

@keyframes subtitleFade {
    0% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

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

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .preloader-logo {
        width: 80px;
        height: 80px;
    }
    
    .preloader-text {
        font-size: 2rem;
    }
    
    .preloader-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .preloader-spinner {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .preloader-logo {
        width: 60px;
        height: 60px;
    }
    
    .preloader-text {
        font-size: 1.5rem;
    }
    
    .preloader-subtitle {
        font-size: 0.9rem;
    }
    
    .preloader-spinner {
        width: 40px;
        height: 40px;
    }
}

/* Smooth page transition */
body.preloader-active {
    overflow: hidden;
}

/* Additional USC-themed elements */
.preloader-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    animation: particleFloat 6s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}