/* =========================================================================
   Weltboss 2.0 (7.10.0): neue Bosse, Faehigkeiten, Phasen, Sturmangriff,
   grosser Auftritt. Ergaenzt die Grundstyles in pets.css.
   ========================================================================= */

/* ---------- Himmel hinter dem Boss ---------- */
.wb-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wb-sky i { position: absolute; inset: -40%; background-repeat: repeat; }
.wb-sky i:nth-child(1) { background-image: radial-gradient(1.4px 1.4px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 120px 80px, #fff, transparent), radial-gradient(1px 1px at 200px 160px, rgba(255,255,255,.7), transparent);
                         background-size: 240px 220px; opacity: .55; animation: wbDrift 80s linear infinite; }
.wb-sky i:nth-child(2) { background-image: radial-gradient(1.6px 1.6px at 60px 40px, var(--bc), transparent), radial-gradient(1px 1px at 160px 140px, #fff, transparent);
                         background-size: 300px 260px; opacity: .45; animation: wbDrift 130s linear infinite reverse; }
.wb-sky i:nth-child(3) { inset: 10% -10% auto; height: 60%; border-radius: 50%; filter: blur(60px); opacity: .25; background: radial-gradient(closest-side, var(--bc), transparent); animation: wbNebula 16s ease-in-out infinite; }
@keyframes wbDrift { to { transform: translate(240px, 110px); } }
@keyframes wbNebula { 50% { transform: translate(6%, 4%) scale(1.15); opacity: .4; } }
.wb-arena > *:not(.wb-sky) { position: relative; z-index: 1; }
.wb-arena .wb-top { z-index: 2; }

/* ---------- Neue Boss-Animationen ---------- */
.bs-arm { animation: bsArm 3.4s ease-in-out infinite; }
.bs-arm-r { animation-name: bsArmR; }
@keyframes bsArm { 50% { transform: rotate(-6deg); } }
@keyframes bsArmR { 50% { transform: rotate(6deg); } }
.bs-scan { animation: bsScan 2.4s ease-in-out infinite alternate; }
@keyframes bsScan { to { transform: translateX(30px); } }
.bs-core { animation: paPulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 8px currentColor); }
.bs-wing { animation: bsWing .18s ease-in-out infinite alternate; }
@keyframes bsWing { to { transform: scaleY(.82) rotate(3deg); } }
.bs-drone { animation: bsDrone 6s linear infinite; transform-origin: 150px 140px; transform-box: view-box; }
@keyframes bsDrone { from { transform: rotate(0) translateX(118px) rotate(0); } to { transform: rotate(360deg) translateX(118px) rotate(-360deg); } }
.bs-mand { animation: bsMand 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes bsMand { 50% { transform: scaleX(.85); } }
.bs-cloak { animation: bsCloak 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes bsCloak { 0%, 100% { transform: skewX(0) scaleY(1); } 50% { transform: skewX(-3deg) scaleY(1.03); } }
.wb-k-wraith .wb-stage .bs { animation: bsGhost 5s ease-in-out infinite; }
@keyframes bsGhost { 0%, 100% { opacity: 1; } 45% { opacity: .82; } 50% { opacity: .55; } 55% { opacity: .85; } }
.wb-k-wurm .wb-stage .bs { filter: drop-shadow(0 0 22px rgba(217, 70, 239, .5)); }

/* ---------- Effekt-Ebenen ---------- */
.wb-fx { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.wb-fx.armor svg { position: absolute; inset: 4% 0 6%; width: 100%; height: 90%; }
.wb-fx.armor .wb-hex path { fill: rgba(140, 210, 255, .06); stroke: rgba(160, 225, 255, .55); stroke-width: 1.2; animation: wbHex 3s ease-in-out infinite; }
.wb-fx.armor .wb-hex path:nth-child(3n) { animation-delay: -1s; } .wb-fx.armor .wb-hex path:nth-child(3n+1) { animation-delay: -2s; }
@keyframes wbHex { 50% { fill: rgba(140, 210, 255, .2); stroke: rgba(220, 245, 255, .9); } }
.wb-fx.armor .wb-dome { fill: none; stroke: #9fdcff; stroke-width: 3; filter: drop-shadow(0 0 10px #4ab8ff); animation: wbDome 2.4s ease-in-out infinite; }
@keyframes wbDome { 50% { stroke-width: 5; opacity: .7; } }
.wb-arena.hit.fx-armor .wb-fx.armor svg { animation: wbDomeHit .45s ease-out; }
@keyframes wbDomeHit { 30% { transform: scale(1.04); filter: brightness(2.2); } }

.wb-fx.weak { display: grid; place-items: center; }
.wb-fx.weak i { position: absolute; left: 50%; top: 46%; width: 70px; height: 70px; margin: -35px; border-radius: 50%; border: 3px solid #ffd84a; box-shadow: 0 0 18px #ffb428; animation: wbTarget 1.6s ease-out infinite; }
.wb-fx.weak i:nth-child(2) { animation-delay: .53s; } .wb-fx.weak i:nth-child(3) { animation-delay: 1.06s; }
.wb-fx.weak span { position: absolute; left: 50%; top: 46%; width: 54px; height: 54px; margin: -27px; border: 2px dashed #fff3b0; border-radius: 50%; animation: paSpin 4s linear infinite; }
.wb-fx.weak span::before, .wb-fx.weak span::after { content: ''; position: absolute; left: 50%; top: -14px; bottom: -14px; width: 2px; margin-left: -1px; background: #fff3b0; }
.wb-fx.weak span::after { transform: rotate(90deg); }
@keyframes wbTarget { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }

.wb-fx.chaos i { position: absolute; left: 50%; top: 46%; width: 260px; height: 260px; margin: -130px; border-radius: 50%;
                 background: conic-gradient(from 0deg, transparent, rgba(217, 70, 239, .35), transparent 40%, rgba(47, 224, 228, .3), transparent 70%); animation: paSpin 3s linear infinite; mix-blend-mode: screen; }
.wb-fx.chaos i:nth-child(2) { width: 180px; height: 180px; margin: -90px; animation-duration: 1.8s; animation-direction: reverse; }
.wb-arena.fx-chaos .wb-stage .bs { animation: wbGlitch 2.6s steps(1) infinite; }
@keyframes wbGlitch { 0%, 86%, 100% { transform: none; filter: none; } 88% { transform: translateX(-6px) skewX(4deg); filter: hue-rotate(80deg) saturate(1.6); } 91% { transform: translateX(5px); filter: hue-rotate(-60deg); } 94% { transform: translateX(-2px) skewX(-3deg); } }

/* ---------- Effekt-Leiste ---------- */
.wb-effect { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; max-width: 760px; margin: 4px auto 8px; padding: 10px 14px; border-radius: 14px;
             background: rgba(0, 0, 0, .45); border: 1px solid var(--ec, #9fdcff); box-shadow: 0 0 22px -6px var(--ec, #9fdcff); animation: wbEffIn .5s cubic-bezier(.2, 1.4, .4, 1); }
.wb-effect.armor { --ec: #7cc8ff; } .wb-effect.weakspot { --ec: #ffd84a; } .wb-effect.chaos { --ec: #d946ef; }
.wb-effect .ic { font-size: 1.6rem; animation: paPulse 1.8s ease-in-out infinite; }
.wb-effect b { display: block; color: #fff; font-family: var(--font-display); letter-spacing: .5px; }
.wb-effect small { color: var(--text); font-size: .8rem; }
.wb-effect em { font-style: normal; font-family: var(--font-display); font-weight: 700; color: var(--ec); font-variant-numeric: tabular-nums; }
@keyframes wbEffIn { from { transform: scale(.9); opacity: 0; } }

/* ---------- Phasen-Leiste ---------- */
.wb-phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.wb-phases div { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .08); opacity: .55; min-width: 0; }
.wb-phases span { grid-row: 1 / 3; font-size: 1.1rem; }
.wb-phases b { font-size: .76rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-phases small { font-size: .64rem; color: var(--text-dim); }
.wb-phases .done { opacity: .85; border-color: rgba(52, 224, 127, .4); }
.wb-phases .done::after { content: '✓'; position: absolute; right: 8px; top: 6px; color: var(--green); font-weight: 800; font-size: .8rem; }
.wb-phases .now { opacity: 1; border-color: var(--bc); background: color-mix(in srgb, var(--bc) 16%, rgba(0, 0, 0, .35)); box-shadow: 0 0 16px -6px var(--bc); }

/* ---------- Sturmangriff ---------- */
.wb-actions { flex-wrap: wrap; align-items: center; gap: 12px; }
.wb-combo { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px;
            background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .1); opacity: .7; max-width: 300px; }
.wb-combo > span { grid-row: 1 / 3; font-size: 1.5rem; filter: grayscale(1); }
.wb-combo b { color: #fff; font-size: .9rem; }
.wb-combo small { font-size: .72rem; color: var(--text-dim); }
.wb-combo i { grid-column: 2; display: flex; gap: 4px; margin-top: 6px; }
.wb-combo i em { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.wb-combo.on { opacity: 1; border-color: rgba(255, 216, 74, .6); box-shadow: 0 0 22px -8px #ffd84a; }
.wb-combo.on > span { filter: none; animation: wbZap .9s steps(2) infinite; }
.wb-combo.on b { color: #ffe27a; }
.wb-combo i em.on { background: linear-gradient(90deg, #ffd84a, #ff8a3d); box-shadow: 0 0 8px #ffb428; }
@keyframes wbZap { 50% { opacity: .5; transform: scale(1.15); } }
.wb-bolt { position: absolute; left: 50%; top: 0; width: 6px; height: 50%; margin-left: -3px; z-index: 4; pointer-events: none; transform-origin: 50% 100%; transform: rotate(var(--a));
           background: linear-gradient(180deg, transparent, #fff6c2 40%, #ffd84a); filter: drop-shadow(0 0 8px #ffd84a); clip-path: polygon(40% 0, 70% 30%, 45% 32%, 80% 70%, 35% 50%, 55% 48%, 20% 0); animation: wbBolt .6s ease-out both; }
@keyframes wbBolt { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) scaleY(1.2); } }

/* ---------- Phasen-Ansage ---------- */
.wb-phase em { display: block; font: 700 .8rem var(--font-display); letter-spacing: .4em; color: rgba(255, 255, 255, .75); text-shadow: none; margin-bottom: 4px; }
.wb-phase.k-heal { color: #8affb8; text-shadow: 0 0 30px rgba(52, 224, 127, .9), 0 4px 0 #0a3a1e; }
.wb-phase.k-armor { color: #a8dcff; text-shadow: 0 0 30px rgba(74, 184, 255, .9), 0 4px 0 #0a2a4a; }
.wb-phase.k-weakspot { color: #ffe27a; text-shadow: 0 0 30px rgba(255, 180, 40, 1), 0 4px 0 #5a3a00; }
.wb-phase.k-chaos { color: #f5a8ff; text-shadow: 0 0 30px rgba(217, 70, 239, 1), 0 4px 0 #3a0a4a; }
.wb-phase small { white-space: normal; max-width: 520px; margin: 4px auto 0; }
.wb-hpbar i.heal { background: linear-gradient(90deg, #0a6a3a, #34e07f 60%, #b8ffd6) !important; box-shadow: 0 0 24px rgba(52, 224, 127, .8) !important; }

/* ---------- Grosser Auftritt ---------- */
.wb-intro { position: fixed; inset: 0; z-index: 9100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; overflow: hidden;
            background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--bc) 30%, #05070d), #020308 70%); animation: wbIntroIn .35s ease both; }
.wb-intro.out { animation: wbIntroIn .4s ease reverse both; }
@keyframes wbIntroIn { from { opacity: 0; } }
.wb-intro-stripes { position: absolute; left: -10%; right: -10%; height: 46px; transform: rotate(-3deg);
                    background: repeating-linear-gradient(45deg, #ffd84a 0 22px, #1a1400 22px 44px); opacity: .9; animation: wbStripes 1s linear infinite; }
.wb-intro-stripes.top { top: 6%; } .wb-intro-stripes.bot { bottom: 6%; transform: rotate(-3deg) scaleX(-1); }
@keyframes wbStripes { to { background-position: 62px 0; } }
.wb-intro-warn { font: 800 clamp(.9rem, 2.4vw, 1.3rem) var(--font-display); letter-spacing: .3em; color: #ff4d6a; text-shadow: 0 0 18px #ff4d6a; animation: wbBlink .5s steps(2) infinite, wbIntroIn .3s ease both; }
.wb-intro-boss { width: min(380px, 78vw); animation: wbRise 1.1s cubic-bezier(.2, 1.2, .3, 1) .2s both; filter: drop-shadow(0 0 40px var(--bc)); }
@keyframes wbRise { from { transform: translateY(120px) scale(.6); opacity: 0; filter: brightness(0); } 60% { filter: brightness(.4); } }
.wb-intro-name { font: 900 clamp(1.8rem, 6vw, 3.4rem) var(--font-display); color: #fff; text-align: center; letter-spacing: .04em; text-shadow: 0 0 30px var(--bc), 0 4px 0 rgba(0,0,0,.6);
                 animation: wbSlam .5s cubic-bezier(.2, 1.6, .4, 1) 1.05s both; }
.wb-intro-name small { display: block; font: 700 .9rem var(--font-display); letter-spacing: .4em; color: var(--bc); text-shadow: none; }
@keyframes wbSlam { from { transform: scale(3); opacity: 0; } }
.wb-intro-weak { font-size: .9rem; color: rgba(255, 255, 255, .8); padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .15); animation: wbIntroIn .4s ease 1.6s both; text-align: center; }

@media (max-width: 700px) {
  .wb-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-combo { max-width: none; width: 100%; }
  .wb-effect { grid-template-columns: auto 1fr; }
  .wb-effect em { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .wb-sky i, .bs-arm, .bs-scan, .bs-core, .bs-wing, .bs-drone, .bs-mand, .bs-cloak, .wb-k-wraith .wb-stage .bs, .wb-fx *, .wb-arena.fx-chaos .wb-stage .bs, .wb-combo.on > span, .wb-intro * { animation: none !important; }
}
@keyframes wbBlink { 50% { opacity: .35; } }
.bs-dash { animation: bsDash 1.4s linear infinite; }
@keyframes bsDash { to { stroke-dashoffset: -54; } }
.wb-combo b, .wb-combo small { display: block; }
