/* XDM download animation (same file as the app's welcome screen: xdm-app/src/main/welcome.css). Pure CSS.
   One 7 s loop: eight connections fill, join into one bar, the arrow drops in and the card turns to "Complete". */
.xa { --ac: #3ddc97; --tx: #e9eaec; --mu: #8b8f97; --pan: #1a1b1e; --line: #26282c; --bg: #0d0e10;
  position: relative; width: 100%; max-width: 520px; aspect-ratio: 520 / 300; margin: 0 auto; font: 400 12px/1.4 "JetBrains Mono", ui-monospace, Consolas, monospace; color: var(--tx); }
:root[data-theme="light"] .xa { --ac: #14a86b; --tx: #15171b; --mu: #5f6570; --pan: #ffffff; --line: #dcdfe5; --bg: #eef0f3; }
.xa * { box-sizing: border-box; }

/* glow and grid behind */
.xa-bg { position: absolute; inset: 0; border-radius: 22px; overflow: hidden;
  background: radial-gradient(60% 70% at 50% 40%, color-mix(in srgb, var(--ac) 16%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--line) 55%, transparent) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in srgb, var(--line) 55%, transparent) 23px 24px);
  mask-image: radial-gradient(75% 80% at 50% 45%, #000 40%, transparent 100%); }

/* data streaming down from the cloud */
.xa-rain { position: absolute; left: 50%; top: 0; width: 200px; height: 46%; transform: translateX(-50%); overflow: hidden; }
.xa-rain i { position: absolute; top: -20px; width: 2px; height: 16px; border-radius: 2px; background: linear-gradient(transparent, var(--ac)); opacity: 0; animation: xa-rain 7s linear infinite; }
.xa-rain i:nth-child(1) { left: 8%; animation-delay: .5s; } .xa-rain i:nth-child(2) { left: 22%; animation-delay: .9s; }
.xa-rain i:nth-child(3) { left: 36%; animation-delay: .7s; } .xa-rain i:nth-child(4) { left: 50%; animation-delay: 1.1s; }
.xa-rain i:nth-child(5) { left: 64%; animation-delay: .6s; } .xa-rain i:nth-child(6) { left: 78%; animation-delay: 1s; }
.xa-rain i:nth-child(7) { left: 92%; animation-delay: .8s; } .xa-rain i:nth-child(8) { left: 15%; animation-delay: 1.4s; }
@keyframes xa-rain { 0% { transform: translateY(0); opacity: 0 } 6% { opacity: .9 } 14%, 100% { transform: translateY(150px); opacity: 0 } }

/* the file card */
.xa-card { position: absolute; left: 50%; top: 50%; width: 78%; transform: translate(-50%, -38%); padding: 16px 18px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--pan) 92%, transparent); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px); animation: xa-card 7s cubic-bezier(.2, .8, .2, 1) infinite; }
@keyframes xa-card { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.96) } 6%, 92% { opacity: 1; transform: translate(-50%, -38%) scale(1) } 100% { opacity: 0; transform: translate(-50%, -42%) scale(.98) } }
.xa-head { display: flex; align-items: center; gap: 12px; }
.xa-ico { width: 34px; height: 40px; flex: none; color: var(--ac); }
.xa-name { flex: 1; min-width: 0; }
.xa-name b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xa-name span { color: var(--mu); font-size: 11px; }
.xa-speed { text-align: right; color: var(--ac); font-weight: 600; font-variant-numeric: tabular-nums; position: relative; height: 18px; width: 86px; flex: none; }
.xa-speed span { position: absolute; right: 0; top: 0; opacity: 0; animation: xa-num 7s linear infinite; }
.xa-speed span:nth-child(1) { animation-delay: .6s; } .xa-speed span:nth-child(2) { animation-delay: 1.5s; }
.xa-speed span:nth-child(3) { animation-delay: 2.4s; } .xa-speed span:nth-child(4) { animation-delay: 3.3s; }
@keyframes xa-num { 0% { opacity: 0 } 1%, 12.5% { opacity: 1 } 13.5%, 100% { opacity: 0 } }

