/* Vaga Coach — duelo de treino isolado (sem PvP/PvM battle) */
body.pnv-coach-duel-active {
  overflow: hidden;
}

.pnv-coach-duel-overlay {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  overflow: visible;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(99, 102, 241, 0.22), transparent 70%),
    rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pnv-coach-duel-overlay[hidden] {
  display: none !important;
}

.pnv-coach-duel-sheet {
  width: min(480px, 100%);
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: visible;
  position: relative;
  isolation: isolate;
  border-radius: 22px 22px 0 0;
  background:
    linear-gradient(165deg, rgba(30, 27, 75, 0.98) 0%, rgba(49, 46, 129, 0.96) 42%, rgba(15, 23, 42, 0.98) 100%);
  color: #f8fafc;
  box-shadow:
    0 -12px 48px rgba(99, 102, 241, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: pnv-coach-duel-slide 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.pnv-coach-duel-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(167, 139, 250, 0.55) 0%,
    rgba(99, 102, 241, 0.2) 40%,
    rgba(251, 191, 36, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.pnv-coach-duel-sheet--battle {
  box-shadow:
    0 -12px 48px rgba(99, 102, 241, 0.32),
    0 0 40px rgba(99, 102, 241, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

#pnvCoachDuelBody {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  position: relative;
  z-index: 2;
}

#pnvCoachDuelBody.pnv-coach-duel-body--scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
  .pnv-coach-duel-overlay {
    align-items: center;
    padding: 20px;
  }

  .pnv-coach-duel-sheet {
    border-radius: 22px;
    max-height: min(88vh, 680px);
  }
}

@keyframes pnv-coach-duel-slide {
  from {
    transform: translateY(28px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Header */
.pnv-coach-duel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

.pnv-coach-duel-head__text {
  min-width: 0;
}

.pnv-coach-duel-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a5b4fc;
}

.pnv-coach-duel-title {
  margin: 0;
  font-size: clamp(1.05rem, 3.8vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  background: linear-gradient(90deg, #f8fafc 0%, #c7d2fe 55%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pnv-coach-duel-close {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.45);
  color: #e2e8f0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.pnv-coach-duel-close:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(167, 139, 250, 0.45);
}

.pnv-coach-duel-close:active {
  transform: scale(0.94);
}

/* Battle arena wrapper */
.pnv-coach-duel-arena {
  position: relative;
  padding: 2px 0 4px;
}

.pnv-coach-duel-stage {
  position: relative;
}

.pnv-coach-duel-arena--bot-turn .pnv-coach-duel-stage {
  pointer-events: none;
}

.pnv-coach-duel-arena--bot-turn .pnv-coach-duel-opt {
  pointer-events: none;
}

.pnv-coach-duel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #c7d2fe;
}

.pnv-coach-duel-round {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pnv-coach-duel-scope {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.pnv-coach-duel-scope__pill {
  display: inline-block;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Setup */
.pnv-coach-duel-setup {
  padding: 4px 2px 8px;
  overflow: visible;
}

.pnv-coach-duel-setup__hero {
  text-align: center;
  margin-bottom: 18px;
}

.pnv-coach-duel-setup__avatar-ring {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(145deg, #818cf8, #6366f1 45%, #f59e0b);
  padding: 3px;
  box-shadow:
    0 10px 28px rgba(99, 102, 241, 0.38),
    0 0 24px rgba(99, 102, 241, 0.18);
}

.pnv-coach-duel-setup__avatar-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(167, 139, 250, 0.35);
  animation: pnv-coach-duel-avatar-ring 2.6s ease-in-out infinite;
  pointer-events: none;
}

.pnv-coach-duel-setup__avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #1e1b4b;
}

.pnv-coach-duel-setup__tagline {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fbbf24;
}

.pnv-coach-duel-setup__lead {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: #c7d2fe;
  line-height: 1.5;
  text-align: center;
}

.pnv-coach-duel-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
}

/* Setup: sheet não limita dropdown — mobile ocupa tela inteira */
.pnv-coach-duel-sheet--setup {
  max-height: none;
  height: auto;
}

@media (max-width: 639px) {
  .pnv-coach-duel-overlay:has(.pnv-coach-duel-sheet--setup) {
    align-items: stretch;
    padding: 0;
  }

  .pnv-coach-duel-sheet--setup {
    width: 100%;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding-top: max(18px, env(safe-area-inset-top, 0px));
  }
}

.pnv-coach-duel-filters .pnv-ms-wrap {
  width: 100%;
  flex: none;
}

.pnv-coach-duel-filters .training-select,
.pnv-coach-duel-filters .pnv-ms-trigger {
  width: 100%;
  font-size: 0.88rem;
}

/* Multiseleção — mesmo padrão PvM (pnv-multiselect.css), tema escuro do overlay */
.pnv-coach-duel-sheet .pnv-ms-wrap.is-open {
  position: relative;
  z-index: 5;
}

.pnv-coach-duel-sheet .pnv-ms-wrap button.training-select.pnv-ms-trigger {
  background-color: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a5b4fc' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
}

.pnv-coach-duel-sheet .pnv-ms-drop {
  z-index: 200;
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.pnv-coach-duel-sheet .pnv-ms-row {
  color: #e2e8f0;
}

.pnv-coach-duel-sheet .pnv-ms-row:active {
  background: rgba(99, 102, 241, 0.18);
}

.pnv-coach-duel-sheet .pnv-ms-drop-foot {
  border-color: rgba(255, 255, 255, 0.1);
}

.pnv-coach-duel-sheet .pnv-ms-clear {
  color: #a5b4fc;
}

.pnv-coach-duel-sheet .pnv-ms-empty {
  color: #94a3b8;
}

/* Dropdown portaled (fixed) — escapa do max-height do sheet */
.pnv-coach-duel-overlay .pnv-ms-drop.pnv-ms-drop--fixed {
  z-index: 12060 !important;
}

.pnv-coach-duel-overlay .pnv-ms-drop.pnv-ms-drop--fixed .pnv-ms-drop-list {
  max-height: min(42vh, 280px);
  -webkit-overflow-scrolling: touch;
}

.pnv-coach-duel-btn--wide {
  width: 100%;
  margin-bottom: 8px;
}

/* Sheet flash overlays (::after no sheet position:relative) */

.pnv-coach-duel-sheet--flash-hit-user::after,
.pnv-coach-duel-sheet--flash-hit-bot::after,
.pnv-coach-duel-sheet--flash-correct::after,
.pnv-coach-duel-sheet--flash-wrong::after,
.pnv-coach-duel-sheet--flash-win::after,
.pnv-coach-duel-sheet--flash-loss::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: pnv-coach-duel-flash 0.45s ease-out forwards;
  z-index: 4;
  border-radius: inherit;
}

.pnv-coach-duel-sheet--flash-hit-user::after {
  background: rgba(239, 68, 68, 0.22);
}
.pnv-coach-duel-sheet--flash-hit-bot::after {
  background: rgba(34, 197, 94, 0.18);
}
.pnv-coach-duel-sheet--flash-correct::after {
  background: rgba(34, 197, 94, 0.28);
}
.pnv-coach-duel-sheet--flash-wrong::after {
  background: rgba(239, 68, 68, 0.3);
}
.pnv-coach-duel-sheet--flash-win::after {
  background: radial-gradient(circle at 50% 30%, rgba(250, 204, 21, 0.4), transparent 65%);
}
.pnv-coach-duel-sheet--flash-loss::after {
  background: radial-gradient(circle at 50% 30%, rgba(148, 163, 184, 0.28), transparent 65%);
}

@keyframes pnv-coach-duel-flash {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.pnv-coach-duel-hp--shake {
  animation: pnv-coach-duel-shake 0.42s ease;
}

@keyframes pnv-coach-duel-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
}

.pnv-coach-duel-hp__fill--damage {
  animation: pnv-coach-duel-hp-damage 0.5s ease;
}

@keyframes pnv-coach-duel-hp-damage {
  0% {
    filter: brightness(1.4);
  }
  50% {
    filter: brightness(0.7);
  }
  100% {
    filter: brightness(1);
  }
}

.pnv-coach-duel-hp--pulse-good {
  animation: pnv-coach-duel-pulse-good 0.55s ease;
}

.pnv-coach-duel-hp--pulse-bad {
  animation: pnv-coach-duel-pulse-bad 0.55s ease;
}

@keyframes pnv-coach-duel-pulse-good {
  0%,
  100% {
    box-shadow: none;
  }
  50% {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.45);
  }
}

@keyframes pnv-coach-duel-pulse-bad {
  0%,
  100% {
    box-shadow: none;
  }
  50% {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.45);
  }
}

.pnv-coach-duel-hp--answering {
  opacity: 0.92;
}

.pnv-coach-duel-hp-row--enter {
  animation: pnv-coach-duel-fade-in 0.35s ease;
}

.pnv-coach-duel-question--enter {
  animation: pnv-coach-duel-slide-in 0.38s ease-out;
}

@keyframes pnv-coach-duel-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pnv-coach-duel-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.pnv-coach-duel-feedback--thinking {
  color: #fbbf24;
  font-weight: 600;
}

.pnv-coach-duel-feedback--loading {
  text-align: center;
  padding: 32px 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #c7d2fe;
  animation: pnv-coach-duel-pulse 1.2s ease-in-out infinite;
}

.pnv-coach-duel-dots span {
  animation: pnv-coach-duel-dot 1.2s ease-in-out infinite;
}

.pnv-coach-duel-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.pnv-coach-duel-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pnv-coach-duel-dot {
  0%,
  60%,
  100% {
    opacity: 0.25;
  }
  30% {
    opacity: 1;
  }
}

.pnv-coach-duel-opt.is-correct {
  animation: pnv-coach-duel-opt-pop 0.4s ease;
}

.pnv-coach-duel-opt.is-wrong {
  animation: pnv-coach-duel-opt-shake 0.35s ease;
}

@keyframes pnv-coach-duel-opt-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pnv-coach-duel-opt-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

.pnv-coach-duel-result__emoji--pop {
  animation: pnv-coach-duel-emoji-pop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes pnv-coach-duel-emoji-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pnv-coach-duel-result--user .pnv-coach-duel-result__title {
  background: linear-gradient(90deg, #fbbf24, #4ade80, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pnv-coach-duel-result--bot .pnv-coach-duel-result__title {
  color: #f8fafc;
}

.pnv-coach-duel-result--draw .pnv-coach-duel-result__title {
  background: linear-gradient(90deg, #a5b4fc, #e2e8f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pnv-coach-duel-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
  border-radius: inherit;
}

.pnv-coach-duel-confetti__bit {
  position: absolute;
  top: 28%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  opacity: 0;
  animation: pnv-coach-duel-confetti 1.8s ease-out forwards;
  animation-delay: calc(var(--i) * 0.04s);
  transform: rotate(calc(var(--i) * 24deg));
}

@keyframes pnv-coach-duel-confetti {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + (var(--i) - 9) * 14px),
        calc(80px + (var(--i) % 5) * 28px)
      )
      rotate(calc(var(--i) * 45deg))
      scale(0.4);
  }
}

@keyframes pnv-coach-duel-avatar-ring {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.06);
  }
}

.pnv-coach-duel-timer {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(139, 92, 246, 0.35));
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
  white-space: nowrap;
}

.pnv-coach-duel-timer.is-low {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.55), rgba(249, 115, 22, 0.45));
  border-color: rgba(248, 113, 113, 0.5);
  animation: pnv-coach-duel-pulse 0.8s ease-in-out infinite;
}

