/* Extra motion for the Rilvaris pages and a bigger victory on the arena. Everything respects reduced motion. */

/* ---------- page entrances ---------- */
@keyframes mp-rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes mp-pop { 0% { scale: 1; } 40% { scale: 1.22; filter: brightness(1.5); } 100% { scale: 1; } }
@keyframes mp-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 211, 90, 0)); } 50% { filter: drop-shadow(0 0 9px rgba(255, 211, 90, .75)); } }
@keyframes mp-slide { from { opacity: 0; translate: -18px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes mp-shimmer { to { background-position: 220% 0; } }
@keyframes mp-sweep { 0% { transform: translateX(-120%) skewX(-18deg); } 60%, 100% { transform: translateX(260%) skewX(-18deg); } }

.dh-premium .dh-mode, .dh-premium .dh-utility, .dh-premium .dh-setup { animation: mp-rise .7s cubic-bezier(.2, .8, .3, 1) backwards; }
.dh-premium .dh-classic { animation-delay: .05s; }
.dh-premium .dh-coop-copy { animation: mp-rise .7s .15s cubic-bezier(.2, .8, .3, 1) backwards; }
.dh-premium .dh-chaos { animation-delay: .25s; }
.dh-premium .dh-setup { animation-delay: .35s; }
.dh-premium .dh-utility:nth-child(1) { animation-delay: .45s; }
.dh-premium .dh-utility:nth-child(2) { animation-delay: .55s; }
.dh-premium .dh-utility:nth-child(3) { animation-delay: .65s; }
.rd-hero, .pl-hero, .rv-market-hero { animation: mp-rise .7s cubic-bezier(.2, .8, .3, 1) backwards; }
.pl-patch, .pk-shop, .rv-treasury, .rl-panel { animation: mp-rise .65s .15s cubic-bezier(.2, .8, .3, 1) backwards; }
.rl-matchup { animation: mp-rise .6s cubic-bezier(.2, .8, .3, 1) backwards; }
.rl-results > * { animation: mp-rise .6s cubic-bezier(.2, .8, .3, 1) backwards; }
.rl-results > :nth-child(2) { animation-delay: .08s; }
.rl-results > :nth-child(3) { animation-delay: .16s; }
.rl-results > :nth-child(4) { animation-delay: .24s; }
.rl-results > :nth-child(5) { animation-delay: .32s; }
.rl-results > :nth-child(6) { animation-delay: .4s; }
.rl-results > :nth-child(7) { animation-delay: .5s; }
.pl-patch details[open] .pl-item { animation: mp-slide .45s both cubic-bezier(.2, .8, .3, 1); }
.pl-patch details[open] .pl-item:nth-child(2) { animation-delay: .05s; }
.pl-patch details[open] .pl-item:nth-child(3) { animation-delay: .1s; }
.pl-patch details[open] .pl-item:nth-child(4) { animation-delay: .15s; }
.pl-patch details[open] .pl-item:nth-child(n+5) { animation-delay: .2s; }

/* ---------- hover life ---------- */
.dh-premium .dh-utility, .dh-premium .dh-mode, .pk-shop, .pl-item, .rl-stats-wrap, .rl-result-players > div { transition: translate .25s cubic-bezier(.2, .8, .3, 1), box-shadow .25s, filter .25s; }
@media (hover: hover) and (pointer: fine) {
  .dh-premium .dh-utility:hover { translate: 0 -5px; box-shadow: 0 18px 30px rgba(10, 25, 45, .22); }
  .dh-premium .dh-mode:hover { translate: 0 -4px; }
  .pl-item:hover { translate: 4px 0; box-shadow: 0 6px 16px rgba(20, 43, 67, .12); }
  .rl-result-players > div:hover { translate: 0 -3px; }
  .dh-nav-tabs a:hover, .dh-nav-tabs button:hover { translate: 0 -2px; }
}
.dh-nav-tabs a, .dh-nav-tabs button { transition: translate .18s ease, color .18s ease; }

/* ---------- living buttons and currencies ---------- */
.dh-premium .dh-actions .dh-yellow { animation: mp-glow 2.8s ease-in-out infinite; }
.dh-premium .dh-yellow:hover { animation-play-state: paused; }
[data-rilvaris-value].mp-pop { display: inline-block; animation: mp-pop .6s ease-out; }
.pk-vip-badge, .pl-version { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); background-size: 220% 100%; background-repeat: no-repeat; background-position: -120% 0; animation: mp-shimmer 3.6s linear infinite; }
.pk-vip-daily:not(.is-used) { position: relative; overflow: hidden; }
.pk-vip-daily:not(.is-used)::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent); animation: mp-sweep 3.4s ease-in-out infinite; pointer-events: none; }
.dh-card-fan > * { transition: transform .3s cubic-bezier(.2, .8, .3, 1); }
.dh-card-fan:hover > * { transform: translateY(-8px); }

