@keyframes modal-video {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-video-inner {
  from {
    transform: translate(0, 100px);
  }
  to {
    transform: translate(0, 0);
  }
}

.modal-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 1000000;
  cursor: pointer;
  opacity: 1;
  animation-timing-function: ease-out;
  animation-duration: 0.3s;
  animation-name: modal-video;
  -webkit-transition: opacity 0.3s ease-out;
  -moz-transition: opacity 0.3s ease-out;
  -ms-transition: opacity 0.3s ease-out;
  -o-transition: opacity 0.3s ease-out;
  transition: opacity 0.3s ease-out;
}
@media screen and (max-width: 500px) {
.modal-video {
  background-color: #262626;
}
}

.modal-video-close {
  opacity: 0;
}

.modal-video-body {
  width: auto;
  max-width: 100%; /* 画面幅を超えない */
  height: auto; /* 高さは自動 */
  margin: 0 auto;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.modal-video-inner {
  display: flex;
  justify-content: center; /* 水平方向中央 */
  align-items: center !important; /* 垂直方向中央 */
  margin: 5vh 0 0;
}
@media screen and (max-width: 500px) {
.modal-video-inner {
  margin: 0;
}
}

.modal-video-movie-wrap {
  width: 100%;
  height: 90vh; /* 画面高さの90% */
  aspect-ratio: 9 / 16; /* 縦長固定 */
  max-width: calc(90vh * 9 / 16); /* 高さに応じた幅の上限 */
  display: block;
  overflow: hidden;
}
@media screen and (max-width: 500px) {
.modal-video-movie-wrap {
  width: 90%; /* 親要素幅に応じる */
  height: auto !important; /* 画面高さの90% */
}
}

.modal-video-movie-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.modal-video-close-btn {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 20px;
  display: inline-block;
  width: 35px;
  height: 35px;
  overflow: hidden;
  border: none;
  background: transparent;
  cursor: pointer;
}
@media screen and (max-width: 500px) {
.modal-video-close-btn {
  top: calc(100vw / 500 * 20);
  right: calc(100vw / 500 * 20);
  width: calc(100vw / 500 * 35);
  height: calc(100vw / 500 * 35);
}
}

.modal-video-close-btn:before {
  transform: rotate(45deg);
}

.modal-video-close-btn:after {
  transform: rotate(-45deg);
}

.modal-video-close-btn:before, .modal-video-close-btn:after {
  content: '';
  position: absolute;
  height: 2px;
  width: 100%;
  top: 50%;
  left: 0;
  margin-top: -1px;
  background: #fff;
  border-radius: 5px;
  margin-top: -6px;
}