@keyframes pnv-coach-duel-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* HP bars */
.pnv-coach-duel-hp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
}

.pnv-coach-duel-hp-row::after {
  content: "VS";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #f8fafc;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: 4px 7px;
  border-radius: 8px;
  border: 2px solid rgba(30, 27, 75, 0.95);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.pnv-coach-duel-hp {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 14px;
  padding: 10px 10px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pnv-coach-duel-hp--player {
  border-color: rgba(74, 222, 128, 0.22);
}

.pnv-coach-duel-hp--bot {
  border-color: rgba(251, 191, 36, 0.22);
}

.pnv-coach-duel-hp__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.pnv-coach-duel-hp__track {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.pnv-coach-duel-hp__fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
  position: relative;
}

.pnv-coach-duel-hp__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 55%);
  border-radius: inherit;
  pointer-events: none;
}

.pnv-coach-duel-hp__fill--user {
  background: linear-gradient(90deg, #16a34a, #4ade80);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.35);
}

.pnv-coach-duel-hp__fill--bot {
  background: linear-gradient(90deg, #d97706, #fbbf24);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

/* Question card */
.pnv-coach-duel-question {
  position: relative;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 14px;
  margin-bottom: 14px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pnv-coach-duel-question::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #6366f1, #a78bfa, #fbbf24);
  opacity: 0.75;
}

.pnv-coach-duel-question p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.5;
  font-weight: 600;
  color: #f1f5f9;
}

/* Answer options */
.pnv-coach-duel-options {
  display: grid;
  gap: 9px;
}

.pnv-coach-duel-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.4);
  color: #f1f5f9;
  border-radius: 14px;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: border-color 0.15s, background 0.15s, transform 0.12s ease, box-shadow 0.15s;
}

