/* =========================================================================
   L.U.N.A. Juice (7.7.0): Fund-Show, Pionier-Level, Knopf-Feedback,
   lebendige Zentrale, Versorgungskapsel
   ========================================================================= */

/* ------------------------------------------------------------ Knoepfe */
.btn, .xb-launch, .xr-claim, .fk-up, .xm-chip, .rail-btn { transition: transform .12s cubic-bezier(.3,1.6,.5,1), box-shadow .2s, background .2s, border-color .2s; }
.btn:not(:disabled):active, .xb-launch:not(:disabled):active, .xr-claim:not(:disabled):active, .xm-chip:active { transform: scale(.94); }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.jx-no { animation: jx-no .4s ease-in-out; }
@keyframes jx-no { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.jx-shine { position: relative; overflow: hidden; }
.jx-shine::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); background-size: 250% 100%; animation: jx-shine .7s ease-out forwards; }
@keyframes jx-shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* ------------------------------------------------------- Fund-Show */
.jx-show { position: fixed; inset: 0; z-index: 9990; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 16px; cursor: pointer;
  background: radial-gradient(circle at 50% 50%, rgba(176,107,255,.25), rgba(3,5,12,.94) 60%); animation: jx-in .3s ease both; overflow: hidden; }
.jx-show.leg { background: radial-gradient(circle at 50% 50%, rgba(255,180,40,.32), rgba(3,5,12,.95) 62%); }
.jx-show.out { animation: jx-out .3s ease forwards; }
@keyframes jx-in { from { opacity: 0; } }
@keyframes jx-out { to { opacity: 0; } }
.jx-rays { position: absolute; left: 50%; top: 50%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.12) 0deg 6deg, transparent 6deg 18deg); animation: jx-spin 22s linear infinite;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 45%); mask-image: radial-gradient(circle, #000 0%, transparent 45%); }
.jx-show.leg .jx-rays { background: repeating-conic-gradient(from 0deg, rgba(255,210,120,.22) 0deg 6deg, transparent 6deg 18deg); opacity: .8; }
@keyframes jx-spin { to { transform: rotate(360deg); } }
.jx-title { position: relative; font-family: var(--font-display); font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 800; letter-spacing: .08em; color: #fff;
  text-shadow: 0 0 30px rgba(176,107,255,.9); animation: jx-title .6s cubic-bezier(.3,1.6,.5,1) both; text-align: center; }
.jx-show.leg .jx-title { color: #ffe9b0; text-shadow: 0 0 34px rgba(255,180,40,1), 0 0 80px rgba(255,140,0,.6); }
@keyframes jx-title { from { transform: scale(2.2); opacity: 0; letter-spacing: .5em; } }
.jx-cards { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; perspective: 900px; }
.jx-card { width: 150px; height: 200px; animation: jx-card .5s cubic-bezier(.3,1.5,.5,1) both; animation-delay: var(--d); }
@keyframes jx-card { from { transform: translateY(60px) scale(.6); opacity: 0; } }
.jx-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,1.4,.5,1); }
.jx-card.flip .jx-in { transform: rotateY(180deg); }
.jx-back, .jx-front { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 12px; }
.jx-back { background: linear-gradient(145deg, #1a1530, #0a0816); border: 2px solid var(--tc); color: var(--tc); font-family: var(--font-display); font-size: 4rem; font-weight: 800;
  box-shadow: 0 0 30px var(--tg), inset 0 0 30px var(--tg); animation: jx-pulse 0.7s ease-in-out infinite; }
@keyframes jx-pulse { 50% { box-shadow: 0 0 50px var(--tg), inset 0 0 40px var(--tg); } }
.jx-front { transform: rotateY(180deg); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--tc) 35%, #120d22), #0a0816 75%); border: 2px solid var(--tc); box-shadow: 0 0 40px var(--tg); }
.jx-art { width: 84px; height: 84px; display: grid; place-items: center; font-size: 3.4rem; filter: drop-shadow(0 0 14px var(--tg)); animation: jx-float 2.4s ease-in-out infinite; }
.jx-art svg, .jx-art img { width: 100%; height: 100%; }
@keyframes jx-float { 50% { transform: translateY(-6px) rotate(-3deg); } }
.jx-front b { color: #fff; font-size: .95rem; }
.jx-front small { color: var(--tc); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; }
.jx-tap { position: relative; color: var(--text-dim); font-size: .8rem; animation: jx-blink 1.6s ease-in-out infinite; }
@keyframes jx-blink { 50% { opacity: .35; } }

/* ------------------------------------------------- Pionier-Level HUD */
.plv-av { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; --p1: #9aa7b8; --p2: #dfe6f0; --pp: 0; }
.plv-av::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; z-index: 0;
  background: conic-gradient(var(--p1) calc(var(--pp) * 1%), rgba(255,255,255,.1) 0); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%); transition: background .6s; }
.plv-av > img, .plv-av > .sfr { position: relative; z-index: 1; display: block; border-radius: 50%; }
.plv-lv { position: absolute; z-index: 2; right: -6px; bottom: -5px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; display: grid; place-items: center;
  font: 800 .66rem/1 var(--font-display); color: #05070d; background: linear-gradient(135deg, var(--p2), var(--p1)); box-shadow: 0 0 0 2px var(--bg-panel, #0b1020), 0 0 10px var(--p1); }
.plv-av.gain::before { animation: jx-ringpulse .7s ease-out; }
@keyframes jx-ringpulse { 30% { filter: brightness(2) drop-shadow(0 0 6px var(--p1)); } }
.plv-av:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.plv-rank { color: var(--p1, var(--text-dim)) !important; }
.plv-bar { width: 100%; max-width: 120px; height: 4px; margin-top: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.plv-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), #9df4ff); transition: width .8s cubic-bezier(.22,.75,.3,1); }
.plv-bar.almost i { background: linear-gradient(90deg, var(--gold), #ffe2a1); animation: jx-almost 1.2s ease-in-out infinite; }
@keyframes jx-almost { 50% { box-shadow: 0 0 8px var(--gold); filter: brightness(1.3); } }

/* ------------------------------------------- Level-up Einblendung */
.jx-lvl { position: fixed; inset: 0; z-index: 9992; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle, color-mix(in srgb, var(--p1) 25%, transparent), rgba(3,5,12,.92) 65%); animation: jx-in .3s ease both; }
.jx-lvl.out { animation: jx-out .3s ease forwards; }
.jx-lvl-box { position: relative; width: min(380px, 100%); padding: 26px 22px 20px; border-radius: 22px; text-align: center; background: linear-gradient(160deg, #121a30, #0a0f1c);
  border: 1px solid color-mix(in srgb, var(--p1) 60%, transparent); box-shadow: 0 0 60px color-mix(in srgb, var(--p1) 40%, transparent); animation: jx-box .5s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes jx-box { from { transform: scale(.7) translateY(30px); opacity: 0; } }
.jx-lvl-k { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--p1); font-weight: 700; }
.jx-lvl-ring { position: relative; width: 150px; height: 150px; margin: 14px auto 8px; }
.jx-lvl-ring.sm { width: 84px; height: 84px; margin: 0; flex: none; }
.jx-lvl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.jx-lvl-ring .bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 9; }
.jx-lvl-ring .fg { fill: none; stroke: var(--p1); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; filter: drop-shadow(0 0 8px var(--p1)); }
.jx-lvl .jx-lvl-ring .fg { animation: jx-fill 1.3s .4s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes jx-fill { to { stroke-dashoffset: 0; } }
.jx-lvl-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; color: #fff; text-shadow: 0 0 24px var(--p1); }
.jx-lvl-ring.sm b { font-size: 1.8rem; }
.jx-lvl.pop .jx-lvl-ring b { animation: jx-num .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes jx-num { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }
.jx-lvl-t { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--p2); }
.jx-lvl-t em { display: block; font-style: normal; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); animation: jx-blink 1s ease-in-out infinite; }
.jx-lvl p { margin: 10px 0 0; color: var(--text-dim); font-size: .85rem; line-height: 1.5; }
.jx-lvl-r { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.jx-lvl-r span { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-weight: 600; animation: jx-card .5s .9s cubic-bezier(.3,1.5,.5,1) both; }
.jx-lvl .btn { margin-top: 16px; min-width: 160px; }
.jx-lvl.rank .jx-lvl-box { box-shadow: 0 0 90px color-mix(in srgb, var(--p1) 60%, transparent); }

.jx-panel-head { display: flex; gap: 14px; align-items: center; }
.jx-panel-head small { color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; }
.jx-panel-head h2 { margin: 2px 0; color: var(--p2); }
.jx-panel-head p { margin: 0; color: var(--text-dim); font-size: .85rem; }
.jx-next { margin: 14px 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: .88rem; }
.jx-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.jx-ladder > div { padding: 8px 4px; border-radius: 10px; text-align: center; border: 1px solid var(--line); opacity: .45; display: grid; gap: 1px; }
.jx-ladder > div.on { opacity: 1; }
.jx-ladder > div.me { border-color: var(--p1); box-shadow: 0 0 14px color-mix(in srgb, var(--p1) 45%, transparent); }
.jx-ladder span { font-size: 1.3rem; }
.jx-ladder b { font-size: .78rem; }
.jx-ladder small { font-size: .66rem; color: var(--text-dim); }
.jx-how { margin: 12px 0 0; font-size: .78rem; color: var(--text-dim); line-height: 1.5; }

/* ------------------------------------------------- Zentrale lebt */
#page-hub { position: relative; }
.agenda-item.ready .ico, .agenda-item.urgent .ico { animation: jx-wiggle 2.6s ease-in-out infinite; display: inline-block; }
.agenda-item.ready, .agenda-item.urgent { position: relative; }
.agenda-item.ready::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 1px rgba(52,224,127,.35), 0 0 22px -6px rgba(52,224,127,.6); animation: jx-glow 2.6s ease-in-out infinite; }
.agenda-item.urgent::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 1px rgba(255,77,106,.4), 0 0 22px -6px rgba(255,77,106,.7); animation: jx-glow 1.4s ease-in-out infinite; }
@keyframes jx-wiggle { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-12deg) scale(1.1); } 80% { transform: rotate(10deg) scale(1.1); } 85% { transform: rotate(-6deg); } 90% { transform: rotate(4deg); } }
@keyframes jx-glow { 50% { opacity: .35; } }
.hub-collect:not([hidden]) { animation: jx-collect 2s ease-in-out infinite; }
@keyframes jx-collect { 50% { box-shadow: 0 0 22px rgba(245,166,35,.7); transform: translateY(-1px); } }

