/* =========================================
   PREMIUM CYBER-TECH INTRO ANIMATION (V2)
   ========================================= */

:root {
    --primary-neon: #4fe3d7;
    --secondary-neon: #0e78c8;
    --accent-neon: #ff6b00;
    --bg-dark: #050a15;
    --text-light: #e0e6ed;
    --neural-dot: rgba(79, 227, 215, 0.4);
    --neural-line: rgba(79, 227, 215, 0.1);
}

.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    /* Solid background for immediate visibility */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000000;
    /* Higher z-index */
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease, visibility 1s ease;
}

/* --- Particle Vortex Background --- */
.vortex-bg {
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 80%);
    z-index: 1;
}

.particle-stream {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--neural-dot) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.1;
    animation: streamMove 30s linear infinite;
}

@keyframes streamMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-1000px);
    }
}

/* --- Central Logo Area --- */
.logo-portal {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Neural Network Background behind logo */
.neural-net {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 227, 215, 0.05) 0%, transparent 70%);
    animation: portalPulse 4s ease-in-out infinite;
}

/* Rotating Energy Rings */
.energy-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-outer {
    width: 320px;
    height: 320px;
    border-top: 2px solid var(--primary-neon);
    border-bottom: 2px solid var(--secondary-neon);
    animation: rotateRing 10s linear infinite;
    opacity: 0.3;
}

.ring-inner {
    width: 260px;
    height: 260px;
    border-left: 2px solid var(--accent-neon);
    border-right: 2px solid var(--primary-neon);
    animation: rotateRing 6s linear infinite reverse;
    opacity: 0.2;
}

@keyframes rotateRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes portalPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* --- The Logo --- */
.main-logo {
    width: 300px;
    height: auto;
    z-index: 20;
    filter: drop-shadow(0 0 15px rgba(79, 227, 215, 0.4));
    opacity: 0;
    transform: scale(0.9);
    animation: logoEmerge 1.2s cubic-bezier(0.1, 0.7, 0.4, 1) 0.3s forwards;
}

@keyframes logoEmerge {
    from {
        opacity: 0;
        transform: scale(0.8) translateZ(-50px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateZ(0);
        filter: blur(0);
    }
}

/* --- Loading System --- */
.loading-box {
    position: absolute;
    bottom: 10vh;
    width: 300px;
    text-align: center;
    z-index: 30;
}

.loading-text {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 5px;
    color: var(--text-light);
    margin-bottom: 15px;
    text-transform: uppercase;
    opacity: 0.7;
}

.progress-container {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-neon), var(--primary-neon));
    box-shadow: 0 0 10px var(--primary-neon);
}

.percentage {
    position: absolute;
    right: 0;
    top: -25px;
    font-size: 0.7rem;
    color: var(--primary-neon);
    font-weight: bold;
    font-family: monospace;
}

/* --- Data Visualizer (Side) --- */
.side-data {
    position: absolute;
    left: 40px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 5;
}

.data-line {
    width: 2px;
    background: var(--primary-neon);
    opacity: 0.3;
}

.line-1 {
    height: 40px;
    animation: dataHeight 2s infinite alternate;
}

.line-2 {
    height: 60px;
    animation: dataHeight 1.5s infinite alternate-reverse;
}

@keyframes dataHeight {
    from {
        height: 20px;
    }

    to {
        height: 80px;
    }
}

/* --- Exit Transition --- */
.intro-screen.fade-off {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .main-logo {
        width: 220px;
    }

    .logo-portal {
        width: 300px;
        height: 300px;
    }

    .ring-outer {
        width: 260px;
        height: 260px;
    }

    .ring-inner {
        width: 200px;
        height: 200px;
    }
}