/* Wallet tab "Items" (public/js/items.js). Rail colours come in as --c1 / --c2. */
.itx { display: grid; gap: 12px; }
.itx-skel { height: 54px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%); background-size: 200% 100%; animation: itx-shimmer 1.2s linear infinite; }
.itx-skel:first-child { height: 92px; }

/* hero: floating rail icons + one-line promise */
.itx-hero { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgba(60,242,255,0.16), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(255,60,172,0.16), transparent 55%), rgba(3,6,16,0.6);
  border: 1px solid var(--line-strong); animation: itx-rise 0.45s cubic-bezier(.2,.9,.3,1.2) both; }
.itx-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.08) 45%, transparent 60%); transform: translateX(-100%); animation: itx-sweep 4.5s ease-in-out 0.6s infinite; pointer-events: none; }
.itx-orbit { position: relative; width: 74px; height: 64px; flex: none; }
.itx-float { position: absolute; width: 34px; height: 34px; display: grid; place-items: center; font-size: 20px; border-radius: 12px;
  background: rgba(10,14,30,0.85); border: 1px solid color-mix(in srgb, var(--c1) 55%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--c1) 45%, transparent);
  animation: itx-bob 2.8s ease-in-out calc(var(--i) * -0.7s) infinite; }
.itx-float.txt { font-size: 12px; font-weight: 900; color: var(--c1); font-family: var(--display); }
.itx-float:nth-child(1) { left: 0; top: 0; } .itx-float:nth-child(2) { left: 38px; top: 2px; }
.itx-float:nth-child(3) { left: 4px; top: 32px; } .itx-float:nth-child(4) { left: 40px; top: 32px; }
.itx-hero-txt { display: grid; gap: 3px; min-width: 0; }
.itx-hero-txt b { font-family: var(--display); font-size: 15px; line-height: 1.25; background: linear-gradient(90deg, #fff, #bff8ff 60%, #ffc6e8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.itx-hero-txt span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }

/* in / out switch with a sliding pill */
.itx-dir { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: rgba(3,6,16,0.6); border: 1px solid var(--line); }
.itx-dir button { position: relative; z-index: 1; height: 40px; font-weight: 800; font-size: 14px; color: var(--muted); border-radius: 10px; transition: color .25s; }
.itx-dir button.on { color: #fff; }
.itx-dir-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px;
  background: linear-gradient(90deg, rgba(60,242,255,0.3), rgba(155,107,255,0.3)); box-shadow: inset 0 0 0 1px rgba(60,242,255,0.45), 0 6px 24px rgba(60,242,255,0.18);
  transition: transform .32s cubic-bezier(.3,1.3,.5,1); }
.itx-dir.out .itx-dir-pill { transform: translateX(100%); background: linear-gradient(90deg, rgba(255,216,74,0.28), rgba(255,60,172,0.28)); box-shadow: inset 0 0 0 1px rgba(255,216,74,0.45), 0 6px 24px rgba(255,159,28,0.18); }

/* rails: cards with a glowing icon */
.itx-rails { display: grid; grid-template-columns: repeat(auto-fit, minmax(66px, 1fr)); gap: 6px; }
.itx-rails .itx-rail { padding: 10px 4px 9px; }
.itx-rail { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 16px; background: rgba(3,6,16,0.55); border: 1px solid var(--line);
  transition: transform .2s, border-color .2s, background .2s, box-shadow .25s; animation: itx-rise .4s cubic-bezier(.2,.9,.3,1.2) calc(var(--i) * 50ms) both; overflow: hidden; }
.itx-rail:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c1) 50%, transparent); }
.itx-rail:active { transform: scale(0.97); }
.itx-rail.on { border-color: transparent; background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 22%, transparent), color-mix(in srgb, var(--c2) 14%, transparent)) padding-box, rgba(3,6,16,0.6);
  box-shadow: 0 0 0 1.5px var(--c1), 0 8px 28px color-mix(in srgb, var(--c1) 30%, transparent); }
