/* RiftExile interface pieces (see public/js/lib/fx.js), adapted from uiverse.io components (MIT) and recoloured:
   gold #e0a94f / #c9a35b, ember #b4452f, parchment #ead9b3 on dark brown #120e0a. */

/* ---- orbit loader ---- */
.rx-orbit { --s: 44px; position: relative; display: inline-block; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  background: radial-gradient(circle, rgba(224, 169, 79, .12) 30%, transparent 70%); }
.rx-orbit::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: calc(var(--s) * .05) solid transparent; border-top-color: #e0a94f; animation: rx-spin 2s linear infinite; }
.rx-orbit::after { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: conic-gradient(from 90deg, rgba(224, 169, 79, .35), transparent); filter: blur(2px); animation: rx-spin 1.5s linear infinite reverse; }
.rx-orbit-core { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; border-radius: 50%; background: #f6d48f; box-shadow: 0 0 calc(var(--s) * .2) #e0a94f;
  transform: translate(-50%, -50%); animation: rx-pulse 1s ease-in-out infinite; }
.rx-orbit-ring { position: absolute; inset: 0; animation: rx-spin 3s linear infinite; }
.rx-orbit-ring i { position: absolute; left: 50%; top: 50%; width: 8%; height: 8%; margin: -4% 0 0 -4%; border-radius: 50%; background: #f0c262; box-shadow: 0 0 4px #e0a94f; }
.rx-orbit-ring i:nth-child(1) { transform: rotate(0deg) translate(calc(var(--s) * .32)); }
.rx-orbit-ring i:nth-child(2) { transform: rotate(90deg) translate(calc(var(--s) * .32)); }
.rx-orbit-ring i:nth-child(3) { transform: rotate(180deg) translate(calc(var(--s) * .32)); }
.rx-orbit-ring i:nth-child(4) { transform: rotate(270deg) translate(calc(var(--s) * .32)); }
@keyframes rx-spin { to { transform: rotate(360deg); } }
@keyframes rx-pulse { 50% { transform: translate(-50%, -50%) scale(1.25); } }
.rx-loading { display: grid; place-items: center; gap: 12px; padding: 60px 0; color: #8a7d6a; font-size: 13px; }
.rx-working { display: inline-flex; align-items: center; gap: 8px; }

/* ---- sliding pill ---- */
.rx-glide { --n: 2; --i: 0; position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; max-width: 100%; border-radius: 12px; background: rgba(255, 255, 255, .04);
  box-shadow: inset 1px 1px 3px rgba(255, 240, 200, .08), inset -1px -1px 5px rgba(0, 0, 0, .5), 0 3px 10px rgba(0, 0, 0, .25); border: 1px solid #2d241b; }
.rx-glide input { position: absolute; opacity: 0; pointer-events: none; }
.rx-glide label { position: relative; z-index: 2; min-width: 64px; padding: 7px 14px; text-align: center; font-size: 13.5px; font-weight: 600;
  color: #b9a988; cursor: pointer; white-space: nowrap; transition: color .3s; }
.rx-glide label:hover { color: #f0e2bf; }
.rx-glide input:checked + label { color: #1a1208; }
.rx-glide input:focus-visible + label { outline: 2px solid #e0a94f; outline-offset: -2px; border-radius: 9px; }
.rx-glide-g { position: absolute; z-index: 1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 9px;
  transform: translateX(calc(var(--i) * 100%)); background: linear-gradient(135deg, #f4d697, #d4ae66 50%, #b0843b);
  box-shadow: 0 0 16px rgba(224, 169, 79, .45), inset 0 0 8px rgba(255, 240, 200, .45); transition: transform .5s cubic-bezier(.37, 1.6, .66, .76); }

/* ---- keycaps ---- */
.rx-keys { display: inline-flex; }
.rx-key { position: relative; overflow: hidden; min-width: 60px; height: 32px; padding: 0 12px; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
  background: rgba(0, 0, 0, .25); color: #b9a988; box-shadow: inset 0 2px 1px rgba(0, 0, 0, .25), 0 1px 1px rgba(255, 240, 200, .12);
  transition: color .3s, background-color .3s, box-shadow .3s; }
.rx-key span { display: block; transition: transform .3s cubic-bezier(.25, .8, .25, 1); }
.rx-key:first-child { border-radius: 7px 0 0 7px; } .rx-key:last-child { border-radius: 0 7px 7px 0; }
.rx-key:hover:not(:disabled) { background: #2a2016; color: #f0e2bf; box-shadow: inset 0 -4px 1px rgba(0, 0, 0, .3), inset 0 -1px 1px rgba(255, 240, 200, .12), 0 2px 4px rgba(0, 0, 0, .3); }
.rx-key:hover span, .rx-key.on span { transform: translateY(-2px); }
.rx-key.on { background: linear-gradient(180deg, #8a6a32, #5e451f); color: #fff3d6; box-shadow: inset 0 -4px 1px rgba(0, 0, 0, .35), inset 0 -1px 1px rgba(255, 240, 200, .25), 0 2px 6px rgba(224, 169, 79, .25); }
.rx-key:disabled { opacity: .4; cursor: default; }

/* ---- rotary dial ---- */
.rx-dial { --d: 150px; width: var(--d); height: var(--d); position: relative; flex: none; }
.rx-dial-face { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #3a2c1b 0%, #15100b 100%);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .7), 0 2px 14px rgba(224, 169, 79, .12); }
.rx-dial-knob { position: absolute; left: 22%; top: 22%; width: 56%; height: 56%; border-radius: 50%; border: 0; cursor: pointer; --a: -135deg;
  background: linear-gradient(180deg, #e9d3a3 0%, #a98447 100%); box-shadow: inset 0 2px 2px rgba(255, 245, 220, .5), 0 4px 12px rgba(0, 0, 0, .8);
  transform: rotate(var(--a)); transition: transform .45s cubic-bezier(.5, 1.6, .5, 1); }
.rx-dial-knob i { position: absolute; left: 50%; top: 8%; width: 4px; height: 26%; margin-left: -2px; border-radius: 2px; background: #b4452f; box-shadow: 0 0 6px #ff7a4d; }
.rx-dial-knob::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: linear-gradient(180deg, #a98447, #e9d3a3); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); }
.rx-dial-mark { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 2px; font: inherit; font-size: 10.5px; font-weight: 700; color: #8a7d6a; cursor: pointer; white-space: nowrap; }
.rx-dial-mark.on { color: #f0c262; text-shadow: 0 0 6px rgba(224, 169, 79, .7); }

/* ---- stars ---- */
.rx-stars { --s: 16px; position: relative; display: inline-block; font-size: var(--s); line-height: 1; letter-spacing: 1px; white-space: nowrap; }
.rx-stars-bg { color: #3a3024; }
.rx-stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; color: #f0b23c; text-shadow: 0 0 6px rgba(240, 178, 60, .35); }
.rx-rate { --s: 24px; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.rx-rate input { position: absolute; opacity: 0; pointer-events: none; }
.rx-rate label { font-size: var(--s); line-height: 1; padding: 0 2px; color: #3a3024; cursor: pointer; transition: color .15s, transform .15s; }
.rx-rate label:hover, .rx-rate label:hover ~ label { color: #f7c55c; transform: translateY(-1px); }
.rx-rate input:checked ~ label { color: #f0b23c; text-shadow: 0 0 6px rgba(240, 178, 60, .35); }
.rx-rate input:focus-visible + label { outline: 2px solid #e0a94f; border-radius: 4px; }

/* ---- glowing checkbox ---- */
.rx-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13px; color: #ead9b3; -webkit-tap-highlight-color: transparent; }
.rx-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.rx-check-box { position: relative; width: 20px; height: 20px; border-radius: 38%; flex: none; background: rgba(255, 240, 200, .06); border: 1px solid rgba(224, 169, 79, .35);
  box-shadow: inset 0 1px 2px rgba(255, 240, 200, .2), 0 4px 10px rgba(0, 0, 0, .3); transition: all .35s cubic-bezier(.16, 1, .3, 1); }
.rx-check:hover input:not(:checked) ~ .rx-check-box { border-color: #e0a94f; transform: translateY(-1px); }
.rx-check input:checked ~ .rx-check-box { transform: scale(1.1); background: linear-gradient(145deg, #f4d697, #c9a35b 50%, #8a6a32); border-color: #f4d697;
  box-shadow: 0 6px 18px rgba(224, 169, 79, .45), inset 0 2px 4px rgba(255, 245, 220, .6); }
.rx-check-box::after { content: ""; position: absolute; left: 6.5px; top: 3px; width: 5px; height: 10px; border: solid #1a1208; border-width: 0 2.5px 2.5px 0; border-radius: 1px;
  transform: rotate(45deg) scale(.3); opacity: 0; transition: all .3s cubic-bezier(.34, 1.56, .64, 1); }
.rx-check input:checked ~ .rx-check-box::after { opacity: 1; transform: rotate(45deg) scale(1); }
.rx-check input:focus-visible ~ .rx-check-box { outline: 2px solid #e0a94f; outline-offset: 2px; }

/* ---- search pill ---- */
.rx-search { position: relative; display: flex; align-items: center; width: 100%; border-radius: 999px; background: #17120d; border: 1px solid #33281c;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); transition: border-color .2s, box-shadow .2s; }
.rx-search:focus-within { border-color: #8a6a32; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5), 0 0 0 3px rgba(224, 169, 79, .12); }
.rx-search .rx-search-in { flex: 1; min-width: 0; width: 100%; max-width: none; height: 40px; border: 0; background: none; box-shadow: none; outline: none;
  padding: 0 52px 0 18px; color: #f0e2bf; font: inherit; font-size: 14px; border-radius: 999px; }
.rx-search-go { position: absolute; right: 4px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #1a1208;
  background: linear-gradient(135deg, #f4d697, #c9a35b 55%, #8a6a32); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); transition: transform .3s cubic-bezier(.23, 1, .32, 1), box-shadow .3s; }
.rx-search-go:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0, 0, 0, .5), 0 0 12px rgba(224, 169, 79, .35); }
.rx-search-go:active { transform: none; }

/* ---- glowing feature card (build of the week) ---- */
.rx-glow { position: relative; isolation: isolate; display: grid; border-radius: 14px; background: #0f0b08; color: inherit; text-decoration: none; }
.rx-glow::before { content: ""; position: absolute; inset: -3px; z-index: -2; border-radius: 16px; background: linear-gradient(-45deg, #b4452f 0%, #e0a94f 55%, #f6d48f 100%);
  transition: transform .6s cubic-bezier(.175, .885, .32, 1.275); }
.rx-glow::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 14px; background: linear-gradient(-45deg, #b4452f, #e0a94f); transform: scale(.95); filter: blur(22px); opacity: .55; transition: filter .4s, opacity .4s; }
.rx-glow:hover::after { filter: blur(32px); opacity: .8; }
.rx-glow:hover::before { transform: rotate(-2deg) scale(1.01); }
.rx-glow-in { position: relative; border-radius: 13px; overflow: hidden; background: #0f0b08; }

/* ---- fanned cards (top builds) ---- */
.rx-fan { display: flex; justify-content: center; align-items: center; padding: 18px 0 8px; }
.rx-fan-card { position: relative; width: 150px; height: 190px; margin: 0 -34px; border-radius: 12px; overflow: hidden; color: #f0e2bf; text-decoration: none;
  background: linear-gradient(#ffffff14, transparent); border: 1px solid rgba(224, 169, 79, .25); box-shadow: 0 20px 25px rgba(0, 0, 0, .45);
  backdrop-filter: blur(8px); transform: rotate(calc(var(--r) * 1deg)); transition: transform .5s, margin .5s; }
.rx-fan:hover .rx-fan-card, .rx-fan:focus-within .rx-fan-card { transform: rotate(0deg); margin: 0 6px; }
.rx-fan-card .class-banner { position: absolute; inset: 0; }
.rx-fan-card .rx-fan-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 6, 4, 0) 35%, rgba(8, 6, 4, .92) 100%); }
.rx-fan-card .rx-fan-txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; display: grid; gap: 1px; background: rgba(255, 240, 200, .04); }
.rx-fan-txt b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-fan-txt span { font-size: 11px; color: #e0a94f; }
.rx-fan-txt em { font-style: normal; font-family: var(--display); color: #f0c262; font-size: 15px; }
@media (max-width: 560px) { .rx-fan-card { width: 112px; height: 150px; margin: 0 -26px; } .rx-fan:hover .rx-fan-card { margin: 0 2px; } }

/* ---- gold vertical tabs with a sliding light ---- */
.rx-vtabs { --n: 1; --i: 0; position: relative; display: flex; flex-direction: column; padding-left: 8px; }
.rx-vtabs::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: linear-gradient(0deg, transparent, #3a2d1f 50%, transparent); }
.rx-vtabs a { position: relative; padding: 11px 14px; color: #8a7d6a; text-decoration: none; transition: color .3s; border-radius: 0 8px 8px 0; }
.rx-vtabs a:hover { color: #ead9b3; }
.rx-vtabs a.on { color: #f0c262; background: linear-gradient(90deg, rgba(224, 169, 79, .12), transparent 80%); }
.rx-vtabs-g { position: absolute; left: 0; top: 0; width: 1px; height: calc(100% / var(--n)); transform: translateY(calc(var(--i) * 100%));
  background: linear-gradient(0deg, transparent, #f0c262 50%, transparent); transition: transform .5s cubic-bezier(.37, 1.6, .66, .76); }
.rx-vtabs-g::before { content: ""; position: absolute; top: 50%; height: 60%; width: 300%; transform: translateY(-50%); background: #e0a94f; filter: blur(10px); }

@media (prefers-reduced-motion: reduce) {
  .rx-orbit::before, .rx-orbit::after, .rx-orbit-core, .rx-orbit-ring { animation-duration: 6s; }
  .rx-glide-g, .rx-dial-knob, .rx-fan-card, .rx-vtabs-g { transition: none; }
}

/* ---- glossy gold primary buttons (after shokat_2650/massive-snail-29's glass button) ---- */
.btn.primary { position: relative; isolation: isolate; border-radius: 999px; border: 1px solid #d6a957;
  background: linear-gradient(-75deg, #b0843b 0%, #e9c27a 35%, #f6dca3 50%, #d4ae66 65%, #a97c33 100%);
  box-shadow: inset 0 .125em .125em rgba(255, 245, 220, .55), inset 0 -.125em .125em rgba(80, 50, 10, .45), 0 .25em .4em -.1em rgba(0, 0, 0, .55),
    0 0 0 0 rgba(224, 169, 79, 0); transition: transform .35s cubic-bezier(.25, 1, .5, 1), box-shadow .35s cubic-bezier(.25, 1, .5, 1), background-position .6s; background-size: 160% 100%; }
.btn.primary:hover { transform: translateY(-1px) scale(.985); background-position: 100% 0;
  box-shadow: inset 0 .125em .125em rgba(255, 245, 220, .6), inset 0 -.125em .125em rgba(80, 50, 10, .5), 0 .5em .9em -.3em rgba(0, 0, 0, .6), 0 0 14px rgba(224, 169, 79, .35); }
.btn.primary:active { transform: translateY(0) scale(.97); box-shadow: inset 0 .2em .3em rgba(80, 50, 10, .5), 0 .1em .2em rgba(0, 0, 0, .5); }
.btn.primary::after { content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, rgba(255, 250, 235, .35), rgba(255, 250, 235, 0) 55%); }

/* account menu: the gold tabs (vertical on wide screens; a plain row on phones) */
.acct-nav.rx-vtabs { gap: 0; }
.acct-nav.rx-vtabs a { padding: 11px 14px; background: none; font-size: 14.5px; }
.acct-nav.rx-vtabs a.on { color: #f0c262; background: linear-gradient(90deg, rgba(224, 169, 79, .12), transparent 80%); }
.acct-nav.rx-vtabs a:hover:not(.on) { background: none; color: #ead9b3; }
@media (max-width: 760px) {
  .acct-nav.rx-vtabs { padding-left: 0; }
  .acct-nav.rx-vtabs::before, .acct-nav.rx-vtabs .rx-vtabs-g { display: none; }
  .acct-nav.rx-vtabs a.on { background: none; box-shadow: inset 0 -2px 0 #e0a94f; border-radius: 0; }
}
.tree-mode .rx-keys { background: rgba(20, 16, 12, .92); border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); } .tree-mode .rx-key { height: 40px; }
.al-dial { display: flex; align-items: center; gap: 18px; margin: 10px 0 4px; } .al-dial:empty { display: none; } .al-dial .small { max-width: 240px; }

/* home: featured build + hardest hitters */
.hm-showcase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(370px, 1fr); gap: 22px; align-items: center; margin: 4px 0 18px; }
.hm-showcase:empty { display: none; }
.hm-feature-art { position: relative; height: 150px; }
.hm-feature-art .class-banner { position: absolute; inset: 0; }
.hm-feature-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 11, 8, 0) 30%, #0f0b08 100%); }
.hm-feature-txt { position: relative; display: grid; gap: 3px; padding: 0 16px 14px; margin-top: -34px; }
.hm-feature-tag { justify-self: start; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #1a1208; background: linear-gradient(135deg, #f4d697, #c9a35b); padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.hm-feature-txt > b { font-family: var(--display); font-size: 20px; color: #f6ead0; }
.hm-feature-sub { font-size: 12.5px; color: #e0a94f; }
.hm-feature-nums { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 4px; font-size: 12.5px; color: #b9a988; }
.hm-feature-nums em { font-style: normal; font-family: var(--display); font-size: 20px; color: #f0c262; }
.hm-hitters { display: grid; justify-items: center; }
@media (max-width: 900px) { .hm-showcase { grid-template-columns: 1fr; } }
.hm-hitters .rx-fan-card { width: 112px; height: 150px; margin: 0 -26px; }
.hm-hitters .rx-fan:hover .rx-fan-card, .hm-hitters .rx-fan:focus-within .rx-fan-card { margin: 0 3px; }
.hm-hitters .rx-fan-txt b { font-size: 11px; } .hm-hitters .rx-fan-txt em { font-size: 13px; }
/* pills never wider than their space: in the economy sidebar it fills the column exactly */
.rx-glide { grid-auto-columns: minmax(0, 1fr); }
.rx-glide label { overflow: hidden; text-overflow: ellipsis; }
.eco-realm { max-width: 100%; }
.eco-realm .rx-glide { display: grid; width: 100%; }
.eco-realm .rx-glide label { min-width: 0; padding: 6px 4px; font-size: 12.5px; }
.eco-side, .eco-side > * { min-width: 0; max-width: 100%; }
.eco-side .rx-search { width: 100%; }
.eco-main { min-width: 0; }
.eco-league select { width: 100%; max-width: 100%; min-width: 0; }
