.pixel-transition {
  position: relative;
  overflow: hidden;
  width: 100%;
  cursor: pointer;
  outline: none;
  border-radius: 4px;
}

/* the default/active layers are position:absolute (so they can overlap),
   which means they don't contribute height to the container — this spacer
   reserves the box's height via the classic padding-top aspect-ratio trick */
.pixel-transition__spacer {
  width: 100%;
  padding-top: 100%; /* square by default; override inline per-instance if needed */
}

.pixel-transition__default,
.pixel-transition__active {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pixel-transition__default img,
.pixel-transition__active img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pixel-transition__active {
  display: none;
}

/* the "second content" shown once the pixels finish covering the image */
.pixel-transition__active-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--surface, #141922);
  border: 1px solid var(--accent, #00E5A0);
}

.pixel-transition__active-emoji {
  font-size: 2.4rem;
  line-height: 1;
}

.pixel-transition__active-content p {
  font-family: var(--font-mono, monospace);
  font-size: 0.95rem;
  color: var(--text-heading, #F5F7FA);
  text-align: center;
  margin: 0;
  padding: 0 1rem;
}

.pixel-transition__pixels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.pixel-transition__pixel {
  position: absolute;
}