.pnv-coach-duel-opt__letter {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.28);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #e0e7ff;
}

.pnv-coach-duel-opt__text {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.pnv-coach-duel-opt:hover:not(:disabled) {
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(99, 102, 241, 0.22);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.pnv-coach-duel-opt:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.pnv-coach-duel-opt:disabled {
  opacity: 0.6;
  cursor: default;
}

.pnv-coach-duel-opt.is-correct {
  border-color: #4ade80;
  background: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.25), 0 4px 16px rgba(34, 197, 94, 0.15);
}

.pnv-coach-duel-opt.is-correct .pnv-coach-duel-opt__letter {
  background: rgba(34, 197, 94, 0.35);
  border-color: rgba(74, 222, 128, 0.5);
  color: #dcfce7;
}

.pnv-coach-duel-opt.is-wrong {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.18);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.pnv-coach-duel-opt.is-wrong .pnv-coach-duel-opt__letter {
  background: rgba(239, 68, 68, 0.35);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fee2e2;
}

.pnv-coach-duel-feedback {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  min-height: 1.2em;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pnv-coach-duel-feedback:not(:empty) {
  border-color: rgba(255, 255, 255, 0.1);
}

.pnv-coach-duel-expl-tip {
  margin: 8px 0 0;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  color: #e0e7ff;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.pnv-coach-duel-expl-tip__caderno {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fcd34d;
}

.pnv-coach-duel-expl-slot {
  margin-top: 8px;
}

.pnv-coach-duel-expl-slot[hidden] {
  display: none !important;
}

.pnv-coach-duel-feedback__line {
  display: block;
  margin-bottom: 4px;
}

.pnv-coach-duel-expl {
  margin-top: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(49, 46, 129, 0.55) 0%, rgba(15, 23, 42, 0.72) 100%);
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.18);
  animation: pnv-coach-duel-expl-in 0.28s ease-out;
}

