/* ========================================
   WhereAreWeGoing? - Animations & Loading
   🚀 AYAAN THEME - ULTRA CYAN EDITION 🚀
   ======================================== */

/* ========================================
   Loading Overlay - MEGA BEAUTIFUL
   ======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 5, 15, 0.97);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    backdrop-filter: blur(10px);
}

.loading-overlay.active {
    display: flex;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-content {
    text-align: center;
    padding: 50px;
}

/* MEGA Animated black hole loader */
.loading-blackhole {
    width: 180px;
    height: 180px;
    position: relative;
    margin: 0 auto 50px;
}

.bh-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
}

.bh-ring.r1 {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-top-color: var(--neon-cyan);
    border-right-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan), inset 0 0 20px rgba(0, 255, 255, 0.1);
    animation: bhSpin 1.8s linear infinite;
}

.bh-ring.r2 {
    width: 75%;
    height: 75%;
    top: 12.5%;
    left: 12.5%;
    border-bottom-color: var(--neon-purple);
    border-left-color: var(--neon-purple);
    box-shadow: 0 0 15px var(--neon-purple), inset 0 0 15px rgba(144, 0, 255, 0.1);
    animation: bhSpin 1.3s linear infinite reverse;
}

.bh-ring.r3 {
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    border-top-color: var(--neon-pink);
    border-right-color: var(--neon-pink);
    box-shadow: 0 0 12px var(--neon-pink), inset 0 0 12px rgba(255, 0, 128, 0.1);
    animation: bhSpin 0.9s linear infinite;
}

@keyframes bhSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bh-core {
    position: absolute;
    width: 35%;
    height: 35%;
    top: 32.5%;
    left: 32.5%;
    background: radial-gradient(circle, #000510 0%, #000 60%, #0a0020 100%);
    border-radius: 50%;
    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 0 30px rgba(0, 255, 255, 0.3);
    animation: bhPulse 1.5s ease-in-out infinite;
}

@keyframes bhPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 50px rgba(0, 0, 0, 0.9),
            0 0 30px rgba(0, 255, 255, 0.2),
            inset 0 0 30px rgba(0, 255, 255, 0.3);
    }
    50% {
        transform: scale(0.9);
        box-shadow:
            0 0 70px rgba(0, 0, 0, 0.95),
            0 0 50px rgba(0, 255, 255, 0.4),
            inset 0 0 40px rgba(144, 0, 255, 0.4);
    }
}

.bh-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.bh-particles span {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--neon-cyan), 0 0 24px var(--neon-cyan);
}

.bh-particles span:nth-child(odd) {
    background: var(--neon-pink);
    box-shadow: 0 0 12px var(--neon-pink), 0 0 24px var(--neon-pink);
}

.bh-particles span:nth-child(3n) {
    background: var(--neon-purple);
    box-shadow: 0 0 12px var(--neon-purple), 0 0 24px var(--neon-purple);
}

.bh-particles span:nth-child(1) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 0s; }
.bh-particles span:nth-child(2) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 0.15s; }
.bh-particles span:nth-child(3) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 0.3s; }
.bh-particles span:nth-child(4) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 0.45s; }
.bh-particles span:nth-child(5) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 0.6s; }
.bh-particles span:nth-child(6) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 0.75s; }
.bh-particles span:nth-child(7) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 0.9s; }
.bh-particles span:nth-child(8) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 1.05s; }
.bh-particles span:nth-child(9) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 1.2s; }
.bh-particles span:nth-child(10) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 1.35s; }
.bh-particles span:nth-child(11) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 1.5s; }
.bh-particles span:nth-child(12) { animation: bhParticle 1.8s ease-in-out infinite; animation-delay: 1.65s; }

@keyframes bhParticle {
    0% {
        opacity: 0;
        transform: rotate(calc(var(--i, 0) * 30deg)) translateX(120px) scale(0);
    }
    15% {
        opacity: 1;
        transform: rotate(calc(var(--i, 0) * 30deg + 20deg)) translateX(100px) scale(1);
    }
    85% {
        opacity: 1;
        transform: rotate(calc(var(--i, 0) * 30deg + 160deg)) translateX(25px) scale(0.4);
    }
    100% {
        opacity: 0;
        transform: rotate(calc(var(--i, 0) * 30deg + 180deg)) translateX(0) scale(0);
    }
}

.bh-particles span:nth-child(1) { --i: 0; }
.bh-particles span:nth-child(2) { --i: 1; }
.bh-particles span:nth-child(3) { --i: 2; }
.bh-particles span:nth-child(4) { --i: 3; }
.bh-particles span:nth-child(5) { --i: 4; }
.bh-particles span:nth-child(6) { --i: 5; }
.bh-particles span:nth-child(7) { --i: 6; }
.bh-particles span:nth-child(8) { --i: 7; }
.bh-particles span:nth-child(9) { --i: 8; }
.bh-particles span:nth-child(10) { --i: 9; }
.bh-particles span:nth-child(11) { --i: 10; }
.bh-particles span:nth-child(12) { --i: 11; }

.loading-text {
    margin-bottom: 35px;
}

.loading-status {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    color: var(--neon-cyan);
    margin-bottom: 15px;
    animation: statusPulse 1.2s ease-in-out infinite;
    text-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
}

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

