/* Gan Champions 43: the reward screen at the end of a level (levelup43.js).
   In the site's style: white card, gold border, navy text. Nori (buddy43) stays in front of it. */
.lu43 {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: grid;
  place-items: center;
  padding: 16px 16px 150px;
  background: radial-gradient(circle at 50% 40%, #1d3a8acc, #0b1f4de6 70%);
  direction: rtl;
  animation: lu43-fade .22s ease-out both;
}
.lu43-out { animation: lu43-fade .26s ease-in reverse both; }
@keyframes lu43-fade { from { opacity: 0; } to { opacity: 1; } }

.lu43-card {
  position: relative;
  width: min(420px, 100%);
  padding: 18px 20px 22px;
  border-radius: 30px;
  background: #fff;
  border: 4px solid #f2cf6b;
  box-shadow: 0 6px 0 #e3b23c66, 0 24px 60px #0b1f4d80;
  color: #16285f;
  text-align: center;
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  overflow: hidden;
  animation: lu43-pop .55s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes lu43-pop { from { transform: scale(.55); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); opacity: 1; } }

.lu43-rays {
  position: absolute;
  left: 50%;
  top: 92px;
  width: 360px;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: repeating-conic-gradient(#ffd23f33 0 10deg, #fff0 10deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 25%, #0000 68%);
  mask: radial-gradient(circle, #000 25%, #0000 68%);
  animation: lu43-spin 18s linear infinite;
}
@keyframes lu43-spin { to { rotate: 1turn; } }

.lu43-prize {
  position: relative;
  width: 148px;
  margin: 0 auto 4px;
  filter: drop-shadow(0 8px 10px #b9780b55);
  animation: lu43-drop .8s cubic-bezier(.34, 1.56, .64, 1) .12s both, lu43-sway 2.6s ease-in-out 1s infinite;
}
.lu43-svg { display: block; width: 100%; height: auto; }
@keyframes lu43-drop { from { transform: translateY(-120px) scale(.4) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lu43-sway { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }

.lu43-title {
  position: relative;
  margin: 2px 0 4px;
  font: 900 clamp(26px, 7vw, 32px)/1.15 system-ui, "Segoe UI", Arial, sans-serif;
  color: #16285f;
}
.lu43-next {
  position: relative;
  margin: 0 0 6px;
  font: 800 clamp(18px, 5vw, 21px)/1.3 system-ui, "Segoe UI", "Segoe UI Emoji", Arial, sans-serif;
}
.lu43-gift {
  position: relative;
  display: inline-block;
  margin: 2px 0 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #fff4cc;
  border: 2px solid #f2cf6b;
  font: 800 18px/1.4 system-ui, "Segoe UI", "Segoe UI Emoji", Arial, sans-serif;
  animation: lu43-pop .5s cubic-bezier(.34, 1.56, .64, 1) .7s both;
}
.lu43-shelf {
  position: relative;
  margin: 2px 0 14px;
  font: 800 20px/1.3 system-ui, "Segoe UI Emoji", "Apple Color Emoji", Arial, sans-serif;
  letter-spacing: .02em;
  white-space: pre;
  color: #3b4a7a;
}
.lu43-go {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 6px 26px 6px 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe066, #f5b31f);
  box-shadow: 0 5px 0 #c98a0b, 0 10px 18px #0b1f4d40;
  color: #16285f;
  font: 900 22px/1 system-ui, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lu43-go:active { translate: 0 3px; box-shadow: 0 2px 0 #c98a0b, 0 6px 12px #0b1f4d40; }
.lu43-go:focus-visible { outline: 4px solid #5ad1ff; outline-offset: 3px; }
.lu43-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #16285f;
  color: #fff;
  font-size: 19px;
  padding-inline-start: 3px;
}
.lu43-ring {
  position: absolute;
  inset: -3px;
  width: 52px;
  height: 52px;
  rotate: -90deg;
  fill: none;
  stroke: #ffffff;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 119.4;
  stroke-dashoffset: 119.4;
  opacity: 0;
}
/* The ring fills while the game counts down to the next level. */
.lu43-auto .lu43-ring { opacity: .95; animation: lu43-count var(--lu43-wait, 4200ms) linear both; }
@keyframes lu43-count { from { stroke-dashoffset: 119.4; } to { stroke-dashoffset: 0; } }

.lu43-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lu43-confetti i {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: 10px;
  height: 16px;
  border-radius: 3px;
  animation: lu43-fall var(--fall, 2400ms) cubic-bezier(.3, .6, .4, 1) var(--wait, 0ms) both;
}
@keyframes lu43-fall {
  from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to { transform: translate(var(--drift), 105vh) rotate(var(--turn)); opacity: .9; }
}

@media (prefers-reduced-motion: reduce) {
  .lu43, .lu43-card, .lu43-rays, .lu43-prize, .lu43-gift, .lu43-auto .lu43-ring { animation: none; }
  .lu43-auto .lu43-ring { stroke-dashoffset: 0; }
}
html.no-motion .lu43, html.no-motion .lu43-card, html.no-motion .lu43-rays, html.no-motion .lu43-prize,
html.no-motion .lu43-gift { animation: none; }
@media (max-height: 560px) {
  .lu43 { padding-bottom: 16px; }
  .lu43-prize { width: 104px; }
  .lu43-rays { top: 70px; width: 260px; }
}
