.thunder-shooter-effect-2 {
  position: relative;
  flex: 1 1 220px;
  align-self: stretch;
  width: 100%;
  min-height: 220px;
  max-height: none;
  border: 1px solid rgba(57,53,82,.96);
  border-radius: 9px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(105deg, rgba(44,240,255,.08), transparent 28% 72%, rgba(183,255,26,.065)),
    linear-gradient(180deg, #090b1a 0%, #101229 52%, #050713 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.035),
    inset 0 0 30px rgba(44,240,255,.055),
    0 14px 38px rgba(0,0,0,.18);
  cursor: none;
  touch-action: none;
  user-select: none;
}

.app-shell.thunder-resizing,
.app-shell.thunder-resizing * {
  cursor: ew-resize !important;
  user-select: none;
}

.thunder-shooter-effect-2 + .mini-map {
  margin-top: 0;
}

.thunder-shooter-effect-2::before,
.thunder-shooter-effect-2::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.thunder-shooter-effect-2::before {
  background:
    linear-gradient(90deg, rgba(52,235,255,.14), transparent 22%, transparent 78%, rgba(183,255,26,.12)),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(44,240,255,.035) 11px 12px),
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(255,255,255,.028) 5px 6px);
  mix-blend-mode: screen;
  opacity: .86;
}

.thunder-shooter-effect-2::after {
  border-radius: inherit;
  box-shadow:
    inset 0 0 26px rgba(44,232,255,.16),
    inset 0 0 42px rgba(183,255,26,.07),
    inset 0 0 80px rgba(255,78,232,.035);
}

.thunder-shooter-effect-2.is-game-over::before,
.thunder-shooter-effect-2.is-game-over::after {
  display: none;
}

.thunder-shooter-effect-2.is-game-over canvas {
  image-rendering: auto;
}

.thunder-shooter-effect-2 canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: none;
}

.third-person-3d {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 47, 214, .12), transparent 34%),
    radial-gradient(circle at 84% 64%, rgba(255, 154, 61, .06), transparent 30%),
    radial-gradient(circle at 16% 60%, rgba(44, 240, 255, .07), transparent 32%),
    linear-gradient(180deg, #05010f 0%, #12042a 58%, #240741 100%);
  box-shadow: inset 0 0 52px rgba(0, 0, 0, .46), inset 0 0 26px rgba(255, 47, 214, .07);
  opacity: 1;
}

.third-person-3d.hidden {
  display: none;
}

.third-person-3d.is-warping::before,
.third-person-3d.is-warping::after,
.third-person-3d.is-warping .third-person-3d__canvas {
  animation: thirdPersonWarpIn .46s ease-out both;
}

.third-person-3d__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: saturate(1.22) contrast(1.06);
  image-rendering: auto;
  cursor: none;
}

.third-person-3d[data-phase="dead"] .third-person-3d__canvas {
  filter: saturate(.62) contrast(1.12) brightness(.86) hue-rotate(-14deg);
  transition: filter .24s ease-out;
}

.third-person-3d__fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(6, 2, 18, .16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 46%, transparent 52%, rgba(4, 0, 14, .4) 100%);
  mix-blend-mode: normal;
  opacity: .62;
}