.itx-rail.on::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--c1) 35%, transparent) 80%, transparent 90%); animation: itx-spin 3.5s linear infinite; z-index: 0; pointer-events: none; }
.itx-rail > * { position: relative; z-index: 1; }
.itx-rail-ic { width: 42px; height: 42px; display: grid; place-items: center; font-size: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c1) 45%, transparent), color-mix(in srgb, var(--c2) 18%, transparent) 70%); box-shadow: 0 0 18px color-mix(in srgb, var(--c1) 35%, transparent); transition: transform .3s; }
.itx-rail-ic.txt { font-size: 14px; font-weight: 900; color: #04140b; font-family: var(--display); background: linear-gradient(145deg, var(--c1), var(--c2)); }
.itx-rail.on .itx-rail-ic { transform: scale(1.08) rotate(-6deg); animation: itx-pulse 2.2s ease-in-out infinite; }
.itx-rail-name { font-size: 13px; font-weight: 800; color: #fff; text-align: center; line-height: 1.15; }
.itx-rail-sub { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.itx-rail.on .itx-rail-sub { color: var(--c1); }

/* the rail's panel */
.itx-panel { position: relative; padding: 14px; border-radius: 18px; background: rgba(3,6,16,0.5); border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); }
.itx-panel::before { content: ''; position: absolute; left: 18px; right: 18px; top: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--c1), var(--c2), transparent); opacity: .8; }
.itx-panel.enter { animation: itx-rise .35s cubic-bezier(.2,.9,.3,1.15) both; }
.itx-panel > .field-label:first-child, .itx-panel > .itx-pills:first-child { margin-top: 0; }
.itx-panel .field-label { margin-top: 12px; }

.itx-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.itx-pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); animation: itx-rise .35s ease calc(var(--i) * 60ms) both; }
.itx-pill span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.itx-pill b { font-size: 13px; color: #fff; }

.itx-amount { position: relative; }
.itx-amount .input { width: 100%; font-size: 22px; font-weight: 800; padding-right: 54px; font-variant-numeric: tabular-nums; }
.itx-amount .input.pop { animation: itx-pop .3s ease; }
.itx-amount-sym { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 900; color: var(--c1); pointer-events: none; }
.itx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.itx-chip { padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  transition: transform .15s, background .2s, border-color .2s; animation: itx-rise .3s ease calc(var(--i) * 40ms) both; }
.itx-chip:hover { transform: translateY(-2px); border-color: var(--c1); background: color-mix(in srgb, var(--c1) 14%, transparent); }
.itx-chip:active { transform: scale(.94); }

.itx-est { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px dashed var(--line-strong); transition: border-color .25s, background .25s; }
.itx-est span { font-size: 13px; color: var(--muted); }
.itx-est b { font-family: var(--display); font-size: 22px; color: #fff; font-variant-numeric: tabular-nums; }
.itx-est.live { border-style: solid; border-color: color-mix(in srgb, var(--c1) 55%, transparent); background: color-mix(in srgb, var(--c1) 8%, transparent); }
.itx-est.live b { color: var(--c1); text-shadow: 0 0 18px color-mix(in srgb, var(--c1) 50%, transparent); }
.itx-est.bad { border-color: rgba(255,90,110,0.6); background: rgba(255,90,110,0.08); }
.itx-est.bad b { color: #ff7a8a; text-shadow: none; }

.itx-cta { position: relative; overflow: hidden; }
.itx-cta::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.45) 50%, transparent 65%); transform: translateX(-120%); animation: itx-sweep 3.2s ease-in-out 1s infinite; }
button.wait { opacity: .65; cursor: progress; }
button.wait::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 8px; vertical-align: -1px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: itx-spin .7s linear infinite; }

.itx-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(3,6,16,0.7); border: 1px solid color-mix(in srgb, var(--c1) 45%, transparent); transition: box-shadow .3s; }
.itx-code span { font-family: var(--display); font-size: 21px; letter-spacing: .12em; color: var(--c1); text-shadow: 0 0 14px color-mix(in srgb, var(--c1) 45%, transparent); user-select: all; }
.itx-code.copied { box-shadow: 0 0 0 2px var(--c1), 0 0 26px color-mix(in srgb, var(--c1) 45%, transparent); }
.itx-code + .itx-pills { margin-top: 10px; }

