.ysas-video-wrapper {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.ysas-video-wrapper.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

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

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

.ysay-video-mask {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.ysas-video-wrapper.fade-out .ysay-video-mask {
  animation: fadeOut 0.3s ease forwards;
}

.ysas-video-container {
  position: relative;
  width: 50%;
  max-width: 50%;
  z-index: 101;
  opacity: 0;
  transform: scale(0.9);
  animation: fadeInScale 0.3s ease forwards;
}

.ysas-video-wrapper.fade-out .ysas-video-container {
  animation: fadeOutScale 0.3s ease forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOutScale {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.ysas-video {
  width: 100%;
  height: auto;
  display: block;
  background-color: #000;
}

.ysas-video-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2rem;
  height: 2rem;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  z-index: 102;
}

.ysas-video-close:hover {
  background-color: rgba(255, 255, 255, 1);
}
