/* =========================================================
   XENX PROTOCOL - wallet auth screens (Wallet Sign In / Wallet Sign Up)
   Loaded after xenx-theme.css. Works with xenx-live-bg.js behind it.
   ========================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; min-height: 100dvh; display: block !important; padding: 0 !important;
    font-family: 'Manrope', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif !important; color: #ebe9f7; }
body > form { display: block; width: 100%; margin: 0; }

/* soft glow shapes (the live wallpaper does most of the work) */
.bg-shape { position: fixed !important; border-radius: 50%; filter: blur(100px) !important; opacity: .28 !important; pointer-events: none; z-index: 0; animation: xuDrift 22s infinite alternate ease-in-out; }
.bg-shape.one { width: 300px; height: 300px; background: #6d28d9 !important; top: -110px; left: -110px; }
.bg-shape.two { width: 340px; height: 340px; background: #4338ca !important; bottom: -140px; right: -130px; animation-duration: 28s; }
@keyframes xuDrift { from { transform: translate(0,0); } to { transform: translate(40px,-40px); } }

/* template preloader */
.preload-logo { top: 50% !important; left: 50% !important; width: 160px !important; height: 160px !important; margin: -80px 0 0 -80px !important; z-index: 100; }

/* ---------- layout ---------- */
.xu-shell { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 16px 30px; }
.xu-logo { display: block; height: 48px; width: auto; margin: 0 auto 18px; filter: drop-shadow(0 10px 24px rgba(139,92,246,.45)); }
.xu-logo-link { text-decoration: none !important; }

.xu-card { position: relative; overflow: hidden; width: 100%; max-width: 430px; border-radius: 26px; padding: 22px 22px 20px;
    background: linear-gradient(180deg, rgba(26,18,58,.90), rgba(12,9,28,.94));
    border: 1px solid rgba(139,92,246,.34);
    box-shadow: 0 40px 100px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.03);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    animation: xuRise .6s cubic-bezier(.2,.7,.2,1) both; }
.xu-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, #a78bfa 30%, #34d399 70%, transparent); opacity: .9; }
.xu-card::after { content: ""; position: absolute; right: -90px; top: -90px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.38), transparent 70%); pointer-events: none; }
.xu-card > * { position: relative; z-index: 1; }
@keyframes xuRise { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }

.xu-card-top { display: flex; align-items: center; justify-content: space-between; }
.xu-chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ddd6fe; background: rgba(139,92,246,.16); border: 1px solid rgba(139,92,246,.38); }
.xu-chip i { color: #a78bfa; }
.xu-home { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #c9c6dd !important; text-decoration: none !important; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); transition: background .2s ease, color .2s ease; }
.xu-home:hover { background: rgba(139,92,246,.25); color: #fff !important; }
.xu-title { font-family: 'Sora', 'Manrope', sans-serif !important; font-size: 27px; line-height: 1.15; font-weight: 800; color: #fff; margin: 16px 0 6px; letter-spacing: -.01em; }
.xu-title span { background: linear-gradient(100deg,#c4b5fd,#8b5cf6 60%,#34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.xu-sub { font-size: 13px; line-height: 1.55; color: #a9a6c4; margin: 0; }

/* ---------- orbit emblem ---------- */
.xu-orbit { position: relative; width: 164px; height: 164px; margin: 20px auto 18px; }
.xu-orbit-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 52%, rgba(139,92,246,.85) 74%, rgba(52,211,153,.7) 84%, transparent 94%);
    -webkit-mask: radial-gradient(circle, transparent 63%, #000 64%); mask: radial-gradient(circle, transparent 63%, #000 64%); animation: xuSpin 7s linear infinite; }
.xu-orbit-dash { position: absolute; inset: 14px; border-radius: 50%; border: 1px dashed rgba(167,139,250,.38); animation: xuSpin 26s linear infinite reverse; }
.xu-orbit-core { position: absolute; inset: 32px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
    background: radial-gradient(circle at 35% 30%, #2a1d5e, #0d0a1c 72%); border: 1px solid rgba(139,92,246,.5);
    box-shadow: 0 0 50px rgba(139,92,246,.5), inset 0 0 30px rgba(139,92,246,.28); }
.xu-orbit-core img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(139,92,246,.7)); }
.xu-sat { position: absolute; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 14px; color: #fff; background: linear-gradient(135deg,#a78bfa,#6d28d9); box-shadow: 0 12px 24px -8px rgba(139,92,246,.95); animation: xuFloat 5s ease-in-out infinite; }
.xu-sat.s1 { left: -8px; top: 24px; }
.xu-sat.s2 { right: -10px; top: 58px; background: linear-gradient(135deg,#34d399,#059669); box-shadow: 0 12px 24px -8px rgba(52,211,153,.8); animation-delay: .9s; }
.xu-sat.s3 { left: 22px; bottom: -8px; background: linear-gradient(135deg,#60a5fa,#4f46e5); box-shadow: 0 12px 24px -8px rgba(96,165,250,.8); animation-delay: 1.8s; }
@keyframes xuSpin { to { transform: rotate(360deg); } }
@keyframes xuFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- steps ---------- */
.xu-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 16px; }
.xu-step { border-radius: 12px; padding: 9px 6px; text-align: center; font-size: 11.5px; font-weight: 700; color: #d6d3ea; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); }
.xu-step b { display: block; font-size: 9.5px; letter-spacing: .14em; color: #a78bfa; margin-bottom: 2px; }

/* ---------- field ---------- */
.xu-field { margin: 2px 0 14px; }
.xu-field label { display: block; font-size: 12px; font-weight: 700; color: #cfcbe6 !important; margin: 0 0 6px; }
.xu-input { position: relative; }
.xu-input > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8b87a8; font-size: 14px; pointer-events: none; }
.xu-input input.xu-control { width: 100%; height: 48px; border-radius: 14px !important; padding: 0 14px 0 40px !important; font-size: 13px !important; color: #fff !important;
    background: rgba(0,0,0,.30) !important; border: 1px solid rgba(255,255,255,.12) !important; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.xu-input input.xu-control:focus { border-color: #8b5cf6 !important; box-shadow: 0 0 0 3px rgba(139,92,246,.25) !important; }
.xu-input input.xu-control::placeholder { color: #6f6c8a !important; }
.xu-input.locked input.xu-control { border-color: rgba(52,211,153,.45) !important; background: rgba(52,211,153,.06) !important; }
.xu-input.locked > i { color: #34d399; }
.xu-help { font-size: 11px; color: #8f8ba8; margin: 6px 0 0; }
.xu-help i { color: #34d399; margin-right: 4px; }

/* ---------- buttons ---------- */
.xu-btn { position: relative; overflow: hidden; width: 100%; height: 52px; border: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
    font-family: inherit; font-size: 15px; font-weight: 800; color: #fff; cursor: pointer;
    background: linear-gradient(135deg,#a78bfa,#8b5cf6 50%,#6d28d9); box-shadow: 0 18px 40px -14px rgba(139,92,246,.95);
    transition: transform .2s ease, filter .2s ease, opacity .2s ease; }
.xu-btn::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-130%); animation: xuSheen 3.6s ease-in-out infinite; }
@keyframes xuSheen { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(330%); } }
.xu-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.xu-btn:disabled { opacity: .72; cursor: wait; }
.xu-btn-ghost { height: 44px; margin-top: 10px; font-size: 13px; font-weight: 700; color: #d6d3ea; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); box-shadow: none; }
.xu-btn-ghost::after { display: none; }
.xu-btn-ghost:hover { background: rgba(139,92,246,.16); color: #fff; }

/* ---------- status + notes ---------- */
.xu-msg { margin-top: 12px; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; word-break: break-word; background: rgba(139,92,246,.10); border: 1px solid rgba(139,92,246,.3); }
.xu-msg:empty { display: none; }
.xu-safe { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 11.5px; line-height: 1.5; color: #a9a6c4; }
.xu-safe i { color: #34d399; margin-top: 2px; }
.xu-alt { text-align: center; font-size: 13px; color: #a9a6c4; margin: 16px 0 0; }
.xu-alt a { color: #c4b5fd !important; font-weight: 800; text-decoration: none !important; }
.xu-alt a:hover { color: #fff !important; }

/* ---------- switch to email (bottom) ---------- */
.xu-dock { width: 100%; max-width: 430px; margin-top: 4px; }
.xu-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #6f6c8a; }
.xu-or::before, .xu-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.09); }
.xu-switch { width: 100%; min-height: 54px; padding: 0 14px; border-radius: 18px; display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 800; color: #fff !important; text-decoration: none !important;
    border: 1px solid rgba(167,139,250,.65); background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(52,211,153,.10)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px -20px rgba(139,92,246,.9); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.xu-switch:hover { transform: translateY(-2px); background: linear-gradient(135deg, rgba(139,92,246,.36), rgba(52,211,153,.16)); box-shadow: 0 22px 46px -18px rgba(139,92,246,1); }
.xu-switch-ic { width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px; display: grid; place-items: center; font-size: 15px; background: linear-gradient(135deg,#a78bfa,#6d28d9); box-shadow: 0 10px 20px -8px rgba(139,92,246,.9); }
.xu-switch-text { flex: 1; text-align: left; }
.xu-switch-text small { display: block; font-size: 11px; font-weight: 600; color: #b8b5cf; margin-top: 1px; }
.xu-switch-go { color: #c4b5fd; font-size: 13px; transition: transform .2s ease; }
.xu-switch:hover .xu-switch-go { transform: translateX(4px); color: #fff; }
.xu-foot { text-align: center; font-size: 11px; color: #6f6c8a; margin: 16px 0 0; }
.xu-foot a { color: #a9a6c4 !important; text-decoration: none !important; }

/* phones: dock the switch at the bottom of the screen so it is always in reach */
@media (max-width: 575px) {
    .xu-shell { justify-content: flex-start; padding: 18px 14px 118px; }
    .xu-logo { height: 40px; margin-bottom: 14px; }
    .xu-card { padding: 18px 16px 16px; border-radius: 22px; }
    .xu-title { font-size: 23px; margin-top: 12px; }
    .xu-orbit { width: 136px; height: 136px; margin: 14px auto 14px; }
    .xu-orbit-core { inset: 27px; }
    .xu-sat { width: 30px; height: 30px; font-size: 12px; border-radius: 10px; }
    .xu-dock { position: fixed; left: 0; right: 0; bottom: 0; max-width: none; margin: 0; z-index: 60;
        padding: 22px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(6,4,15,0), rgba(6,4,15,.94) 38%); }
    .xu-dock .xu-or { display: none; }
    .xu-foot { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .xu-orbit-ring, .xu-orbit-dash, .xu-sat, .xu-btn::after, .bg-shape, .xu-card { animation: none !important; }
}

/* language flag sits beside the close button */
.xu-top-actions { display: flex; align-items: center; gap: 8px; }
.xu-top-actions .xl-btn { width: 34px !important; height: 34px !important; }
