.andunny-score-ready #hudOverlay {
  display: none;
}

.andunny-score-engine,
.andunny-score-engine * {
  box-sizing: border-box;
}

.andunny-score-hud {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 90;
  display: grid;
  gap: 4px;
  width: min(286px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid #000000;
  background: rgba(255, 255, 255, 0.94);
  color: #000000;
  font-family: "Pixelify Sans", "Courier New", monospace;
  line-height: 1;
  pointer-events: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.18);
}

.andunny-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.andunny-score-main {
  align-items: baseline;
}

.andunny-score-label,
.andunny-score-multiplier,
.andunny-score-level,
.andunny-score-weather,
.andunny-score-log {
  overflow: hidden;
  text-overflow: ellipsis;
}

.andunny-score-label {
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: 0;
}

.andunny-score-value {
  min-width: 0;
  overflow: hidden;
  color: #1e5bff;
  font-size: 28px;
  text-align: right;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.andunny-score-multiplier {
  flex: 0 0 auto;
  padding: 3px 5px;
  background: #000000;
  color: #39ff14;
  font-size: 13px;
}

.andunny-score-level {
  min-width: 0;
  font-size: 12px;
  text-align: right;
}

.andunny-score-weather {
  width: 100%;
  font-size: 13px;
  text-align: right;
}

.andunny-score-log {
  min-height: 15px;
  color: #555555;
  font-size: 12px;
  white-space: nowrap;
}

.andunny-brick-meter {
  display: none;
  height: 4px;
  overflow: hidden;
  border: 1px solid #000000;
  background: rgba(0, 0, 0, 0.16);
}

.andunny-brick-meter span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #ff3df2, #fff200, #39ff14, #00d9ff, #ff3df2);
  box-shadow: 0 0 8px #fff200, 0 0 14px #00d9ff;
  animation: andunnyBrickMeter var(--brick-mode-duration, 12000ms) linear forwards;
}

body.andunny-brick-mode .andunny-brick-meter {
  display: block;
}