.jx-walker { position: fixed; z-index: 40; bottom: 18px; left: 0; width: 64px; height: 64px; padding: 0; border: 0; background: none; cursor: pointer;
  animation: jx-walk 46s linear infinite; }
.jx-walker .body { display: block; width: 100%; height: 100%; animation: jx-step .5s ease-in-out infinite alternate; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.jx-walker .body svg { width: 100%; height: 100%; }
.jx-walker .shadow { position: absolute; left: 18%; right: 18%; bottom: -2px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(2px); }
.jx-walker.hop .body { animation: jx-hop .6s cubic-bezier(.3,1.6,.5,1); }
.page:not(.active) .jx-walker, body:has(#page-hub:not(.active)) .jx-walker { display: none; }
@keyframes jx-walk { 0% { left: 4%; transform: scaleX(1); } 48% { left: calc(96% - 64px); transform: scaleX(1); } 50% { left: calc(96% - 64px); transform: scaleX(-1); } 98% { left: 4%; transform: scaleX(-1); } 100% { left: 4%; transform: scaleX(1); } }
@keyframes jx-step { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-4px) rotate(2deg); } }
@keyframes jx-hop { 40% { transform: translateY(-34px) scale(1.1); } }
.jx-heart { position: fixed; z-index: 9999; pointer-events: none; font-size: 1.2rem; animation: jx-heart 1.3s ease-out forwards; }
@keyframes jx-heart { from { transform: translate(-50%, 0) scale(.6); opacity: 1; } to { transform: translate(-50%, -80px) scale(1.2); opacity: 0; } }
@media (min-width: 900px) { .jx-walker { bottom: 22px; } }
@media (max-width: 760px) { .jx-walker { bottom: 78px; width: 52px; height: 52px; } }