.third-person-3d[data-phase="dead"] .third-person-3d__fx {
  background:
    repeating-linear-gradient(180deg, rgba(6, 2, 18, .16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 46%, transparent 40%, rgba(96, 4, 26, .5) 100%);
}

.third-person-3d__pulse {
  position: absolute;
  left: 50%;
  top: 21%;
  z-index: 3;
  min-width: 120px;
  padding: 7px 12px;
  border: 1px solid rgba(126,252,255,.42);
  color: #7efcff;
  background: rgba(5,0,16,.48);
  box-shadow: inset 0 0 18px rgba(44,240,255,.12), 0 0 26px rgba(255,78,232,.18);
  font: 700 15px/1 Consolas, "SFMono-Regular", ui-monospace, monospace;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0 10px rgba(126,252,255,.84), 0 0 20px rgba(255,78,232,.36);
  transform: translateX(-50%);
  pointer-events: none;
}

.third-person-3d__pulse.hidden {
  display: none;
}

.third-person-3d__pulse[data-kind="extend"] {
  border-color: rgba(255,230,109,.52);
  color: #ffe66d;
  box-shadow: inset 0 0 18px rgba(255,230,109,.14), 0 0 28px rgba(255,78,232,.22);
  text-shadow: 0 0 10px rgba(255,230,109,.82), 0 0 22px rgba(255,78,232,.42);
}

.third-person-3d__pulse[data-kind="death"] {
  border-color: rgba(255,112,90,.72);
  color: #ffcf8a;
  box-shadow: inset 0 0 18px rgba(255,112,90,.18), 0 0 30px rgba(255,78,232,.3);
  text-shadow: 0 0 10px rgba(255,112,90,.88), 0 0 22px rgba(255,78,232,.48);
}

.third-person-3d__pulse.is-pulsing {
  animation: thirdPersonPulseSignal .72s ease-out both;
}

.third-person-3d__status {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.third-person-3d__chip {
  min-width: 64px;
  padding: 4px 7px;
  border: 1px solid rgba(126,252,255,.28);
  color: #e9fdff;
  background: rgba(5,0,16,.48);
  box-shadow: inset 0 0 14px rgba(44,240,255,.08), 0 0 16px rgba(255,78,232,.12);
  font: 700 10px/1 Consolas, "SFMono-Regular", ui-monospace, monospace;
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(126,252,255,.72);
}

.third-person-3d__chip--depth {
  color: #7efcff;
}

.third-person-3d[data-depth-state="forward"] .third-person-3d__chip--depth {
  border-color: rgba(126,252,255,.56);
  box-shadow: inset 0 0 18px rgba(44,240,255,.18), 0 0 24px rgba(44,240,255,.28);
  animation: thirdPersonDepthPulse .38s ease-out both;
}

.third-person-3d[data-depth-state="reverse"] .third-person-3d__chip--depth {
  border-color: rgba(255,78,232,.56);
  color: #ff9bf1;
  box-shadow: inset 0 0 18px rgba(255,78,232,.14), 0 0 24px rgba(255,78,232,.26);
  animation: thirdPersonDepthPulse .38s ease-out both;
}

.third-person-3d__chip--extend {
  color: #ffe66d;
  text-align: right;
}

.third-person-3d[data-phase="ending"] .third-person-3d__chip--extend,
.third-person-3d[data-phase="ending"]::before {
  animation: thirdPersonEndingPulse .62s ease-in-out infinite alternate;
}

.third-person-3d::before,
.third-person-3d::after {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  color: #e9fdff;
  font: 700 10px/1 Consolas, "SFMono-Regular", ui-monospace, monospace;
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(126, 252, 255, .72), 0 0 14px rgba(255, 78, 232, .32);
}

.third-person-3d::before {
  content: "3D MODE " attr(data-timer);
  left: 8px;
  top: 8px;
  color: #7efcff;
}

.third-person-3d::after {
  content: attr(data-scene);
  right: 36px;
  top: 8px;
  color: #ff4ee8;
}

.thunder-shooter-effect-2.is-third-person-3d > canvas {
  opacity: .08;
}

@keyframes thirdPersonWarpIn {
  0% {
    filter: brightness(2.5) saturate(1.7);
    opacity: .38;
    transform: scale(1.06);
  }

  44% {
    filter: brightness(1.55) saturate(1.35);
    opacity: 1;
    transform: scale(.995);
  }

  100% {
    filter: brightness(1) saturate(1);
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes thirdPersonEndingPulse {
  from {
    opacity: .72;
    text-shadow: 0 0 8px rgba(255,230,109,.55);
  }

  to {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255,230,109,.92), 0 0 22px rgba(255,78,232,.42);
  }
}

@keyframes thirdPersonPulseSignal {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(.82);
    filter: brightness(2.2) saturate(1.6);
  }

  24% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.18);
    filter: brightness(1.08) saturate(1.1);
  }
}