.andunny-score-layer,
.andunny-score-grid,
.andunny-score-noise {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.andunny-score-grid,
.andunny-score-noise {
  z-index: 1;
}

.andunny-score-grid {
  opacity: 0;
  background-image:
    linear-gradient(rgba(30, 91, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 20, 0.11) 1px, transparent 1px);
  background-size: 36px 36px;
  transition: opacity 220ms ease;
}

.andunny-score-noise {
  opacity: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(30, 91, 255, 0.06) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
  transition: opacity 220ms ease;
}

.andunny-collectible,
.andunny-logo-fragment {
  position: fixed;
  z-index: 80;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #000000;
  border-radius: 0;
  padding: 0;
  background: #ffffff;
  color: #000000;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.28);
  animation: andunnyCollectibleDrift var(--collectible-life, 8000ms) linear forwards;
  transition: opacity 180ms ease;
}

.andunny-collectible:focus-visible,
.andunny-logo-fragment:focus-visible {
  outline: 2px solid #39ff14;
  outline-offset: 2px;
}

.andunny-hidden-collectible {
  opacity: 0.62;
  transform: translateX(-18px);
}

.andunny-collectible-bolt {
  border-color: #1e5bff;
  color: #1e5bff;
  animation:
    andunnyCollectibleDrift var(--collectible-life, 8000ms) linear forwards,
    andunnyFastFlicker 620ms steps(2, end) infinite;
}

.andunny-collectible-rare {
  border-color: #ff3df2;
  color: #ff3df2;
}

.andunny-folder-icon {
  position: relative;
  display: block;
  width: 28px;
  height: 21px;
  border: 2px solid #000000;
  background: #f7d35c;
  box-shadow: inset -3px -3px 0 #d09b18, inset 3px 3px 0 #fff3a4;
}

.andunny-folder-icon::before {
  content: "";
  position: absolute;
  left: -2px;
  top: -8px;
  width: 14px;
  height: 8px;
  border: 2px solid #000000;
  border-bottom: 0;
  background: #f7d35c;
}

.andunny-folder-icon span {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 4px;
  height: 2px;
  background: rgba(0, 0, 0, 0.28);
}

.andunny-logo-fragment {
  color: var(--fragment-color, #39ff14);
  text-shadow: 1px 0 #ff3df2, -1px 0 #00d9ff;
  animation: andunnyLogoFragmentDrift 5600ms ease-out forwards;
}

.andunny-logo-fragment img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(1px 0 var(--fragment-color, #39ff14));
}

.andunny-pixel-burst,
.andunny-shockwave,
.andunny-screen-flash,
.andunny-glitch-echo,
.andunny-directory-popup {
  position: fixed;
  z-index: 85;
  pointer-events: none;
}

.andunny-pixel-burst i {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pixel-size, 6px);
  height: var(--pixel-size, 6px);
  display: block;
  background: var(--pc, #39ff14);
  animation: andunnyPixelBurst 720ms ease-out forwards;
}

.andunny-pixel-burst-large i {
  animation-duration: 980ms;
  box-shadow: 0 0 7px var(--pc, #39ff14);
}

.andunny-shockwave {
  width: 12px;
  height: 12px;
  border: 1px solid #1e5bff;
  transform: translate(-50%, -50%);
  animation: andunnyShockwave 620ms ease-out forwards;
}

.andunny-screen-flash {
  inset: 0;
  background: rgba(57, 255, 20, 0.18);
  animation: andunnyFlash 320ms ease-out forwards;
}

.andunny-glitch-echo {
  top: auto;
  right: 18px;
  bottom: 92px;
  padding: 5px 7px;
  border: 1px solid #ff3df2;
  background: #000000;
  color: #39ff14;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: 13px;
  box-shadow: -2px 0 0 #00d9ff, 2px 0 0 #ff3df2;
  animation: andunnyEcho 360ms steps(2, end) forwards;
}

.andunny-directory-popup {
  width: 178px;
  padding: 7px;
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.andunny-directory-title {
  margin: -7px -7px 6px;
  padding: 4px 6px;
  background: #1e5bff;
  color: #ffffff;
}

.andunny-fade-out {
  opacity: 0 !important;
  transform: scale(0.9) !important;
}

.andunny-x2 .linksBlock a,
.andunny-x2 #contentLogo,
.andunny-x2 #modeToggle,
.andunny-x2 .contentBlock {
  filter: drop-shadow(0 0 5px rgba(57, 255, 20, 0.34));
}

.andunny-x2 .andunny-score-hud {
  animation: andunnyScorePulse 1800ms ease-in-out infinite;
}

.andunny-x2 .andunny-score-value {
  color: #19b85f;
}

.andunny-x5 .contentBlock,
.andunny-x5 #modeToggle,
.andunny-x5 .andunny-score-hud {
  animation: andunnyDrift 5200ms ease-in-out infinite;
}

.andunny-x5 .andunny-score-value {
  color: #f0a000;
}

.andunny-x10 .andunny-score-grid {
  opacity: 0.55;
  animation: andunnyGridShift 9200ms linear infinite;
}

.andunny-x10 .andunny-score-noise {
  opacity: 0.18;
}

.andunny-x10 .andunny-score-value {
  color: #ff3df2;
}

.andunny-x50 .andunny-score-hud {
  box-shadow:
    0 0 10px #39ff14,
    0 0 18px #00d9ff,
    0 0 28px #ff3df2,
    4px 4px 0 rgba(255, 61, 242, 0.45),
    -3px 0 0 rgba(0, 217, 255, 0.48);
  animation: andunnyScorePanic 520ms steps(2, end) infinite;
}

.andunny-x50 .andunny-score-value {
  color: #fff200;
  text-shadow: 1px 0 #ff3df2, -1px 0 #00d9ff;
}

.andunny-x100 {
  animation: andunnyLayoutBreathe 2400ms ease-in-out infinite;
}

.andunny-x100 .andunny-score-hud,
.andunny-x100 #leaderboardFooter {
  filter: drop-shadow(1px 0 #ff3df2) drop-shadow(-1px 0 #00d9ff);
}

.andunny-x100 .andunny-score-hud {
  box-shadow:
    0 0 12px #ff3df2,
    0 0 22px #fff200,
    0 0 34px #39ff14,
    0 0 44px #00d9ff;
  animation: andunnyScoreOverclock 360ms steps(2, end) infinite;
}

.andunny-x100 .andunny-score-value {
  color: #ffffff;
  text-shadow: 2px 0 #ff3df2, -2px 0 #00d9ff, 0 0 10px #fff200;
}

.andunny-x100 .andunny-score-grid {
  opacity: 0.72;
  animation: andunnyGridShift 3600ms linear infinite;
}

.andunny-x100 .andunny-score-noise {
  opacity: 0.28;
}

.andunny-idle .andunny-score-hud {
  border-style: dashed;
}

.andunny-glitch .andunny-score-hud {
  transform: translate(2px, -1px);
}

.andunny-content-glitch:not(.andunny-content-glitch-done) .contentBlock {
  position: relative;
  outline: 2px solid #39ff14;
  box-shadow: 3px 0 0 #ff3df2, -3px 0 0 #00d9ff;
  animation:
    andunnyContentBoxShake 1450ms steps(1, end) infinite,
    andunnyContentOutlineShift 1800ms steps(3, end) infinite;
}

.andunny-content-glitch:not(.andunny-content-glitch-done) .contentBlock:nth-child(2n) {
  animation-duration: 1720ms, 1800ms;
}

.andunny-content-glitch:not(.andunny-content-glitch-done) .contentBlock:nth-child(3n) {
  animation-duration: 2050ms, 1800ms;
}

.andunny-content-glitch-done .contentBlock,
.andunny-content-glitch-done .linksBlock,
.andunny-content-glitch-done .linksBlock a {
  animation: none !important;
  outline-color: transparent;
  box-shadow: none;
  filter: none;
}

.andunny-screen-shake #bgCanvas,
.andunny-screen-shake #contentLayer,
.andunny-screen-shake .andunny-score-hud,
.andunny-screen-shake #leaderboardFooter {
  animation: andunnyScreenShake 260ms steps(2, end);
}

.andunny-brick-rain {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw;
  height: 100vh;
  z-index: 120;
  overflow: hidden;
  pointer-events: none;
  transform: none !important;
}

body.andunny-brick-mode #leaderboardFooter {
  top: auto !important;
  bottom: 0 !important;
}

body.andunny-brick-mode .andunny-brick-rain {
  pointer-events: auto;
}

.andunny-brick-piece {
  position: absolute;
  top: -40px;
  display: block;
  padding: 0;
  border: 1px solid #000000;
  border-radius: 0;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(0, 0, 0, 0.26) 48% 52%, transparent 52%),
    linear-gradient(#c9462d 0 45%, #8f2d1c 45% 55%, #d85c3d 55%);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.22), 2px 2px 0 rgba(0, 0, 0, 0.2);
  cursor: pointer;
  appearance: none;
  pointer-events: none;
  animation: andunnyBrickFall var(--brick-fall-duration, 4s) linear forwards;
}

body.andunny-brick-mode .andunny-brick-piece {
  pointer-events: auto;
}

.andunny-brick-piece-exit {
  pointer-events: none !important;
  animation: andunnyBrickExit 900ms ease-in forwards !important;
}

.andunny-brick-piece::before,
.andunny-brick-piece::after {
  content: "";
  position: absolute;
  display: block;
}

.andunny-brick-piece-hardhat {
  border-bottom-width: 3px;
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(#fff06a 0 18%, #f3c51b 18% 74%, #b98200 74%);
}

.andunny-brick-piece-hardhat::before {
  left: 44%;
  top: 0;
  width: 12%;
  height: 78%;
  background: rgba(255, 255, 255, 0.42);
}

.andunny-brick-piece-hammer {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.andunny-brick-piece-hammer::before {
  left: 6%;
  top: 6%;
  width: 84%;
  height: 30%;
  border: 1px solid #000000;
  background: #7b8790;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.32);
}

.andunny-brick-piece-hammer::after {
  left: 45%;
  top: 22%;
  width: 18%;
  height: 80%;
  border: 1px solid #000000;
  background: #9a5a25;
}

.andunny-brick-piece-wrench {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.andunny-brick-piece-wrench::before {
  left: 44%;
  top: 4%;
  width: 18%;
  height: 92%;
  border: 1px solid #000000;
  background: #b8c3c8;
  transform: rotate(35deg);
}

.andunny-brick-piece-wrench::after {
  left: 12%;
  top: 2%;
  width: 42%;
  height: 42%;
  border: 2px solid #000000;
  border-right-color: transparent;
  border-radius: 50%;
  background: transparent;
  transform: rotate(35deg);
}

.andunny-brick-piece-barricade {
  background:
    repeating-linear-gradient(135deg, #f47c20 0 7px, #fff7df 7px 13px),
    #f47c20;
}

.andunny-brick-piece-barricade::before,
.andunny-brick-piece-barricade::after {
  bottom: -42%;
  width: 18%;
  height: 48%;
  border: 1px solid #000000;
  background: #5b3a25;
}

.andunny-brick-piece-barricade::before {
  left: 18%;
}

.andunny-brick-piece-barricade::after {
  right: 18%;
}

.andunny-brick-piece-boot {
  border: 1px solid #000000;
  border-radius: 2px 2px 7px 2px;
  background: linear-gradient(#3a2a1e 0 58%, #f1a32d 58%);
}

.andunny-brick-piece-boot::before {
  right: -38%;
  bottom: -1px;
  width: 48%;
  height: 42%;
  border: 1px solid #000000;
  background: #f1a32d;
}

.andunny-brick-callout {
  position: fixed;
  right: 14px;
  bottom: 42px;
  z-index: 96;
  padding: 10px 12px;
  border: 2px solid #000000;
  background: #fff200;
  color: #000000;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
  box-shadow: 4px 4px 0 #ff3df2, -3px -3px 0 #00d9ff;
  animation: andunnyBrickCallout 520ms steps(2, end) infinite;
}

body.andunny-dark .andunny-score-hud,
body.andunny-dark .andunny-collectible,
body.andunny-dark .andunny-directory-popup {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.92);
  color: #ffffff;
}

body.andunny-dark .andunny-folder-icon,
body.andunny-dark .andunny-folder-icon::before {
  border-color: #ffffff;
}

@media (max-width: 700px) {
  .andunny-score-hud {
    top: 10px;
    right: 10px;
    bottom: auto;
    left: auto;
    width: min(286px, 75vw);
    padding: 7px;
  }

  .andunny-score-value {
    font-size: 24px;
  }

  .andunny-score-level,
  .andunny-score-weather,
  .andunny-score-log {
    font-size: 11px;
  }

  .andunny-glitch-echo {
    top: auto;
    right: 12px;
    bottom: 170px;
  }

  .andunny-brick-callout {
    top: 80px;
    right: 10px;
    bottom: auto;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .andunny-score-grid,
  .andunny-score-noise,
  .andunny-score-hud,
  .contentBlock,
  .andunny-collectible,
  .andunny-logo-fragment,
  .andunny-x5 .contentBlock,
  .andunny-x50 .contentBlock,
  .andunny-x100 {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}

@keyframes andunnyScorePulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

@keyframes andunnyDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(2px, -3px, 0);
  }
}

@keyframes andunnyGridShift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 72px 36px;
  }
}

@keyframes andunnyUnstable {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(3px, -2px);
  }
}

@keyframes andunnyScorePanic {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(3px, -2px) rotate(-0.4deg);
  }
  50% {
    transform: translate(-2px, 2px) rotate(0.35deg);
  }
  75% {
    transform: translate(4px, 1px) rotate(-0.25deg);
  }
}

@keyframes andunnyScoreOverclock {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(-4px, 2px) scale(1.01);
  }
  50% {
    transform: translate(3px, -3px) scale(0.995);
  }
  75% {
    transform: translate(4px, 3px) scale(1.006);
  }
}

@keyframes andunnyMicroShift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(2px, -1px);
  }
  66% {
    transform: translate(-3px, 2px);
  }
}