@media (prefers-reduced-motion: reduce) {
  .jx-walker, .jx-walker .body, .agenda-item .ico, .agenda-item::after, .hub-collect, .jx-rays, .jx-back, .jx-art, .plv-bar.almost i { animation: none !important; }
}

/* ------------------------------------------------ Kolonien (7.7.0) */
.pl-light { animation: pl-twinkle 3.2s ease-in-out infinite; }
@keyframes pl-twinkle { 50% { opacity: .35; } }
.pl-beacon { animation: pl-twinkle 1.1s steps(2) infinite; }
.pl-alarm { animation: pl-alarm .9s ease-in-out infinite; filter: drop-shadow(0 0 3px #ff4d6a); }
@keyframes pl-alarm { 50% { opacity: .2; } }
.pl-gold { animation: pl-goldspin 8s linear infinite; stroke-dasharray: 4 3; transform-origin: 50px 50px; }
@keyframes pl-goldspin { to { transform: rotate(360deg); } }
.pl-aura { animation: pl-aura 4s ease-in-out infinite; }
@keyframes pl-aura { 50% { opacity: .12; } }
.planet-svg.pl-up { animation: pl-up .9s cubic-bezier(.3,1.6,.5,1); }
@keyframes pl-up { 0% { transform: scale(1); filter: brightness(1); } 30% { transform: scale(1.14); filter: brightness(1.8) drop-shadow(0 0 18px #2fe0e4); } 100% { transform: scale(1); filter: none; } }
.planet-card { transition: transform .25s cubic-bezier(.22,.75,.3,1), box-shadow .25s; }
.planet-card:hover { transform: translateY(-3px); }
.planet-card:hover .planet-svg { filter: drop-shadow(0 0 14px rgba(47,224,228,.35)); }
.planet-card .planet-svg { transition: filter .3s; }
@media (prefers-reduced-motion: reduce) { .pl-light, .pl-beacon, .pl-alarm, .pl-gold, .pl-aura, .planet-svg.pl-up { animation: none; } }

/* --------------------------------------------- Versorgungskapsel (7.7.0) */
.dc-wrap { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
@media (max-width: 520px) { .dc-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.dc-cap { --c1: #e6a46a; --c2: #ffd3a3; --c3: #7a4520; --glow: #ffb36b; position: relative; width: 150px; height: 180px; padding: 0; border: 0; background: none; cursor: pointer; }
.dc-cap.t-silber   { --c1: #b8c3d6; --c2: #ffffff; --c3: #4c5568; --glow: #cfe3ff; }
.dc-cap.t-gold     { --c1: #f5c542; --c2: #fff2b8; --c3: #7a5a10; --glow: #ffd700; }
.dc-cap.t-kristall { --c1: #6fe9ff; --c2: #f0b8ff; --c3: #2a2f6e; --glow: #9ff8ff; }
.dc-cap svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--glow) 55%, transparent)); }
.dc-cap.t-kristall svg { filter: drop-shadow(0 0 22px rgba(159,248,255,.7)) drop-shadow(0 0 40px rgba(240,184,255,.4)); }
.dc-cap.ready svg { animation: dc-idle 2.4s ease-in-out infinite; }
.dc-cap.ready:hover svg { animation-duration: .9s; }
.dc-cap.done { cursor: default; opacity: .45; filter: grayscale(.5); }
.dc-core { animation: dc-core 1.6s ease-in-out infinite; }
.dc-cracks { opacity: 0; transition: opacity .25s; filter: drop-shadow(0 0 4px var(--glow)); }
.dc-cap.s1 svg { animation: dc-shake .14s linear infinite; }
.dc-cap.s2 svg { animation: dc-shake .1s linear infinite; }
.dc-cap.s2 .dc-cracks { opacity: .55; }
.dc-cap.s3 svg { animation: dc-shake .06s linear infinite; }
.dc-cap.s3 .dc-cracks { opacity: 1; }
.dc-cap.s3 svg { filter: drop-shadow(0 0 34px var(--glow)) brightness(1.25); }
.dc-cap.open svg { animation: none; }
.dc-cap.open .dc-top { animation: dc-fly-top .7s cubic-bezier(.2,.8,.3,1) forwards; }
.dc-cap.open .dc-bot { animation: dc-fly-bot .7s cubic-bezier(.2,.8,.3,1) forwards; }
.dc-cap.open .dc-cracks { opacity: 0; }
.dc-cap .dc-top, .dc-cap .dc-bot { transform-box: fill-box; transform-origin: center; }
@keyframes dc-idle { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes dc-shake { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-3px, 1px) rotate(-3deg); } 50% { transform: translate(2px, -1px) rotate(2deg); } 75% { transform: translate(-2px, -1px) rotate(-1deg); } 100% { transform: translate(0, 0) rotate(0); } }
@keyframes dc-core { 50% { opacity: .5; } }
@keyframes dc-fly-top { to { transform: translate(-18px, -60px) rotate(-28deg); opacity: 0; } }
@keyframes dc-fly-bot { to { transform: translate(14px, 40px) rotate(18deg); opacity: 0; } }
.dc-tier { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: .04em; }
.dc-tier.t-bronze { color: #e6a46a; } .dc-tier.t-silber { color: #dfe9ff; } .dc-tier.t-gold { color: #ffd700; text-shadow: 0 0 12px rgba(255,215,0,.5); }
.dc-tier.t-kristall { background: linear-gradient(90deg, #6fe9ff, #f0b8ff, #6fe9ff); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fk-sheen 3s linear infinite; }
.dc-streak { margin: 4px 0 8px; font-size: .95rem; }
.dc-streak b { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold); }
.dc-streak small { color: var(--text-dim); }
.dc-track { position: relative; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); margin: 6px 0 8px; }
.dc-track u { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #e6a46a, #dfe9ff, #ffd700, #6fe9ff); }
.dc-track i { position: absolute; top: -3px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: rgba(255,255,255,.25); z-index: 1; }
.dc-track i.on { background: #fff; box-shadow: 0 0 6px #fff; }
.dc-next { font-size: .82rem; color: var(--text-dim); margin-bottom: 8px; }
.dc-next b { color: var(--text-bright); }
.dc-wait { font-size: .82rem; color: var(--text-dim); margin: 10px 0 0; }
.dc-cap.ready + .dc-info .dc-wait { color: var(--gold); font-weight: 600; animation: jx-blink 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .dc-cap svg, .dc-core, .dc-cap.ready + .dc-info .dc-wait { animation: none !important; } }
