/* Manto Jinchūriki: captura da Bijū no ritual, transformação e HUD da caçada. */

/* ---------------------------------------------- Bijū sugada para o pergaminho */
.nrmt-seal-cinematic__captive {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  transform: translateY(-46px) scale(1);
  opacity: 1;
  transition: transform .5s cubic-bezier(.5, 0, .75, .2), opacity .5s ease, filter .4s ease;
}

.nrmt-seal-cinematic__captive img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(255, 132, 56, .75));
}

.nrmt-seal-cinematic__captive span {
  color: rgba(226, 179, 64, .5);
  font: 900 54px Georgia, serif;
}

.nrmt-seal-cinematic.phase-2 .nrmt-seal-cinematic__captive { transform: translateY(-38px) scale(.92); }
.nrmt-seal-cinematic.phase-3 .nrmt-seal-cinematic__captive { transform: translateY(-24px) scale(.8); filter: brightness(1.3); }
.nrmt-seal-cinematic.phase-4 .nrmt-seal-cinematic__captive { transform: translateY(-6px) scale(.5); opacity: .75; }

.nrmt-seal-cinematic.is-success .nrmt-seal-cinematic__captive {
  transform: translateY(4px) scale(.06);
  opacity: 0;
}

.nrmt-seal-cinematic.is-failure .nrmt-seal-cinematic__captive {
  transform: translateY(-72px) scale(1.35);
  opacity: 0;
  filter: brightness(1.6) saturate(1.5);
}

/* ------------------------------------------------------ sequência de selos */
.nrmt-seal-cinematic__hands {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
}

.nrmt-seal-cinematic__hands i {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid #2f3b39;
  background: #101817;
  color: #475754;
  font: 800 11px/1 Georgia, serif;
  font-style: normal;
  transition: color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.nrmt-seal-cinematic__hands i.is-done { color: #a68c4c; border-color: #4e4529; }

.nrmt-seal-cinematic__hands i.is-active {
  transform: scale(1.22);
  border-color: #f0cf6d;
  color: #ffe9a8;
  box-shadow: 0 0 12px rgba(240, 207, 109, .55);
}

/* --------------------------------------------------------- item conquistado */
.nrmt-seal-cinematic__reward {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 13px;
  text-align: left;
  border: 1px solid #b58327;
  background: linear-gradient(100deg, rgba(38, 27, 9, .95), rgba(14, 20, 20, .95));
  box-shadow: inset 0 0 24px rgba(212, 168, 60, .09);
  animation: nrmtRewardIn .42s .12s cubic-bezier(.18, .82, .26, 1) both;
}

.nrmt-seal-cinematic__reward-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 62px;
}

.nrmt-seal-cinematic__reward-art img {
  position: relative;
  z-index: 2;
  max-width: 56px;
  max-height: 58px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 9px rgba(240, 190, 80, .6));
}

.nrmt-seal-cinematic__reward-art i {
  position: absolute;
  color: rgba(226, 179, 64, .16);
  font: 900 46px Georgia, serif;
  font-style: normal;
  animation: nrmtRitualOrbit 11s linear infinite;
}

.nrmt-seal-cinematic__reward-body { display: grid; gap: 3px; min-width: 0; }
.nrmt-seal-cinematic__reward-body small { color: #a5895a; font-size: 7px; font-weight: 900; letter-spacing: .2em; }
.nrmt-seal-cinematic__reward-body strong { color: #ffd970; font: italic 17px/1.15 NinjaTitle, Georgia, serif; letter-spacing: .03em; }
.nrmt-seal-cinematic__reward-body span { color: #97a3a0; font-size: 9px; line-height: 1.4; }

@keyframes nrmtRewardIn {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ------------------------------------------------- cinemática da transformação */
.nrmt-bijuu-transform {
  position: fixed;
  z-index: 999950;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  font-family: "Segoe UI", Arial, sans-serif;
  transition: opacity .2s ease;
}

.nrmt-bijuu-transform.is-visible { opacity: 1; }

.nrmt-bijuu-transform__burst {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--bijuu-color) 34%, transparent), rgba(4, 6, 7, .9) 62%);
  animation: nrmtBijuuBurst .7s ease-out both;
}

.nrmt-bijuu-transform__stage {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 22px 34px;
  text-align: center;
  animation: nrmtBijuuStage .42s cubic-bezier(.18, .82, .26, 1) both;
}

.nrmt-bijuu-transform__vessel {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
}

.nrmt-bijuu-transform__vessel::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--bijuu-color);
  border-radius: 50%;
  box-shadow: 0 0 40px var(--bijuu-color), inset 0 0 30px color-mix(in srgb, var(--bijuu-color) 45%, transparent);
  animation: nrmtRitualOrbit 3.4s linear infinite;
}

.nrmt-bijuu-transform__vessel img {
  position: relative;
  z-index: 2;
  width: 94px;
  height: 94px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 16px var(--bijuu-color));
  animation: nrmtBijuuVessel .9s ease-in-out infinite alternate;
}

.nrmt-bijuu-transform__vessel i {
  position: absolute;
  color: color-mix(in srgb, var(--bijuu-color) 26%, transparent);
  font: 900 104px Georgia, serif;
  font-style: normal;
}

