﻿/* =========================================
   1. XP SCROLL BAR
========================================= */
#xp-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(0,0,0,0.3);
    z-index: 9999;
}

#xp-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #8f2fff, #ffb347);
    box-shadow: 0 0 10px rgba(143, 47, 255, 0.7);
    transition: width 0.1s ease-out;
}

/* =========================================
   2. MOUSE GLOW
========================================= */
#mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(140,100,255,0.15), transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 1;
    mix-blend-mode: screen;
}

@media (max-width: 768px) {
    #mouse-glow {
        display: none;
    }
}

/* =========================================
   3. TYPEWRITER EFFECT
========================================= */
.typewriter::after {
    content: "|";
    animation: blink 1s infinite;
    color: #ffb347;
    margin-left: 5px;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* =========================================
   4. PRELOADER
========================================= */
#preloader {
    position: fixed;
    inset: 0;
    background: #08051a;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.1);
    border-top: 5px solid #ffb347;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   5. BACKGROUND ANIMATIONS
========================================= */
.animated-bg {
    background-size: 200% 100%;
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.promo::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient( circle at center, rgba(130, 90, 255, 0.35), transparent 65% );
    animation: promoGlow 10s ease-in-out infinite;
    z-index: 0;
}

.promo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../assets/images/particles.png");
    opacity: 0.15;
    animation: drift 40s linear infinite;
    pointer-events: none;
}

@keyframes drift {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-200px);
    }
}

@keyframes promoGlow {
    0% {
        transform: scale(1) translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.08) translateY(-20px);
        opacity: 0.8;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 0.4;
    }
}

@keyframes aboutFadeLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes aboutFadeRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   6. SOCIAL SHARE BAR
========================================= */
.social-share {
    display: none;

    @media screen and (min-width: 768px) {
        display: flex;
    }

    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: fixed;
    top: 50vh;
    left: 0;
    transform: translateY(-50%);
    z-index: 999;
}

    .social-share a {
        width: 50px;
        height: 50px;
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: background-color 0.3s ease-in;
        display: flex;
        justify-content: center;
        margin-bottom: 5px;
    }

        .social-share a img {
            width: 24px;
            height: auto;
            align-self: center;
            filter: invert(1);
        }

        .social-share a:hover {
            background-color: #7f53ac;
        }

/* =========================================
   7. BACK TO TOP
========================================= */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9f7cff, #6aa8ff);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    z-index: 999;
    align-items: center;
    justify-content: center;
}

    #backToTop:hover {
        transform: translateY(-6px);
        box-shadow: 0 18px 45px rgba(0,0,0,0.8), 0 0 25px rgba(140,160,255,0.8), inset 0 0 15px rgba(255,255,255,0.3);
    }

    #backToTop:active {
        transform: translateY(-2px);
    }