.pnv-coach-duel-expl--ok {
  border-color: rgba(52, 211, 153, 0.4);
  background:
    linear-gradient(165deg, rgba(6, 78, 59, 0.45) 0%, rgba(30, 27, 75, 0.7) 100%);
}

.pnv-coach-duel-expl--err {
  border-color: rgba(248, 113, 113, 0.4);
  background:
    linear-gradient(165deg, rgba(127, 29, 29, 0.4) 0%, rgba(30, 27, 75, 0.7) 100%);
}

.pnv-coach-duel-expl--empty {
  padding: 10px 12px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
}

.pnv-coach-duel-expl__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #c4b5fd;
}

.pnv-coach-duel-expl__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #5b6cff, #7c3aed);
  box-shadow: 0 4px 12px rgba(91, 108, 255, 0.35);
  font-size: 12px;
}

.pnv-coach-duel-expl__text {
  margin: 0;
  padding: 4px 12px 8px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
  color: #f8fafc;
  white-space: pre-wrap;
  max-height: min(28vh, 180px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.pnv-coach-duel-expl__caderno {
  margin: 0;
  padding: 0 12px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fcd34d;
  line-height: 1.35;
}

.pnv-coach-duel-expl__caderno strong {
  font-weight: 800;
  color: #fde68a;
}

.pnv-coach-duel-expl__advance {
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(167, 139, 250, 0.2);
  background: rgba(15, 23, 42, 0.35);
}

.pnv-coach-duel-expl__continue {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.pnv-coach-duel-expl__continue:active {
  transform: scale(0.98);
}

@keyframes pnv-coach-duel-expl-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .pnv-coach-duel-expl {
    animation: none;
  }
}

/* Result screens */
.pnv-coach-duel-result {
  text-align: center;
  padding: 16px 10px 8px;
  position: relative;
}

.pnv-coach-duel-result::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(280px, 80%);
  height: 120px;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.pnv-coach-duel-result--user::before {
  background: radial-gradient(ellipse at center, rgba(250, 204, 21, 0.22), transparent 70%);
}

.pnv-coach-duel-result--bot::before {
  background: radial-gradient(ellipse at center, rgba(148, 163, 184, 0.18), transparent 70%);
}

.pnv-coach-duel-result--draw::before {
  background: radial-gradient(ellipse at center, rgba(129, 140, 248, 0.2), transparent 70%);
}

.pnv-coach-duel-result > * {
  position: relative;
  z-index: 1;
}

.pnv-coach-duel-result__emoji {
  font-size: 3rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
}

.pnv-coach-duel-result__title {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 4.5vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pnv-coach-duel-result__sub {
  margin: 0 0 14px;
  color: #c7d2fe;
  font-size: 0.9rem;
  line-height: 1.45;
}

.pnv-coach-duel-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Buttons */
.pnv-coach-duel-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.pnv-coach-duel-btn--primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #7c3aed 100%);
  color: #fff;
  box-shadow:
    0 4px 16px rgba(99, 102, 241, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pnv-coach-duel-btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.pnv-coach-duel-btn--primary:active {
  transform: scale(0.98);
}

.pnv-coach-duel-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pnv-coach-duel-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.pnv-coach-duel-btn--ghost:active {
  transform: scale(0.98);
}

/* Bloco no painel do mascote */
.pnv-mascot-block--coach-duel {
  background: linear-gradient(145deg, rgba(238, 242, 255, 0.95), rgba(248, 250, 252, 0.98));
  border-color: rgba(99, 102, 241, 0.18);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.06);
}

.pnv-mascot-block--coach-duel .pnv-mascot-coach-duel__stats {
  display: flex;
  gap: 12px;
  font-size: 0.82rem;
  color: #64748b;
  margin: 6px 0 10px;
}

.pnv-mascot-block--coach-duel .pnv-mascot-block__cta--coach {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}

.pnv-mascot-coach-duel-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pnv-mascot-coach-duel-badge--win {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.95), rgba(187, 247, 208, 0.85));
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.pnv-mascot-coach-duel-badge--loss {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.95), rgba(254, 202, 202, 0.85));
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.pnv-mascot-coach-duel-badge--draw {
  background: linear-gradient(135deg, rgba(224, 231, 255, 0.95), rgba(199, 210, 254, 0.85));
  color: #3730a3;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Turno do Vaga Coach — overlay sobre questão + alternativas */
.pnv-coach-duel-bot-turn {
  position: absolute;
  inset: 0;
  z-index: 20;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  animation: pnv-coach-duel-bot-turn-in 0.32s ease-out;
}

.pnv-coach-duel-bot-turn--out {
  animation: pnv-coach-duel-bot-turn-out 0.28s ease-in forwards;
}

.pnv-coach-duel-bot-turn__card {
  position: relative;
  text-align: center;
  padding: 22px 16px 18px;
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(30, 27, 75, 0.65), rgba(15, 23, 42, 0.55));
  border: 1px solid rgba(167, 139, 250, 0.25);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.pnv-coach-duel-bot-turn__card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.5), rgba(251, 191, 36, 0.25));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.pnv-coach-duel-bot-turn__card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  width: 180px;
  height: 180px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 65%);
  pointer-events: none;
}