.loading-url {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 450px;
    margin: 0 auto;
    word-break: break-all;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.loading-progress {
    max-width: 350px;
    margin: 0 auto;
}

.progress-track {
    width: 100%;
    height: 5px;
    background: rgba(0, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.progress-fill {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    border-radius: 3px;
    animation: progressPulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 15px var(--neon-cyan);
}

@keyframes progressPulse {
    0%, 100% {
        width: 15%;
        margin-left: 0%;
    }
    50% {
        width: 45%;
        margin-left: 55%;
    }
}

.progress-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
}

/* ========================================
   Glitch Effects - AYAAN STYLE
   ======================================== */

.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.glitch-text::before {
    color: var(--neon-cyan);
    animation: glitchBefore 2.5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
    transform: translate(-3px);
}

.glitch-text::after {
    color: var(--neon-pink);
    animation: glitchAfter 2.5s infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    transform: translate(3px);
}

@keyframes glitchBefore {
    0%, 100% { transform: translate(-3px); opacity: 0.9; }
    20% { transform: translate(3px); }
    40% { transform: translate(-3px); opacity: 0; }
    60% { transform: translate(2px); opacity: 0.9; }
    80% { transform: translate(-2px); }
}

@keyframes glitchAfter {
    0%, 100% { transform: translate(3px); opacity: 0.9; }
    20% { transform: translate(-3px); }
    40% { transform: translate(3px); opacity: 0; }
    60% { transform: translate(-2px); opacity: 0.9; }
    80% { transform: translate(2px); }
}

/* ========================================
   Cyber Effects - MEGA CYAN
   ======================================== */

/* Holographic shimmer */
.holographic {
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.15) 0%,
        rgba(144, 0, 255, 0.1) 25%,
        rgba(255, 0, 128, 0.1) 50%,
        rgba(0, 255, 255, 0.15) 75%,
        rgba(144, 0, 255, 0.1) 100%
    );
    background-size: 400% 400%;
    animation: holoShimmer 4s ease infinite;
}

@keyframes holoShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Data stream effect */
.data-stream {
    position: relative;
    overflow: hidden;
}

.data-stream::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 255, 255, 0.04) 2px,
        rgba(0, 255, 255, 0.04) 4px
    );
    animation: dataFlow 15s linear infinite;
    pointer-events: none;
}

@keyframes dataFlow {
    0% { transform: translateY(0); }
    100% { transform: translateY(50%); }
}

/* Pulse ring */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseExpand 1.5s ease-out infinite;
}

@keyframes pulseExpand {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 180%;
        height: 180%;
        opacity: 0;
    }
}

/* Typing effect */
.typing-effect {
    overflow: hidden;
    border-right: 3px solid var(--neon-cyan);
    white-space: nowrap;
    animation:
        typing 2s steps(30) forwards,
        blinkCursor 0.6s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--neon-cyan); }
}

/* Electric border */
.electric-border {
    position: relative;
}

.electric-border::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink), var(--neon-cyan));
    background-size: 400% 100%;
    z-index: -1;
    animation: electricFlow 2.5s linear infinite;
    opacity: 0.8;
}

@keyframes electricFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 400% 0%; }
}

/* Flicker effect */
.flicker {
    animation: flicker 0.1s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Neon glow animation - MEGA */
.neon-glow {
    animation: neonPulse 1.5s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow:
            0 0 8px currentColor,
            0 0 15px currentColor,
            0 0 25px currentColor;
    }
    50% {
        text-shadow:
            0 0 15px currentColor,
            0 0 30px currentColor,
            0 0 50px currentColor;
    }
}

/* Matrix rain (for background) */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--neon-cyan);
    writing-mode: vertical-rl;
    animation: matrixFall linear infinite;
    opacity: 0.6;
    text-shadow: 0 0 8px var(--neon-cyan);
}

@keyframes matrixFall {
    0% { transform: translateY(0); }
    100% { transform: translateY(200vh); }
}

/* Scanline pass effect */
.scanline-pass {
    position: relative;
    overflow: hidden;
}

.scanline-pass::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(180deg, transparent, var(--neon-cyan), transparent);
    animation: scanlinePass 2.5s linear infinite;
    box-shadow: 0 0 20px var(--neon-cyan);
}

@keyframes scanlinePass {
    0% { top: -6px; }
    100% { top: 100%; }
}

/* Warp speed effect (for transitions) */
.warp-speed {
    animation: warpIn 0.4s ease-out forwards;
}

@keyframes warpIn {
    0% {
        transform: scale(0.4) translateZ(-600px);
        opacity: 0;
        filter: blur(15px);
    }
    100% {
        transform: scale(1) translateZ(0);
        opacity: 1;
        filter: blur(0);
    }
}

/* Chromatic aberration */
.chromatic {
    position: relative;
}

.chromatic::before,
.chromatic::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.chromatic::before {
    color: var(--neon-cyan);
    animation: chromaticR 1.5s ease-in-out infinite;
}

.chromatic::after {
    color: var(--neon-pink);
    animation: chromaticB 1.5s ease-in-out infinite;
}

@keyframes chromaticR {
    0%, 100% { transform: translate(-3px, 0); }
    50% { transform: translate(3px, 0); }
}

@keyframes chromaticB {
    0%, 100% { transform: translate(3px, 0); }
    50% { transform: translate(-3px, 0); }
}

/* Floating animation */
.float {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Rotate glow */
.rotate-glow {
    animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
    0% {
        filter: drop-shadow(0 0 15px var(--neon-cyan));
    }
    33% {
        filter: drop-shadow(0 0 15px var(--neon-purple));
    }
    66% {
        filter: drop-shadow(0 0 15px var(--neon-pink));
    }
    100% {
        filter: drop-shadow(0 0 15px var(--neon-cyan));
    }
}

/* Shimmer text */
.shimmer-text {
    background: linear-gradient(
        90deg,
        var(--neon-cyan) 0%,
        var(--neon-cyan-bright) 25%,
        var(--neon-purple) 50%,
        var(--neon-cyan-bright) 75%,
        var(--neon-cyan) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s linear infinite;
}

@keyframes shimmerText {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
