/* ------------------------------------------------------------------
   In-game banners, toasts and the iris transition
   ------------------------------------------------------------------ */

.banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  line-height: 1;
  opacity: 0;
}

.banner.show {
  animation: banner-in 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}

.banner.show.hide {
  animation: banner-out 0.3s ease-in forwards;
}

.banner-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 76px);
  color: #fff;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink), 0 0 30px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  white-space: nowrap;
}

.banner-sub {
  margin-top: 10px;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(27, 19, 48, 0.85);
  font-size: clamp(14px, 2.4vw, 20px);
  color: #fff;
}

.banner-go .banner-title { color: var(--yellow); font-size: clamp(48px, 10vw, 110px); }
.banner-good .banner-title { color: #7dffb0; }
.banner-warn .banner-title { color: #ff6b7a; }
.banner-count .banner-title { color: var(--yellow); font-size: clamp(56px, 12vw, 130px); }
.banner-p0 .banner-title { color: #7fb6ff; }
.banner-p1 .banner-title { color: #ff8a96; }
.banner-p2 .banner-title { color: #7ff0a4; }
.banner-p3 .banner-title { color: #ffdb7a; }

@keyframes banner-in {
  from {
    opacity: 0;
    transform: scale(2.2) rotate(-6deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes banner-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: scale(0.7) translateY(-20px);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 30;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 999px;
  background: #ff4d5e;
  box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  animation: toast-in 0.3s cubic-bezier(0.2, 1.6, 0.4, 1);
  transition: opacity 0.4s, transform 0.4s;
}

.toast.hide {
  opacity: 0;
  transform: translate(-50%, 20px);
}

@keyframes toast-in {
  from {
    transform: translate(-50%, 40px);
    opacity: 0;
  }
}

/* Circular "iris" wipe used between screens */
.iris {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: var(--bg-1);
  clip-path: circle(0% at 50% 50%);
  visibility: hidden;
}

.iris.closing,
.iris.opening {
  visibility: visible;
  pointer-events: auto;
}

.iris.closing {
  animation: iris-close 0.38s ease-in forwards;
}

.iris.opening {
  animation: iris-open 0.42s ease-out forwards;
}

@keyframes iris-close {
  from {
    clip-path: circle(0% at 50% 50%);
  }
  to {
    clip-path: circle(75% at 50% 50%);
  }
}

@keyframes iris-open {
  from {
    clip-path: circle(75% at 50% 50%);
  }
  to {
    clip-path: circle(0% at 50% 50%);
  }
}

/* "Nerd stats" panel (Opções → Estatísticas nerds, or F3) */
.stats {
  position: fixed;
  left: 8px;
  top: 8px;
  z-index: 35;
  display: none;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 4, 20, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
  color: #d8ffe4;
}

.stats.visible {
  display: block;
}

.stats canvas {
  display: block;
  width: 300px;
  height: 56px;
  margin-bottom: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.stats pre {
  margin: 0;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre;
}

.opt-label small {
  font-family: var(--font-body);
  font-size: 0.55em;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  vertical-align: middle;
}

@media (max-width: 700px) {
  .stats {
    transform: scale(0.8);
    transform-origin: top left;
  }
}