.pnv-coach-duel-bot-turn__avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  z-index: 1;
}

.pnv-coach-duel-bot-turn__avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #818cf8, #6366f1, #f59e0b);
  animation: pnv-coach-duel-avatar-ring 2.2s ease-in-out infinite;
  opacity: 0.65;
}

.pnv-coach-duel-bot-turn__avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
  border: 2px solid rgba(30, 27, 75, 0.9);
  z-index: 1;
}

.pnv-coach-duel-bot-turn__icon {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 1.4rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  z-index: 2;
}

.pnv-coach-duel-bot-turn__title {
  position: relative;
  z-index: 1;
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: -0.01em;
}

.pnv-coach-duel-bot-turn__line {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: #c7d2fe;
  font-weight: 600;
}

.pnv-coach-duel-bot-turn__dots {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
}

.pnv-coach-duel-bot-turn__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5b4fc;
  animation: pnv-coach-duel-dot 1.2s ease-in-out infinite;
}

.pnv-coach-duel-bot-turn__dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.pnv-coach-duel-bot-turn__dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.pnv-coach-duel-bot-turn--think .pnv-coach-duel-bot-turn__avatar {
  animation: pnv-coach-duel-bot-think 1.1s ease-in-out infinite;
}

.pnv-coach-duel-bot-turn--write .pnv-coach-duel-bot-turn__avatar {
  animation: pnv-coach-duel-bot-write 0.9s ease-in-out infinite;
}

