#cx-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: #ffffff;
    transition: background-color 0.4s ease, opacity 0.3s ease;
}

#cx-loader.is-building { background: #ececec; }
#cx-loader.is-done { opacity: 0; pointer-events: none; }

#cx-loader .cx-icon {
    position: absolute;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 5px;
    background: #cfcfd3;
    opacity: 0;
}

#cx-loader .cx-avatar {
    position: absolute;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border-radius: 50%;
    background: #cfcfd3;
    opacity: 0;
}

#cx-loader .cx-panel {
    position: absolute;
    top: 9px;
    right: 9px;
    bottom: 9px;
    left: 65px;
    border-radius: 15px;
    background: #fbfbfb;
    border: 0.1px solid #ececfc;
    box-shadow: 0 0.3px 0.9px #aaa;
    box-sizing: border-box;
    opacity: 0;
}

#cx-loader .cx-name {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    margin-top: -20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    will-change: transform, opacity;
}

#cx-loader .cx-word {
    display: flex;
    align-items: center;
    height: 40px;
    font: 700 36px/1 "Inter", system-ui, -apple-system, sans-serif;
    letter-spacing: -0.03em;
    color: #18181b;
}

#cx-loader .cx-type { display: grid; }
#cx-loader .cx-ghost,
#cx-loader .cx-typed { grid-area: 1 / 1; white-space: nowrap; }
#cx-loader .cx-ghost { visibility: hidden; padding-right: 9px; }
#cx-loader .cx-typed { display: flex; align-items: center; justify-content: flex-start; }
#cx-loader .cx-typed span { display: inline-block; max-width: 0; overflow: hidden; vertical-align: bottom; }

#cx-loader .cx-caret {
    width: 2.5px;
    height: 30px;
    margin-left: 4px;
    border-radius: 2px;
    background: #18181b;
    flex-shrink: 0;
    animation: cx-caret 1.1s ease-in-out infinite;
}

@keyframes cx-caret {
    0%, 42% { opacity: 1; }
    50%, 92% { opacity: 0; }
    100% { opacity: 1; }
}

#cx-loader .cx-logo {
    width: 40px;
    height: 40px;
    margin-right: 14px;
    border-radius: 11px;
    background: #222;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 24px/1 "Roboto", system-ui, -apple-system, sans-serif;
    letter-spacing: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    opacity: 0;
    flex-shrink: 0;
}

#cx-loader .cx-logo.is-flying {
    position: absolute;
    margin: 0;
    z-index: 2;
}

#cx-loader .cx-typed span { animation: cx-type 1ms steps(1) forwards; }

@keyframes cx-type {
    to { max-width: 2em; }
}

@keyframes cx-fade-in {
    to { opacity: 1; }
}

#cx-loader .cx-slow {
    position: relative;
    width: 96px;
    height: 2px;
    border-radius: 999px;
    background: rgba(24, 24, 27, 0.08);
    overflow: hidden;
    opacity: 0;
    animation: cx-fade-in 0.4s ease 3s forwards;
}

#cx-loader .cx-slow::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    border-radius: 999px;
    background: #18181b;
    animation: cx-slide 1.1s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes cx-slide {
    from { transform: translateX(-100%); }
    to { transform: translateX(250%); }
}
