* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  cursor: none;
}

#stage {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  overflow: hidden;
}

/* Два слоя для плавного перехода (crossfade) */
.layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 0;
  transition: opacity var(--fade, 0.8s) ease-in-out;
}

.layer.visible { opacity: 1; }

.layer img,
.layer video {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* по умолчанию вписываем без обрезки */
}

.layer.fit-cover img,
.layer.fit-cover video {
  object-fit: cover;     /* заполнить весь экран (с обрезкой) */
}

#message {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre-line;
  text-align: center;
  padding: 4vw;
  color: #9aa0a6;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2.2vw;
  line-height: 1.5;
}