@keyframes andunnyContentBoxShake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(8px, -5px);
  }
  40% {
    transform: translate(-7px, 6px);
  }
  60% {
    transform: translate(10px, 3px);
  }
  80% {
    transform: translate(-8px, -4px);
  }
}

@keyframes andunnyContentOutlineShift {
  0% {
    outline-color: #39ff14;
    box-shadow: 3px 0 0 #ff3df2, -3px 0 0 #00d9ff;
  }
  33% {
    outline-color: #fff200;
    box-shadow: 3px 0 0 #39ff14, -3px 0 0 #ff3df2;
  }
  66% {
    outline-color: #00d9ff;
    box-shadow: 3px 0 0 #fff200, -3px 0 0 #39ff14;
  }
  100% {
    outline-color: #39ff14;
    box-shadow: 3px 0 0 #ff3df2, -3px 0 0 #00d9ff;
  }
}

@keyframes andunnyLayoutBreathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.002);
  }
}

@keyframes andunnyPixelBurst {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(var(--px), var(--py)) scale(0.35);
  }
}

@keyframes andunnyShockwave {
  from {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.2);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(12);
  }
}

@keyframes andunnyFlash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes andunnyEcho {
  0% {
    opacity: 0;
    transform: translateX(8px);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-8px);
  }
}

