/* Loading Screen Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0D7F69, #43AC3C, #013C4A);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.loading-overlay.show {
    display: flex;
    opacity: 1;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

/* Hockey Ball Animation */
.hockey-ball-container {
    position: relative;
    margin-bottom: 40px;
}

.hockey-ball {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #f0f0f0);
    border-radius: 50%;
    position: relative;
    animation: rollAndBounce 2s ease-in-out infinite;
    box-shadow: 
        inset -4px -4px 8px rgba(0,0,0,0.2),
        inset 2px 2px 4px rgba(255,255,255,0.8),
        0 8px 16px rgba(0,0,0,0.3);
}

.hockey-ball::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle at 40% 40%, #ffffff, transparent);
    border-radius: 50%;
    opacity: 0.8;
}

.hockey-ball-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: shadowPulse 2s ease-in-out infinite;
}

@keyframes rollAndBounce {
    0% {
        transform: translateX(-100px) rotate(0deg);
        animation-timing-function: ease-out;
    }
    25% {
        transform: translateX(0px) rotate(90deg);
        animation-timing-function: ease-in;
    }
    50% {
        transform: translateX(100px) rotate(180deg);
        animation-timing-function: ease-out;
    }
    75% {
        transform: translateX(0px) rotate(270deg);
        animation-timing-function: ease-in;
    }
    100% {
        transform: translateX(-100px) rotate(360deg);
        animation-timing-function: ease-out;
    }
}

@keyframes shadowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1.2);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Loading Text */
.loading-text {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.loading-text h3 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: textGlow 2s ease-in-out infinite alternate;
}

.loading-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@keyframes textGlow {
    0% {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
    100% {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3), 0 0 20px rgba(255,255,255,0.5);
    }
}

/* Progress Bar */
.progress-container {
    width: 300px;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0E8F5C, #43AC3C, #0D7F69);
    border-radius: 4px;
    width: 0%;
    animation: progressFill 2s ease-in-out infinite;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressFill {
    0% {
        width: 0%;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hockey-ball {
        width: 60px;
        height: 60px;
    }
    
    .loading-text h3 {
        font-size: 2rem;
    }
    
    .loading-text p {
        font-size: 1rem;
    }
    
    .progress-container {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .hockey-ball {
        width: 50px;
        height: 50px;
    }
    
    .loading-text h3 {
        font-size: 1.8rem;
    }
    
    .progress-container {
        width: 200px;
    }
}

/* Loading Screen States */
.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Smooth transitions for content */
#main-content-wrapper {
    transition: opacity 0.3s ease-in-out;
}

#main-content-wrapper.loading {
    opacity: 0.3;
}

#main-content-wrapper.loaded {
    opacity: 1;
}