.nrmt-bijuu-transform__tails {
  position: absolute;
  top: 46px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.nrmt-bijuu-transform__tails span {
  width: 6px;
  height: 74px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, var(--bijuu-color), transparent);
  opacity: .55;
  transform-origin: 50% 100%;
  transform: rotate(calc((var(--tail) - 4.5) * 13deg));
  animation: nrmtBijuuTail 1.4s ease-in-out infinite alternate;
  animation-delay: calc(var(--tail) * .07s);
}

.nrmt-bijuu-transform__body { display: grid; gap: 4px; }
.nrmt-bijuu-transform__body small { color: color-mix(in srgb, var(--bijuu-color) 75%, #fff); font-size: 9px; font-weight: 900; letter-spacing: .3em; }
.nrmt-bijuu-transform__body strong { color: #fff; font: italic 900 clamp(26px, 5vw, 52px)/1 NinjaTitle, Georgia, serif; letter-spacing: .05em; text-shadow: 0 0 26px var(--bijuu-color); }
.nrmt-bijuu-transform__body span { color: #e6dcc6; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.nrmt-bijuu-transform__body em { color: #ff9c6e; font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: .16em; }

@keyframes nrmtBijuuBurst { from { opacity: 0; transform: scale(1.4); } to { opacity: 1; transform: scale(1); } }
@keyframes nrmtBijuuStage { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@keyframes nrmtBijuuVessel { to { transform: translateY(-6px) scale(1.05); } }
@keyframes nrmtBijuuTail { to { opacity: .9; transform: rotate(calc((var(--tail) - 4.5) * 17deg)) scaleY(1.12); } }

/* ------------------------------------------------------------- HUD da caçada */
#nrmt-jinchuriki-form-hud {
  position: fixed;
  z-index: 9600;
  right: 14px;
  bottom: 128px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 9px;
  align-items: center;
  width: 236px;
  padding: 8px 11px;
  border: 1px solid var(--nrmt-jinchuriki-color, #e44b3e);
  background: linear-gradient(100deg, rgba(11, 14, 15, .97), rgba(41, 18, 11, .97));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .72), 0 0 20px color-mix(in srgb, var(--nrmt-jinchuriki-color, #e44b3e) 25%, transparent);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

#nrmt-jinchuriki-form-hud[hidden] { display: none; }

.nrmt-jf-mark { position: relative; display: grid; place-items: center; height: 44px; }
.nrmt-jf-mark img { position: relative; z-index: 2; max-width: 40px; max-height: 42px; image-rendering: pixelated; filter: drop-shadow(0 0 7px var(--nrmt-jinchuriki-color, #e44b3e)); }
.nrmt-jf-mark i { position: absolute; color: color-mix(in srgb, var(--nrmt-jinchuriki-color, #e44b3e) 30%, transparent); font: 900 38px Georgia, serif; font-style: normal; }

.nrmt-jf-body { min-width: 0; }
.nrmt-jf-body header { display: grid; }
.nrmt-jf-body header small { color: #d98843; font-size: 6px; font-weight: 900; letter-spacing: .16em; }
.nrmt-jf-body header strong { overflow: hidden; color: #fff0d0; font: italic 14px NinjaTitle, Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }

.nrmt-jf-track { height: 5px; margin-top: 5px; overflow: hidden; border: 1px solid #4f3021; background: #080b0c; }
.nrmt-jf-track i { display: block; height: 100%; background: linear-gradient(90deg, #8b1e18, var(--nrmt-jinchuriki-color, #e44b3e)); box-shadow: 0 0 9px var(--nrmt-jinchuriki-color, #e44b3e); transition: width .6s linear; }

.nrmt-jf-body footer { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; }
.nrmt-jf-body footer span { color: #e9c26b; font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; }
.nrmt-jf-body footer em { color: #97867a; font-size: 6px; font-style: normal; font-weight: 900; letter-spacing: .1em; }

#nrmt-jinchuriki-form-hud.is-ending { animation: nrmtJinchFormEnding .9s ease-in-out infinite alternate; }
@keyframes nrmtJinchFormEnding { to { border-color: #ffca6a; box-shadow: 0 10px 30px rgba(0, 0, 0, .72), 0 0 26px rgba(255, 202, 106, .5); } }

/* Vinheta discreta enquanto a forma está ativa: lembra o jogador sem cobrir a hunt. */
body.nrmt-jinchuriki-form-active::after {
  content: "";
  position: fixed;
  z-index: 40;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 58%, color-mix(in srgb, var(--nrmt-jinchuriki-color, #e44b3e) 16%, transparent) 100%);
  animation: nrmtJinchFormAura 3.6s ease-in-out infinite alternate;
}

@keyframes nrmtJinchFormAura { from { opacity: .55; } to { opacity: 1; } }

@media (max-width: 900px) {
  #nrmt-jinchuriki-form-hud { right: 8px; bottom: 96px; width: 196px; }
}

@media (prefers-reduced-motion: reduce) {
  .nrmt-bijuu-transform *, #nrmt-jinchuriki-form-hud, body.nrmt-jinchuriki-form-active::after {
    animation: none !important;
    transition: none !important;
  }
}
