/* TEK vs UBX homepage easter egg */

.tank-battle-stage {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: 1080;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.tank-battle-stage.is-on {
  opacity: 1;
}

.tank-battle-stage.is-preview {
  position: absolute;
  z-index: 1;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(20, 32, 51, 0.15), rgba(20, 32, 51, 0.45)),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.04) 18px,
      rgba(255, 255, 255, 0.04) 19px
    );
  border: 1px solid rgba(230, 235, 240, 0.9);
}

.tank-battle-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background: linear-gradient(180deg, #3d4a3a, #2a3328);
  box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.tank-battle-dust {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  height: 24px;
  background: radial-gradient(ellipse at center, rgba(180, 160, 120, 0.25), transparent 70%);
  opacity: 0.5;
}

.tb-tank {
  position: absolute;
  bottom: 22px;
  width: 96px;
  height: 52px;
  will-change: transform;
}

.tb-tank--tek {
  left: 0;
  transform: translateX(-120%);
}

.tb-tank--ubx {
  right: 0;
  left: auto;
  /* Start off-screen to the right; JS uses translateX(-x) to pull inward */
  transform: translateX(120%) scaleX(-1);
}

.tb-tank svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.35));
}

.tb-label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  text-transform: uppercase;
}

.tb-tank--tek .tb-label {
  background: #0b4fad;
}

.tb-tank--ubx .tb-label {
  background: #8b1e1e;
  transform: translateX(-50%) scaleX(-1);
}

.tb-shell {
  position: absolute;
  bottom: 48px;
  width: 10px;
  height: 4px;
  border-radius: 2px;
  background: #f5d76e;
  box-shadow: 0 0 6px rgba(245, 215, 110, 0.8);
  opacity: 0;
  pointer-events: none;
}

.tb-boom {
  position: absolute;
  bottom: 28px;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, #fff7c2 0%, #ffb347 28%, #e85d04 55%, transparent 70%);
  opacity: 0;
  transform: scale(0.2);
  pointer-events: none;
}

.tb-banner {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%) translateY(-8px);
  font: 700 13px/1.2 system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(20, 32, 51, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
}

.tb-banner.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  /* Keep the intentional easter egg visible; only soften transitions */
  .tank-battle-stage {
    transition: none;
  }
}