@keyframes andunnyFastFlicker {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(2px, -1px);
  }
}

@keyframes andunnyBrickMeter {
  from {
    transform: scaleX(1);
    filter: hue-rotate(0deg);
  }
  to {
    transform: scaleX(0);
    filter: hue-rotate(260deg);
  }
}

@keyframes andunnyCollectibleDrift {
  0% {
    opacity: 1;
    transform: translate(0, 0);
  }
  8% {
    opacity: 1;
    transform: translate(calc(var(--collectible-drift-x, 24px) * 0.38), calc(var(--collectible-drift-y, -16px) * 0.38));
  }
  18% {
    opacity: 1;
    transform: translate(calc(var(--collectible-drift-x, 24px) * 0.62), calc(var(--collectible-drift-y, -16px) * 0.62));
  }
  62% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--collectible-drift-x, 24px), var(--collectible-drift-y, -16px));
  }
}

@keyframes andunnyScreenShake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(4px, -3px);
  }
  40% {
    transform: translate(-5px, 3px);
  }
  60% {
    transform: translate(3px, 4px);
  }
  80% {
    transform: translate(-3px, -2px);
  }
}

@keyframes andunnyLogoFragmentDrift {
  from {
    transform: translate(-50%, -50%) scale(0.72);
  }
  to {
    transform: translate(calc(-50% + var(--fx, 0px)), calc(-50% + var(--fy, 0px))) scale(1);
  }
}

@keyframes andunnyBrickFall {
  from {
    transform: translateY(-50px) rotate(var(--brick-tilt, 0deg));
  }
  to {
    transform: translateY(var(--brick-land, 80vh)) rotate(calc(var(--brick-tilt, 0deg) * -1));
  }
}

@keyframes andunnyBrickExit {
  from {
    opacity: 1;
    transform: translateY(0) rotate(var(--brick-tilt, 0deg));
  }
  to {
    opacity: 0.92;
    transform: translateY(var(--brick-exit-distance, 110vh)) rotate(calc(var(--brick-tilt, 0deg) * -1));
  }
}

@keyframes andunnyBrickCallout {
  0%,
  100% {
    transform: scale(1) rotate(-2deg);
  }
  50% {
    transform: scale(1.16) rotate(2deg);
  }
}
