/* grasp-welcome.css — Juno's sign-in touches on the real Grasp sign-in screen (King 10-26 "I like that add it
 * please", her build HFMm646CHg4hhPmL v5): the sisters' colours turning around the card, the purple button with a
 * light sweeping it, light drifting up behind, and confetti + a welcome line when someone signs in. */
#login-screen {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(130% 80% at 50% -10%, rgba(157,78,221,.2), transparent 55%),
        radial-gradient(90% 60% at 50% 120%, rgba(78,205,196,.1), transparent 60%),
        var(--bg-primary);
}
#login-screen .gw-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
#login-screen .gw-fx span {
    position: absolute;
    bottom: -20px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), var(--c) 60%, transparent);
    animation: gw-drift linear infinite;
}

#login-screen .login-box {
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.03);
    animation: gw-rise .6s ease .15s both;
}
@property --gw-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
#login-screen .login-box::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    padding: 1px;
    background: conic-gradient(from var(--gw-a), #9D4EDD, #FF6BAA, #4ECDC4, #FFD93D, #9D4EDD);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: gw-spin-border 6s linear infinite;
    pointer-events: none;
}

#username-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
#username-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(157,78,221,.25); }

/* The sign-in actions (not the PIN pad's digits). */
#username-form button[type="submit"],
#pin-submit-btn,
#set-pin-submit,
#change-pin-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 10px;
    padding: 13px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #9D4EDD, #7b3fb0);
    box-shadow: 0 8px 24px rgba(157,78,221,.35);
    transition: transform .12s ease, box-shadow .2s ease;
}
#username-form button[type="submit"]:active,
#pin-submit-btn:active,
#set-pin-submit:active,
#change-pin-submit:active { transform: translateY(1px); }
#username-form button[type="submit"]::after,
#pin-submit-btn::after,
#set-pin-submit::after,
#change-pin-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg);
    animation: gw-sweep 2.6s ease-in-out infinite;
}

/* On top of everything, so it plays over Grasp as it opens. */
.gw-confetti { position: fixed; inset: 0; z-index: 2147483001; pointer-events: none; overflow: hidden; }
.gw-confetti i {
    position: absolute;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    animation: gw-burst linear forwards;
}
.gw-welcome {
    position: fixed;
    left: 50%;
    top: calc(18px + env(safe-area-inset-top, 0px));
    z-index: 2147483001;
    transform: translateX(-50%);
    width: max-content;
    max-width: 90vw;
    text-align: center;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    color: #4ECDC4;
    background: rgba(13,17,23,.92);
    border: 1px solid rgba(78,205,196,.45);
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
    pointer-events: none;
    animation: gw-welcome 3.2s ease forwards;
}

@keyframes gw-drift {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: .7; }
    90% { opacity: .5; }
    100% { transform: translateY(-110vh) translateX(var(--x)); opacity: 0; }
}
@keyframes gw-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes gw-spin-border { to { --gw-a: 360deg; } }
@keyframes gw-sweep { 0%, 60% { left: -60%; } 100% { left: 120%; } }
@keyframes gw-burst {
    0% { transform: translate(0, 0) rotate(0); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(720deg); opacity: 0; }
}
@keyframes gw-welcome {
    0% { opacity: 0; transform: translate(-50%, -10px); }
    12%, 80% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -6px); }
}

@media (prefers-reduced-motion: reduce) {
    #login-screen *, #login-screen *::before, #login-screen *::after, .gw-confetti i { animation: none !important; }
    .gw-welcome { animation: none; }
}