.itx-steps { list-style: none; counter-reset: s; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.itx-steps li { counter-increment: s; position: relative; padding-left: 34px; font-size: 13px; line-height: 1.45; color: #cfd6f2; min-height: 24px; animation: itx-rise .35s ease calc(120ms + var(--i) * 70ms) both; }
.itx-steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #05070f; background: linear-gradient(145deg, var(--c1), var(--c2)); }

/* stock / mock items */
.itx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.itx-item { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 10px 10px; border-radius: 16px; text-align: center; min-width: 0; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)), rgba(3,6,16,0.6); border: 1px solid var(--line);
  transition: transform .2s, border-color .2s, box-shadow .25s, opacity .4s; animation: itx-rise .4s cubic-bezier(.2,.9,.3,1.2) calc(var(--i) * 55ms) both; }
.itx-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.14) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s; pointer-events: none; }
.itx-item:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c1) 55%, transparent); box-shadow: 0 10px 26px rgba(0,0,0,0.35); }
.itx-item:hover::after { transform: translateX(120%); }
.itx-item.violet { border-color: rgba(155,107,255,0.55); box-shadow: inset 0 0 22px rgba(155,107,255,0.12); }
.itx-item.gold { border-color: rgba(255,216,74,0.65); box-shadow: inset 0 0 26px rgba(255,216,74,0.14), 0 0 18px rgba(255,159,28,0.12); }
.itx-item.taken { transform: scale(.85) translateY(-14px); opacity: 0; }
.itx-item-ic { font-size: 34px; line-height: 1.1; filter: drop-shadow(0 4px 12px color-mix(in srgb, var(--c1) 45%, transparent)); animation: itx-bob 3s ease-in-out calc(var(--i) * -0.5s) infinite; }
.itx-item-name { font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.itx-item b { font-family: var(--display); font-size: 15px; color: var(--c1); }
.itx-item.gold b { color: #ffd84a; }
.itx-item button { width: 100%; margin-top: 4px; }
.itx-item button.dim { opacity: .55; }
.itx-item button.armed { border-color: var(--c1); color: #fff; background: color-mix(in srgb, var(--c1) 22%, transparent); animation: itx-pulse 1s ease-in-out infinite; }

.itx-tg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; font-size: 13px; color: #cfd6f2; background: rgba(42,171,238,0.1); border: 1px solid rgba(42,171,238,0.4); margin-bottom: 4px; }
.itx-tg span:nth-child(2) { flex: 1; min-width: 150px; }
.itx-tg.ok { background: rgba(60,255,154,0.08); border-color: rgba(60,255,154,0.35); }
.itx-tg-ic { font-size: 18px; }
.itx-tg button { margin-top: 0 !important; width: auto !important; }

.itx-empty { display: grid; justify-items: center; gap: 6px; padding: 18px 8px 8px; text-align: center; }
.itx-empty-ic { font-size: 40px; opacity: .8; animation: itx-bob 3s ease-in-out infinite; }
.itx-empty p { margin: 0; font-size: 13px; color: var(--muted); }

/* history */
.itx-hist { display: grid; gap: 6px; }
.itx-hist .field-label { margin: 2px 0 2px; }
.itx-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); animation: itx-slide .35s ease calc(var(--i) * 45ms) both; }
.itx-row-l { display: flex; gap: 10px; align-items: center; min-width: 0; }
.itx-row-l div { display: grid; min-width: 0; }
.itx-row-l b { font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itx-row-l div span { font-size: 11.5px; color: var(--muted); }
.itx-row-ic { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 900; font-size: 14px; }
.itx-row.in .itx-row-ic { color: #b6ff3c; background: rgba(182,255,60,0.12); }
.itx-row.out .itx-row-ic { color: #ffd84a; background: rgba(255,216,74,0.12); }
.itx-row-r { display: grid; justify-items: end; gap: 3px; flex: none; }
.itx-row-r b { font-size: 14px; }
.itx-row-r b.pos { color: #b6ff3c; } .itx-row-r b.neg { color: #fff; }
.itx-st { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,0.05); }
.itx-st.credited, .itx-st.sent { color: #b6ff3c; background: rgba(182,255,60,0.1); }
.itx-st.held, .itx-st.pending, .itx-st.sending, .itx-st.review { color: #ffd84a; background: rgba(255,216,74,0.1); }
.itx-st.pending::before, .itx-st.sending::before, .itx-st.held::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: itx-blink 1.2s ease-in-out infinite; }
.itx-st.failed, .itx-st.reverted, .itx-st.rejected { color: #ff7a8a; background: rgba(255,90,110,0.1); }
.itx-st.cancelled { color: var(--muted); }
.itx-cancel { font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.itx-cancel:hover { color: #fff; }

.shake { animation: itx-shake .4s ease; border-color: rgba(255,90,110,0.7) !important; }
#wallet-balance.itx-bump { animation: itx-bump .6s cubic-bezier(.2,.9,.3,1.4); display: inline-block; }

/* celebration burst (fixed layer on top of everything) */
.itx-burst { position: fixed; z-index: 9999; width: 0; height: 0; pointer-events: none; }
.itx-burst span { position: absolute; left: 0; top: 0; font-size: 14px; font-weight: 900; color: var(--c); text-shadow: 0 0 10px var(--c); animation: itx-fly .95s cubic-bezier(.15,.7,.3,1) both; }

@keyframes itx-rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes itx-slide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes itx-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(4deg); } }
@keyframes itx-spin { to { transform: rotate(360deg); } }
@keyframes itx-pulse { 0%, 100% { box-shadow: 0 0 14px color-mix(in srgb, var(--c1, #3cf2ff) 30%, transparent); } 50% { box-shadow: 0 0 26px color-mix(in srgb, var(--c1, #3cf2ff) 60%, transparent); } }
@keyframes itx-sweep { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }
@keyframes itx-shimmer { to { background-position: -200% 0; } }
@keyframes itx-pop { 50% { transform: scale(1.04); } }
@keyframes itx-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes itx-bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); color: #b6ff3c; text-shadow: 0 0 20px rgba(182,255,60,0.7); } 100% { transform: scale(1); } }
@keyframes itx-blink { 50% { opacity: .25; } }
@keyframes itx-fly { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 40px)) scale(1.1) rotate(160deg); } }

.itx-lock { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border-radius: 14px; font-size: 13px; color: #ffe7a3; background: rgba(255,216,74,0.08); border: 1px solid rgba(255,216,74,0.35); animation: itx-rise .35s ease both; }
.itx-lock-ic { font-size: 18px; animation: itx-bob 2.6s ease-in-out infinite; }
.itx-item-fee { font-size: 10.5px; color: var(--muted); margin-top: -2px; }
.itx-item b.itx-up { animation: itx-bump .6s ease; color: #ffd84a; }

/* lobby: Deposit button next to the balance */
.deposit-btn { position: relative; height: 38px; padding: 0 14px 0 10px; border-radius: 12px; display: inline-flex; align-items: center; gap: 7px; overflow: hidden;
  font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #05070f;
  background: linear-gradient(100deg, #3cf2ff, #b6ff3c); box-shadow: 0 6px 22px rgba(60,242,255,0.35), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform .15s, box-shadow .2s, filter .2s; }
.deposit-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.7) 50%, transparent 65%); transform: translateX(-130%); animation: dep-sweep 3.4s ease-in-out 1.2s infinite; }
.deposit-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(60,242,255,0.5); filter: brightness(1.06); }
.deposit-btn:active { transform: scale(.96); }
.deposit-plus { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: rgba(5,7,15,0.88); color: #b6ff3c; font-size: 17px; line-height: 1; }
@keyframes dep-sweep { 0% { transform: translateX(-130%); } 35%, 100% { transform: translateX(130%); } }
body.freeonly #deposit-btn { display: none !important; }
@media (max-width: 520px) { .deposit-btn { width: 38px; padding: 0; justify-content: center; } .deposit-btn span[data-i18n] { display: none; } .deposit-plus { width: 26px; height: 26px; font-size: 20px; } }
.itx-rails.many { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.itx-rails.many .itx-rail { padding: 9px 2px 8px; }
.itx-rails.many .itx-rail-ic { width: 36px; height: 36px; font-size: 20px; }
.itx-rails.many .itx-rail-name { font-size: 11.5px; }
.itx-rails.many .itx-rail-sub { font-size: 9px; }
@media (prefers-reduced-motion: reduce) { .deposit-btn::after { animation: none; } }

@media (max-width: 340px) { .itx-rails { grid-template-columns: repeat(2, 1fr); } .itx-hero-txt b { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) {
  .itx *, .itx *::before, .itx *::after, .itx-burst span { animation: none !important; transition: none !important; }
}
