.hacker-popup-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}

.hacker-popup {
  position: absolute;
  width: min(320px, calc(100vw - 28px));
  border-radius: 12px;
  border: 1px solid rgba(64, 255, 162, 0.72);
  border-right-color: rgba(255, 102, 170, 0.72);
  border-bottom-color: rgba(255, 102, 170, 0.72);
  background: linear-gradient(145deg, rgba(12, 24, 20, 0.92), rgba(24, 12, 19, 0.9));
  color: #d8ffe9;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 22px rgba(63, 255, 159, 0.28), 0 0 28px rgba(255, 105, 175, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  opacity: 0;
  animation: hacker-popup-in 360ms cubic-bezier(0.22, 0.9, 0.35, 1.1) forwards;
}

.hacker-popup.mobile {
  left: 50%;
  transform-origin: center top;
  animation-name: hacker-popup-mobile-in;
}

.hacker-popup.is-leaving {
  animation: hacker-popup-out 340ms ease forwards;
}

.hacker-popup::before,
.hacker-popup::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hacker-popup::before {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), transparent 35%);
}

.hacker-popup::after {
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 3px, rgba(255, 255, 255, 0.03) 4px, transparent 5px);
  mix-blend-mode: screen;
}

.hacker-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(64, 255, 162, 0.2);
  background: linear-gradient(90deg, rgba(59, 255, 152, 0.15), rgba(255, 106, 173, 0.15));
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

.hacker-popup-title {
  color: #8dffbf;
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
}

.hacker-popup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6ab1;
  box-shadow: 0 0 10px rgba(255, 106, 177, 0.9);
}

.hacker-popup-body {
  padding: 10px 12px 12px;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #ccffe3;
  white-space: pre-line;
  min-height: 52px;
}

.hacker-heart-access {
  position: fixed;
  z-index: 46;
  pointer-events: none;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 255, 154, 0.85);
  color: #8fffcb;
  background: rgba(12, 26, 19, 0.88);
  box-shadow: 0 0 16px rgba(59, 255, 154, 0.42);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  animation: heart-access-pulse 760ms ease forwards;
}

.hacker-super-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(2, 1, 4, 0.88);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  animation: super-overlay-in 420ms ease forwards;
}

.hacker-super-content {
  width: min(720px, calc(100vw - 30px));
  border: 1px solid rgba(255, 89, 137, 0.48);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(17, 8, 13, 0.95), rgba(7, 4, 9, 0.94));
  box-shadow: 0 0 24px rgba(255, 67, 123, 0.24), 0 0 42px rgba(55, 255, 160, 0.14);
  padding: 26px 16px;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

.hacker-super-title {
  margin: 0;
  color: #ff8eb7;
  font-size: clamp(1.15rem, 6.5vw, 2.1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hacker-super-sub {
  margin: 12px 0 0;
  color: #92ffcd;
  opacity: 0;
  font-size: clamp(0.95rem, 4.2vw, 1.2rem);
  transition: opacity 420ms ease;
}

.hacker-super-sub.show {
  opacity: 1;
}

.hacker-super-sub small {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  color: rgba(207, 255, 232, 0.78);
}

@keyframes hacker-popup-in {
  0% {
    opacity: 0;
    transform: scale(0.9);
    filter: saturate(0.85) blur(2px);
  }
  28% {
    opacity: 0.95;
    transform: scale(1.03);
    filter: saturate(1.15) blur(0px);
  }
  42% {
    transform: scale(0.98) translateX(-1.5px);
  }
  58% {
    transform: scale(1.01) translateX(1.2px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1) blur(0px);
  }
}

@keyframes hacker-popup-mobile-in {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.92);
  }
  45% {
    opacity: 1;
    transform: translateX(-50%) translateY(2px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0px) scale(1);
  }
}

@keyframes hacker-popup-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    filter: blur(1px);
  }
}

@keyframes heart-access-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
  }
  28% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes super-overlay-in {
  to {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .hacker-popup {
    max-width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hacker-popup,
  .hacker-popup.mobile,
  .hacker-popup.is-leaving,
  .hacker-heart-access,
  .hacker-super-overlay {
    animation-duration: 0.01ms !important;
  }

  .hacker-super-sub {
    transition-duration: 0.01ms !important;
  }
}
