.tecza-fala {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2400;
  width: 220vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.95;
  transform: translate3d(-220vw, 0, 0);
  will-change: transform;
  background: linear-gradient(100deg, rgba(255, 0, 76, 0) 0%, #ff004c 16%, #ff8a00 27%, #ffe600 38%, #2bff88 49%, #00c3ff 60%, #7a5cff 71%, #ff3df2 82%, rgba(255, 61, 242, 0) 100%);
}
.tecza-swiatla {
  position: fixed;
  inset: 0;
  z-index: 2300;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.tecza-swiatla.gasnie { opacity: 0; }
.tecza-plama {
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  width: 78vmin;
  height: 78vmin;
  margin: -39vmin 0 0 -39vmin;
  will-change: transform;
  animation: tecza-dryf var(--czas, 6s) ease-in-out infinite alternate;
}
.tecza-plama b {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--k, #fff), rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  will-change: opacity;
  animation: tecza-takt var(--takt, 2100ms) steps(1, end) infinite;
}
@keyframes tecza-takt {
  0% { opacity: 0.4; }
  33.33%, 100% { opacity: 0; }
}
@keyframes tecza-dryf {
  from { transform: translate3d(-9vmin, -6vmin, 0) scale(0.9); }
  to { transform: translate3d(9vmin, 7vmin, 0) scale(1.1); }
}
.tecza-snop {
  position: absolute;
  top: -4vh;
  width: 28vmax;
  height: 112vh;
  margin-left: -14vmax;
  transform-origin: 50% 0;
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  background: linear-gradient(to bottom, var(--kolor, #fff), rgba(255, 255, 255, 0) 92%);
  opacity: 0.24;
  will-change: transform;
  animation: tecza-snop var(--czas, 3.6s) ease-in-out var(--zwloka, 0s) infinite alternate;
}
@keyframes tecza-snop {
  from { transform: rotate(-34deg); }
  to { transform: rotate(34deg); }
}
.tecza-swiatla i {
  position: absolute;
  width: var(--rozmiar, 12px);
  height: var(--rozmiar, 12px);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0.85) 22%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  will-change: opacity, transform;
  animation: tecza-iskra 1.4s ease-in-out var(--zwloka, 0s) infinite alternate;
}
@keyframes tecza-iskra {
  0% { opacity: 0; transform: scale(0.4); }
  60% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0.2; transform: scale(0.6); }
}

.mroz {
  position: fixed;
  inset: 0;
  z-index: 1002;
  overflow: hidden;
  pointer-events: none;
}
.mroz-odcien {
  position: absolute;
  inset: 0;
  background: rgba(176, 206, 236, 0.16);
  opacity: 0;
  will-change: opacity;
  transition: opacity 1s ease;
}
.mroz canvas,
.mroz-mgielka,
.mroz-ziarno { position: absolute; inset: 0; width: 100%; height: 100%; }
.mroz-mgielka,
.mroz-ziarno { opacity: 0; will-change: opacity, transform; transition: opacity 1.3s ease; }
.mroz-krysztaly { will-change: opacity, transform; }
.mroz.jest .mroz-odcien,
.mroz.jest .mroz-mgielka,
.mroz.jest .mroz-ziarno { opacity: 1; }
.mroz.odwilz .mroz-odcien { opacity: 0; transition-duration: 1.7s; }
.mroz.odwilz .mroz-mgielka,
.mroz.odwilz .mroz-ziarno,
.mroz.odwilz .mroz-krysztaly {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.7s ease, transform 1.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.mroz-snieg { position: absolute; inset: 0; transition: opacity 1.2s ease; }
.mroz.odwilz .mroz-snieg { opacity: 0; }
.mroz-platek {
  position: absolute;
  top: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0.7) 40%, rgba(255, 255, 255, 0) 72%);
  will-change: transform;
}
.mroz-platek.krysztal { border-radius: 0; background: none; }
.mroz-platek svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(245, 250, 255, 0.92);
  stroke-width: 1.3;
  stroke-linecap: round;
}
.mroz-kropla { position: absolute; width: 0; height: 0; }
.mroz-kropla b { position: absolute; top: 0; left: 0; display: block; width: 9px; }
.mroz-kropla svg { display: block; width: 100%; height: auto; overflow: visible; }
.mroz-kropla path { fill: rgba(205, 232, 255, 0.8); }
.mroz-kropla ellipse { fill: rgba(255, 255, 255, 0.85); }
.mroz-slad {
  position: absolute;
  top: 4px;
  left: -1px;
  width: 2px;
  height: 1px;
  border-radius: 1px;
  transform-origin: 50% 0;
  background: rgba(210, 236, 255, 0.35);
}