@keyframes thirdPersonDepthPulse {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1.04);
  }

  100% {
    opacity: .92;
    transform: translateY(0) scale(1);
  }
}

.thunder-shooter-effect-2.is-game-over,
.thunder-shooter-effect-2.is-game-over canvas {
  cursor: pointer;
}

.thunder-audio-button {
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 8;
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(183,255,26,.34);
  border-radius: 999px;
  color: #b7ff1a;
  background: rgba(7,8,23,.46);
  box-shadow: 0 0 14px rgba(183,255,26,.16), inset 0 0 12px rgba(44,240,255,.08);
  cursor: pointer;
  opacity: .88;
  transition: opacity .1s linear, border-color .1s linear, background .1s linear, box-shadow .1s linear;
}

.thunder-audio-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 15px;
  background: currentColor;
  transform: translate(-50%, -50%);
  -webkit-mask: url("./assets/thunder-speaker.svg") center / contain no-repeat;
  mask: url("./assets/thunder-speaker.svg") center / contain no-repeat;
  opacity: .98;
}

.thunder-audio-button::after {
  content: "";
  display: none;
}

.thunder-audio-button:hover,
.thunder-audio-button[aria-expanded="true"] {
  opacity: 1;
  border-color: rgba(183,255,26,.78);
  background: rgba(183,255,26,.1);
  box-shadow: 0 0 20px rgba(183,255,26,.26), inset 0 0 12px rgba(44,240,255,.12);
}

.thunder-audio-button[data-enabled="0"] {
  color: rgba(224,222,244,.62);
  border-color: rgba(224,222,244,.34);
  background: rgba(7,8,23,.64);
}

.thunder-audio-button[data-enabled="0"]::after {
  display: none;
}

.thunder-audio-panel {
  position: absolute;
  top: 34px;
  right: 4px;
  z-index: 9;
  width: min(132px, calc(100% - 8px));
  padding: 7px;
  border: 1px solid rgba(183,255,26,.34);
  border-radius: 8px;
  color: #e0def4;
  background: rgba(14,13,30,.92);
  box-shadow: 0 10px 22px rgba(0,0,0,.28), inset 0 0 18px rgba(44,240,255,.06);
  cursor: auto;
}

.thunder-audio-panel.hidden {
  display: none;
}

.thunder-audio-title {
  margin-bottom: 5px;
  color: #2cf0ff;
  font: 700 10px/1.1 system-ui, sans-serif;
  letter-spacing: 0;
}

.thunder-audio-toggle {
  width: 100%;
  height: 22px;
  margin-bottom: 6px;
  border: 1px solid rgba(183,255,26,.38);
  border-radius: 6px;
  color: #b7ff1a;
  background: rgba(183,255,26,.11);
  font: 700 10px/1 system-ui, sans-serif;
  cursor: pointer;
}

.thunder-audio-row {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr);
  align-items: center;
  gap: 5px;
  min-height: 21px;
  font: 9px/1 system-ui, sans-serif;
}

.thunder-audio-row input {
  width: 100%;
  accent-color: #b7ff1a;
}

.thunder-shooter-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 8px;
  cursor: ew-resize;
  background: linear-gradient(90deg, transparent, rgba(183,255,26,.16));
  opacity: 0;
  transition: opacity .12s linear;
}

.thunder-shooter-effect-2:hover .thunder-shooter-resize-handle,
.thunder-shooter-resize-handle.is-dragging {
  opacity: 1;
}

.thunder-rail-resize-handle {
  position: absolute;
  top: 0;
  right: -6px;
  bottom: 0;
  z-index: 40;
  width: 12px;
  cursor: ew-resize;
  touch-action: none;
  background: linear-gradient(90deg, transparent 0 34%, rgba(183,255,26,.22) 48%, transparent 66% 100%);
  opacity: 0;
  transition: opacity .12s linear;
}

.left-rail:hover .thunder-rail-resize-handle,
.thunder-rail-resize-handle:hover,
.thunder-rail-resize-handle.is-dragging {
  opacity: 1;
}

@media (max-height: 760px) {
  .thunder-shooter-effect-2 {
    min-height: 150px;
  }
}