.pnv-coach-duel-bot-turn--bolt .pnv-coach-duel-bot-turn__avatar {
  animation: pnv-coach-duel-bot-bolt 0.55s ease-in-out infinite;
}

.pnv-coach-duel-bot-turn--search .pnv-coach-duel-bot-turn__avatar {
  animation: pnv-coach-duel-bot-search 1.4s ease-in-out infinite;
}

.pnv-coach-duel-bot-turn--peek .pnv-coach-duel-bot-turn__avatar {
  animation: pnv-coach-duel-bot-peek 1.2s ease-in-out infinite;
}

.pnv-coach-duel-bot-turn--bolt .pnv-coach-duel-bot-turn__icon {
  animation: pnv-coach-duel-bot-icon-flash 0.55s ease-in-out infinite;
}

@keyframes pnv-coach-duel-bot-turn-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pnv-coach-duel-bot-turn-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes pnv-coach-duel-bot-think {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-4deg);
  }
  50% {
    transform: translate(-50%, -54%) rotate(4deg);
  }
}

@keyframes pnv-coach-duel-bot-write {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  25% {
    transform: translate(-48%, -50%) rotate(-3deg);
  }
  75% {
    transform: translate(-52%, -50%) rotate(3deg);
  }
}

@keyframes pnv-coach-duel-bot-bolt {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -52%) scale(1.06);
    filter: brightness(1.2);
  }
}

@keyframes pnv-coach-duel-bot-search {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-46%, -50%);
  }
}

@keyframes pnv-coach-duel-bot-peek {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  40% {
    transform: translate(-50%, -48%) scale(1.04);
  }
  60% {
    transform: translate(-50%, -50%) scale(0.98);
  }
}

@keyframes pnv-coach-duel-bot-icon-flash {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pnv-coach-duel-sheet,
  .pnv-coach-duel-hp--shake,
  .pnv-coach-duel-question--enter,
  .pnv-coach-duel-confetti__bit,
  .pnv-coach-duel-result__emoji--pop,
  .pnv-coach-duel-setup__avatar-ring::after,
  .pnv-coach-duel-bot-turn__avatar-wrap::before,
  .pnv-coach-duel-timer.is-low,
  .pnv-coach-duel-feedback--loading {
    animation: none !important;
  }
  .pnv-coach-duel-hp__fill {
    transition: none;
  }
  .pnv-coach-duel-opt:hover:not(:disabled) {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pnv-coach-duel-bot-turn,
  .pnv-coach-duel-bot-turn--out,
  .pnv-coach-duel-bot-turn__avatar,
  .pnv-coach-duel-bot-turn__icon,
  .pnv-coach-duel-bot-turn__dots span {
    animation: none !important;
  }
}