.bsod {
  position: fixed;
  inset: 0;
  z-index: 3000;
  color: #fff;
  cursor: default;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: radial-gradient(ellipse at 28% 18%, #1f5cd2, #0e3c98 58%, #0a2e78);
  transform-origin: 50% 50%;
}
.bsod-tresc {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}
.bsod-kolumna { width: min(780px, 86vw); margin-left: max(7vw, 22px); }
.bsod-buzka { margin: 0 0 0.3em; font-size: clamp(84px, 13vw, 168px); font-weight: 300; line-height: 1; }
.bsod-tekst { max-width: 34em; margin: 0 0 1.1em; font-size: clamp(1.08rem, 2.4vw, 1.7rem); font-weight: 300; line-height: 1.42; }
.bsod-postep { margin: 0 0 2.2em; font-size: clamp(1.02rem, 2.1vw, 1.55rem); font-weight: 300; font-variant-numeric: tabular-nums; }
.bsod-stopka { display: flex; align-items: flex-start; gap: 1.2rem; font-size: 0.82rem; line-height: 1.5; opacity: 0.92; }
.bsod-stopka p { margin: 0 0 0.5em; }
.bsod-piksele { flex: none; width: 92px; height: auto; }
.bsod-piksele rect { fill: #0e3c98; }
.bsod-piksele .tlo { fill: #fff; }
.bsod-zaklocenie,
.bsod-wylacz { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.bsod-zaklocenie {
  background: repeating-linear-gradient(to bottom, rgba(255, 0, 90, 0.5) 0 7px, transparent 7px 19px, rgba(0, 240, 255, 0.45) 19px 24px, transparent 24px 41px);
}
.bsod-wylacz { background: #f4f8ff; }

.bomba {
  position: fixed;
  inset: 0;
  z-index: 2600;
  overflow: hidden;
  pointer-events: none;
}
.bomba-lotnik {
  position: absolute;
  height: auto;
  will-change: transform;
}
.bomba-wybuch { position: absolute; }
.bomba-wybuch { will-change: transform; }
.bomba-wybuch img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; will-change: opacity; }
.bomba-blysk {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 240, 245, 0.9), rgba(255, 77, 109, 0.35) 30%, rgba(255, 77, 109, 0) 60%);
}
.bomba-odlamek { position: absolute; display: block; border-radius: 2px 6px 3px 7px; will-change: transform, opacity; }
.bomba-odlamek.cukierek { height: auto; border-radius: 0; }
.bomba-statyczny { position: absolute; height: auto; transform: translate(-50%, -50%); }

.efekt-dymek {
  position: fixed;
  left: 50%;
  z-index: 3100;
  max-width: calc(100vw - 32px);
  padding: 0.75rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(13, 16, 33, 0.94);
  color: #fff;
  font-size: 0.9rem;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translate3d(-50%, 16px, 0);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.efekt-dymek.jest { opacity: 1; transform: translate3d(-50%, 0, 0); }

@media (prefers-reduced-motion: reduce) {
  .efekt-dymek,
  .efekt-dymek.jest { transform: translate3d(-50%, 0, 0); }
  .tecza-snop,
  .tecza-plama,
  .tecza-plama b,
  .tecza-swiatla i { animation: none; }
  .mroz.odwilz .mroz-mgielka,
  .mroz.odwilz .mroz-ziarno,
  .mroz.odwilz .mroz-krysztaly { transform: none; }
}
