/* Left-to-Right Text Reveal Animation with Shining Effect */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* Profile image styling */
.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 4px solid #E50914;
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.8), inset 0 0 10px rgba(229, 9, 20, 0.3);
    opacity: 0;
    transform: scale(0.5);
    animation: profile-reveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow: hidden;
    position: relative;
}

.profile-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 0, 0, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shine-rotate 2s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes shine-rotate {
    0% {
        transform: rotate(45deg) translateY(-100%);
    }
    50% {
        transform: rotate(45deg) translateY(100%);
    }
    100% {
        transform: rotate(45deg) translateY(100%);
    }
}

@keyframes profile-reveal {
    0% {
        opacity: 0;
        transform: scale(0.2) rotateY(90deg);
    }
    40% {
        opacity: 1;
        transform: scale(1.2) rotateY(0deg);
    }
    60% {
        transform: scale(0.9) rotateY(0deg);
    }
    80% {
        transform: scale(1.1) rotateY(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.text-reveal {
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
}

.text-reveal h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    color: #E50914;
    background: linear-gradient(to bottom, #ff0f23, #E50914, #c40812);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
    display: block;
    position: relative;
    text-transform: uppercase;
}

/* Text reveal animation */
.text-reveal h1 {
    clip-path: inset(0 100% 0 0);
    animation: text-reveal 3.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    animation-delay: 0.8s;
}

@keyframes text-reveal {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    20% {
        clip-path: inset(0 80% 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* Shining effect */
.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: shine 3s ease-in-out infinite;
    animation-delay: 3s;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* Fade out for the entire container */
.loaded .loading-container {
    animation: fade-out 0.5s forwards;
}

@keyframes fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .text-reveal h1 {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .text-reveal h1 {
        font-size: 2rem;
        letter-spacing: 0.5px;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }
}