html,
body {
    height: 100%;
    margin: 0;
    min-height: 100%;
    overflow: hidden;
    width: 100%;
}

#out {
    height: 100%;
    min-height: 100%;
    width: 100%;
}

/* HTML styles for the splash screen */
.avalonia-splash {
    align-items: center;
    background: white;
    display: flex;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    height: 100%;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.splash-brand {
    align-items: center;
    animation: splash-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.splash-logo-ring {
    align-items: center;
    animation: splash-breathe 1800ms ease-in-out infinite;
    display: flex;
    height: 112px;
    justify-content: center;
    position: relative;
    width: 112px;
}

.splash-logo-ring::before {
    animation: splash-ring 1800ms ease-out infinite;
    border: 1px solid rgba(27, 42, 78, 0.2);
    border-radius: 999px;
    content: "";
    inset: 0;
    position: absolute;
}

.splash-logo {
    height: 96px;
    position: relative;
    width: 96px;
}

.splash-title {
    animation: splash-title 640ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
    color: #1b2a4e;
    font-size: 2rem;
    font-weight: 650;
    line-height: 1.2;
}

.splash-progress {
    background: rgba(27, 42, 78, 0.14);
    border-radius: 999px;
    height: 3px;
    margin-top: 4px;
    overflow: hidden;
    position: relative;
    width: 112px;
}

.splash-progress::after {
    animation: splash-progress 1200ms ease-in-out infinite;
    background: #1b2a4e;
    border-radius: inherit;
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transform: translateX(-72px);
    width: 52px;
}

/* Light theme styles */
@media (prefers-color-scheme: light) {
    .avalonia-splash {
        background: white;
    }

    .splash-title {
        color: #1b2a4e;
    }
}

@media (prefers-color-scheme: dark) {
    .avalonia-splash {
        background: #1b2a4e;
    }

    .splash-title {
        color: white;
    }

    .splash-logo-ring::before {
        border-color: rgba(255, 255, 255, 0.24);
    }

    .splash-progress {
        background: rgba(255, 255, 255, 0.18);
    }

    .splash-progress::after {
        background: white;
    }
}

.avalonia-splash.splash-close {
    display: none;
    opacity: 0;
    transition: opacity 200ms, display 200ms;
}

@keyframes splash-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes splash-title {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splash-breathe {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.035);
    }
}

@keyframes splash-ring {
    0% {
        opacity: 0.7;
        transform: scale(0.92);
    }

    100% {
        opacity: 0;
        transform: scale(1.18);
    }
}

@keyframes splash-progress {
    0% {
        transform: translateX(-72px);
    }

    50% {
        transform: translateX(64px);
    }

    100% {
        transform: translateX(132px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .splash-brand,
    .splash-logo-ring,
    .splash-logo-ring::before,
    .splash-title,
    .splash-progress::after {
        animation: none;
    }

    .splash-progress::after {
        transform: translateX(30px);
    }
}