/* ---------- arena victory ---------- */
@keyframes mp-rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes mp-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes mp-confetti { 0% { translate: 0 -10vh; rotate: 0deg; opacity: 0; } 8% { opacity: 1; } 100% { translate: var(--sway, 30px) 110vh; rotate: 720deg; opacity: .9; } }
@keyframes mp-title { 0% { opacity: 0; scale: 2.4; letter-spacing: .5em; filter: blur(10px); } 55% { scale: .94; filter: blur(0); } 75% { scale: 1.06; } 100% { opacity: 1; scale: 1; letter-spacing: .04em; } }
@keyframes mp-gold { to { background-position: 200% 0; } }
@keyframes mp-sub { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes mp-ember { 0% { translate: 0 20vh; opacity: 0; } 20% { opacity: .9; } 100% { translate: 12px -45vh; opacity: 0; } }
.dl-result { position: relative; overflow: visible; }
.dl-result > strong, .dl-result > small { position: relative; z-index: 2; }
.dl-result.win { background: linear-gradient(90deg, transparent, rgba(40, 24, 0, .82) 14%, rgba(40, 24, 0, .82) 86%, transparent); }
.dl-result.win > strong { display: inline-block; animation: mp-title 1.1s .55s cubic-bezier(.2, .9, .3, 1.2) both, mp-gold 3s 1.6s linear infinite; background: linear-gradient(100deg, #fff6c8 0%, #ffc93c 30%, #fff6c8 50%, #ffc93c 70%, #b86b06 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(255, 190, 40, .65)); }
.dl-result-sub { display: block; margin-top: 10px; font: 600 clamp(13px, 2vw, 18px) var(--font); letter-spacing: .08em; color: #ffe9a8; animation: mp-sub .7s 1.3s both; text-shadow: 0 2px 6px #000; }
.dl-result.lose .dl-result-sub { color: #e8b8b8; }
.dl-result.lose > strong { display: inline-block; animation: mp-title 1.3s .6s ease-out both; }
.dl-result-rays { position: absolute; z-index: 1; left: 50%; top: 50%; width: min(120vw, 1100px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; background: repeating-conic-gradient(from 0deg, rgba(255, 214, 110, .22) 0 8deg, transparent 8deg 22deg); -webkit-mask-image: radial-gradient(circle, #000 5%, transparent 62%); mask-image: radial-gradient(circle, #000 5%, transparent 62%); }
.dl-result.win .dl-result-rays { opacity: 1; animation: mp-rays 24s linear infinite; }
.dl-result-flash { position: absolute; z-index: 1; inset: -40vh -10vw; pointer-events: none; background: radial-gradient(circle at 50% 50%, #fff7d0, rgba(255, 214, 110, .4) 35%, transparent 70%); opacity: 0; }
.dl-result.win .dl-result-flash { animation: mp-flash 1.1s .35s ease-out both; }
.dl-confetti { position: absolute; z-index: 3; left: 0; right: 0; top: -60vh; height: 120vh; pointer-events: none; overflow: hidden; }
.dl-confetti i { position: absolute; top: 0; left: var(--x); width: 9px; height: 15px; background: var(--c); border-radius: 2px; opacity: 0; animation: mp-confetti var(--t) var(--d) cubic-bezier(.3, .2, .5, 1) 2 both; --sway: 40px; }
.dl-confetti i:nth-child(3n) { width: 12px; height: 7px; border-radius: 50%; --sway: -50px; }
.dl-confetti i:nth-child(4n) { --sway: 90px; }
.dl-embers { position: absolute; z-index: 1; inset: -30vh 0; pointer-events: none; overflow: hidden; }
.dl-embers i { position: absolute; left: var(--x); top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #ff6a3c; box-shadow: 0 0 8px #ff6a3c; opacity: 0; animation: mp-ember 3.4s var(--d) ease-out infinite; }
.dl-result.lose { background: linear-gradient(90deg, transparent, rgba(30, 0, 0, .85) 14%, rgba(30, 0, 0, .85) 86%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .dh-premium .dh-mode, .dh-premium .dh-utility, .dh-premium .dh-setup, .dh-premium .dh-coop-copy, .rd-hero, .pl-hero, .rv-market-hero, .pl-patch, .pk-shop, .rv-treasury, .rl-panel, .rl-matchup, .rl-results > *, .pl-item,
  .dh-premium .dh-actions .dh-yellow, .pk-vip-badge, .pl-version, .pk-vip-daily::after, .dl-result-rays, .dl-result-flash, .dl-confetti i, .dl-embers i, .dl-result > strong, .dl-result-sub { animation: none !important; }
  .dl-result.win > strong, .dl-result-sub { opacity: 1; }
  .dl-confetti, .dl-embers, .dl-result-flash { display: none; }
}

/* Language switcher (PL / EN) injected into the Rilvaris top bar. */
.rv-lang { display: inline-flex; margin: 0 6px 0 0; align-self: center; border: 1px solid rgba(255, 225, 160, .45); border-radius: 999px; overflow: hidden; flex: none; }
.rv-lang button { padding: 4px 8px; min-width: 0; font: 800 11px/1 inherit; letter-spacing: .06em; color: #f1e6c8; background: transparent; border: 0; cursor: pointer; transition: background .2s, color .2s; }
.rv-lang button:hover { background: rgba(255, 225, 160, .18); }
.rv-lang button[aria-pressed="true"] { background: #ffd35a; color: #102038; }

/* The RL banner on the home shelf: smaller art, and the long edition title wraps inside its half of the tile. */
.dh-premium .dh-packs .dh-utility-copy { max-width: 56%; }
.dh-premium .dh-packs p b { display: block; margin-bottom: 4px; font-size: .78em; line-height: 1.25; letter-spacing: 0; overflow-wrap: anywhere; }
.dh-premium .dh-pack-art { width: 42%; height: 100%; right: 1%; bottom: 0; }
