.cw-pwa-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(31, 182, 188, 0.22) 0%, rgba(10, 15, 31, 0) 40%),
        radial-gradient(circle at 80% 80%, rgba(239, 68, 68, 0.18) 0%, rgba(10, 15, 31, 0) 42%),
        linear-gradient(145deg, #070b16 0%, #0a0f1f 55%, #081024 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity 320ms ease, visibility 320ms ease;
}

.cw-pwa-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cw-pwa-splash__grain {
    position: absolute;
    inset: -20%;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.28) 0.8px, transparent 0.8px);
    background-size: 3px 3px;
    mix-blend-mode: soft-light;
    animation: cw-pwa-grain 6s linear infinite;
}

.cw-pwa-splash__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: min(86vw, 340px);
    text-align: center;
}

.cw-pwa-splash__orb {
    position: absolute;
    inset: auto auto 34px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 182, 188, 0.4) 0%, rgba(14, 165, 233, 0.2) 45%, rgba(14, 165, 233, 0) 75%);
    filter: blur(18px);
    animation: cw-pwa-orb 2.4s ease-in-out infinite;
}

.cw-pwa-splash__logo-wrap {
    position: relative;
    width: clamp(96px, 22vw, 132px);
    height: clamp(96px, 22vw, 132px);
    border-radius: 28px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    animation: cw-pwa-logo-wrap 1.6s ease-out both;
}

.cw-pwa-splash__logo {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
    animation: cw-pwa-logo-float 2.1s ease-in-out infinite;
}

.cw-pwa-splash__title {
    font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: clamp(20px, 4.8vw, 30px);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    margin: 0;
}

.cw-pwa-splash__title .cw-red {
    color: #ef4444;
}

.cw-pwa-splash__title .cw-cyan {
    color: #1fb6bc;
}

.cw-pwa-splash__subtitle {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.74);
}

.cw-pwa-splash__progress {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.cw-pwa-splash__progress > span {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 25%, #1fb6bc 70%, #38bdf8 100%);
    animation: cw-pwa-progress 1.1s ease-in-out infinite alternate;
}

@keyframes cw-pwa-logo-wrap {
    from {
        opacity: 0;
        transform: scale(0.84) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes cw-pwa-logo-float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-4px) rotate(-1.5deg);
    }
}

@keyframes cw-pwa-orb {
    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes cw-pwa-progress {
    from {
        transform: scaleX(0.32);
        opacity: 0.78;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes cw-pwa-grain {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-3%, 2%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cw-pwa-splash__grain,
    .cw-pwa-splash__orb,
    .cw-pwa-splash__logo,
    .cw-pwa-splash__progress > span,
    .cw-pwa-splash__logo-wrap {
        animation: none !important;
    }
}
