/* ═══════════════════════════════════════════════════════════════
   NETFLIX-STYLE SPLASH / INTRO ANIMATION
   ═══════════════════════════════════════════════════════════════ */

/* ── Full-screen splash overlay ─────────────────────────────── */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 30%, #0c2d6b 0%, #061735 55%, #020b1a 100%);
    overflow: hidden;
    transition: opacity 0.6s cubic-bezier(.4, 0, .2, 1),
        visibility 0.6s;
}

.splash-screen.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── Ambient particles / bokeh ──────────────────────────────── */
.splash-screen::before,
.splash-screen::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: splashPulse 4s ease-in-out infinite alternate;
}

.splash-screen::before {
    width: 300px;
    height: 300px;
    background: #1a73e8;
    top: 10%;
    left: 15%;
}

.splash-screen::after {
    width: 250px;
    height: 250px;
    background: #ffd166;
    bottom: 15%;
    right: 10%;
    animation-delay: 2s;
}

@keyframes splashPulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1.3);
        opacity: 0.4;
    }
}

/* ── Logo container ─────────────────────────────────────────── */
.splash-logo-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    z-index: 2;
}

/* Ring glow behind logo */
.splash-logo-ring {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.15);
    animation: ringReveal 1.2s cubic-bezier(.4, 0, .2, 1) 0.3s both,
        ringGlow 2.5s ease-in-out 1.5s infinite alternate;
}

.splash-logo-ring::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(255, 209, 102, 0.08);
}

@keyframes ringReveal {
    0% {
        transform: scale(0.5);
        opacity: 0;
        border-color: rgba(255, 255, 255, 0);
    }

    60% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        border-color: rgba(255, 255, 255, 0.15);
    }
}

@keyframes ringGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(26, 115, 232, 0), 0 0 30px rgba(26, 115, 232, 0);
    }

    100% {
        box-shadow: 0 0 0 8px rgba(26, 115, 232, 0.08), 0 0 40px rgba(26, 115, 232, 0.15);
    }
}

/* Logo image itself */
.splash-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    animation: logoEnter 1s cubic-bezier(.4, 0, .2, 1) 0.1s both;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.1),
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(26, 115, 232, 0.2);
}

@keyframes logoEnter {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
        filter: blur(10px);
    }

    50% {
        transform: scale(1.15) rotate(3deg);
        opacity: 1;
        filter: blur(0);
    }

    70% {
        transform: scale(0.95) rotate(-1deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: blur(0);
    }
}

/* ── Text below logo ────────────────────────────────────────── */
.splash-text {
    z-index: 2;
    text-align: center;
    margin-top: 1.5rem;
}

.splash-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    margin: 0;
    animation: textReveal 0.8s cubic-bezier(.4, 0, .2, 1) 0.7s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.splash-subtitle {
    font-size: 0.82rem;
    color: rgba(255, 209, 102, 0.85);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 0.4rem;
    animation: textReveal 0.8s cubic-bezier(.4, 0, .2, 1) 0.95s both;
}

@keyframes textReveal {
    0% {
        transform: translateY(20px);
        opacity: 0;
        filter: blur(6px);
    }

    100% {
        transform: translateY(0);
        opacity: 1;
        filter: blur(0);
    }
}

/* ── Loading bar at bottom ──────────────────────────────────── */
.splash-loader {
    position: absolute;
    bottom: 60px;
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    z-index: 2;
    animation: textReveal 0.6s ease 1.2s both;
}

.splash-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1a73e8, #ffd166);
    border-radius: 2px;
    animation: loaderFill 1.8s cubic-bezier(.4, 0, .2, 1) 1.3s forwards;
}

@keyframes loaderFill {
    0% {
        width: 0%;
    }

    30% {
        width: 40%;
    }

    60% {
        width: 70%;
    }

    90% {
        width: 92%;
    }

    100% {
        width: 100%;
    }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .splash-logo-wrap {
        width: 120px;
        height: 120px;
    }

    .splash-title {
        font-size: 1.1rem;
    }

    .splash-subtitle {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PAGE TRANSITION LOADER  (shows when navigating between pages)
   ═══════════════════════════════════════════════════════════════ */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(6, 15, 30, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.page-loader-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(26, 115, 232, 0.3);
    animation: pageLoaderPulse 1.5s ease-in-out infinite;
}

@keyframes pageLoaderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(26, 115, 232, 0.2);
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        box-shadow: 0 0 40px rgba(26, 115, 232, 0.4);
    }
}

.page-loader-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 1rem;
    animation: pageLoaderPulse 1.5s ease-in-out infinite;
}