/* eight connections */
.xa-lanes { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 14px 0 10px; height: 10px; animation: xa-lanes 7s ease infinite; }
.xa-lanes i { position: relative; border-radius: 3px; background: color-mix(in srgb, var(--line) 80%, transparent); overflow: hidden; }
.xa-lanes i::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--ac); border-radius: 3px; animation: xa-fill 7s cubic-bezier(.45, .05, .35, 1) infinite; animation-delay: var(--d); }
@keyframes xa-fill { 0%, 8% { transform: scaleX(0) } 58%, 100% { transform: scaleX(1) } }
@keyframes xa-lanes { 0%, 60% { gap: 4px } 66%, 100% { gap: 0 } }
.xa-lanes i:nth-child(1) { --d: .0s } .xa-lanes i:nth-child(2) { --d: .35s } .xa-lanes i:nth-child(3) { --d: .15s } .xa-lanes i:nth-child(4) { --d: .5s }
.xa-lanes i:nth-child(5) { --d: .25s } .xa-lanes i:nth-child(6) { --d: .45s } .xa-lanes i:nth-child(7) { --d: .1s } .xa-lanes i:nth-child(8) { --d: .3s }
.xa-meta { display: flex; justify-content: space-between; color: var(--mu); font-size: 11px; }
.xa-meta .done { color: var(--ac); opacity: 0; animation: xa-done 7s ease infinite; }
.xa-meta .conn { animation: xa-hide 7s ease infinite; }
@keyframes xa-done { 0%, 64% { opacity: 0 } 70%, 100% { opacity: 1 } }
@keyframes xa-hide { 0%, 62% { opacity: 1 } 66%, 100% { opacity: 0 } }

/* arrow into the tray, then a check */
.xa-drop { position: absolute; left: 50%; bottom: 2%; width: 64px; height: 64px; transform: translateX(-50%); color: var(--ac); }
.xa-drop .arrow { animation: xa-arrow 7s cubic-bezier(.5, 0, .3, 1) infinite; }
.xa-drop .check { opacity: 0; stroke-dasharray: 30; stroke-dashoffset: 30; animation: xa-check 7s ease infinite; }
.xa-drop .ring { opacity: 0; transform-origin: 32px 32px; animation: xa-ring 7s ease-out infinite; }
@keyframes xa-arrow { 0%, 58% { transform: translateY(-6px); opacity: 1 } 64% { transform: translateY(8px); opacity: 0 } 100% { transform: translateY(8px); opacity: 0 } }
@keyframes xa-check { 0%, 64% { opacity: 0; stroke-dashoffset: 30 } 66% { opacity: 1 } 74%, 92% { opacity: 1; stroke-dashoffset: 0 } 100% { opacity: 0; stroke-dashoffset: 0 } }
@keyframes xa-ring { 0%, 64% { opacity: 0; transform: scale(.6) } 66% { opacity: .7 } 82%, 100% { opacity: 0; transform: scale(1.5) } }

/* file types floating around the card */
.xa-chip { position: absolute; padding: 4px 9px; border-radius: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: var(--ac);
  background: color-mix(in srgb, var(--pan) 85%, transparent); border: 1px solid color-mix(in srgb, var(--ac) 35%, var(--line)); animation: xa-float 6s ease-in-out infinite; }
.xa-chip.c1 { left: 4%; top: 14%; } .xa-chip.c2 { right: 5%; top: 9%; animation-delay: -2s; } .xa-chip.c3 { right: 3%; bottom: 8%; animation-delay: -4s; } .xa-chip.c4 { left: 3%; bottom: 4%; animation-delay: -3s; }
@keyframes xa-float { 0%, 100% { transform: translateY(0) rotate(-2deg) } 50% { transform: translateY(-9px) rotate(2deg) } }
/* light sweeping over the joined bar */
.xa-lanes { position: relative; }
.xa-lanes::after { content: ""; position: absolute; inset: -3px 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); opacity: 0; animation: xa-sweep 7s ease infinite; }
@keyframes xa-sweep { 0%, 64% { opacity: 0; transform: translateX(-40%) } 66% { opacity: 1 } 80% { opacity: 0; transform: translateX(360%) } 100% { opacity: 0 } }

@media (prefers-reduced-motion: reduce) {
  .xa *, .xa *::after { animation-duration: 0s !important; animation-delay: 0s !important; }
  .xa-lanes i::after { transform: scaleX(1); }
}
