html,
body {
    background-color: #181D25;
    overscroll-behavior-x: none;
}

/* ---- Boot splash ---------------------------------------------------- */

.splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px 24px 72px;
    background-color: #181D25;
    font-family: 'Albert Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: opacity 0.4s ease;
}

.splash.is-done {
    opacity: 0;
    pointer-events: none;
}

/* Soft breathing glow behind the logo. */
.splash::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(560px, 90vw);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(88, 128, 255, 0.14) 0%, rgba(88, 128, 255, 0) 65%);
    animation: glow 4s ease-in-out infinite;
    pointer-events: none;
}

.splash-logo {
    position: relative;
    max-width: 150px;
    animation: fadein 1s ease, float 5s ease-in-out 1s infinite;
}

.splash-bar {
    position: relative;
    width: 160px;
    height: 3px;
    border-radius: 3px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.08);
}

.splash-bar span {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.15));
    animation: slide 1.4s ease-in-out infinite;
}

.splash-tip {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin-top: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.03);
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.splash-tip.is-visible {
    opacity: 1;
    transform: none;
}

.splash-tip-label {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(140, 170, 255, 0.85);
}

.splash-tip-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}

.splash-note {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.splash-note.is-visible {
    opacity: 1;
}

/* Phones and narrow windows: bigger, higher-contrast copy. */
@media (max-width: 600px) {
    .splash {
        gap: 20px;
        padding: 24px 20px 80px;
    }

    .splash-logo {
        max-width: 116px;
    }

    .splash-tip {
        max-width: 100%;
        padding: 20px 16px;
    }

    .splash-tip-label {
        font-size: 12px;
    }

    .splash-tip-text {
        font-size: 17px;
        line-height: 1.65;
        color: #fff;
    }

    .splash-note {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.6);
    }
}

/* Very short viewports (landscape phones): drop the glow, tighten it up. */
@media (max-height: 480px) {
    .splash::before {
        display: none;
    }

    .splash {
        gap: 12px;
        padding: 16px 20px 56px;
    }

    .splash-logo {
        max-width: 88px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .splash::before,
    .splash-logo,
    .splash-bar span {
        animation: none;
    }
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.55;
        transform: translate(-50%, -50%) scale(0.92);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(250%);
    }
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}
