/* 비디오 팝업 */
#popup_game {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

#popup_game.video_on {
  opacity: 1;
  pointer-events: all;
  display: flex;
}

.dimmed {
  background: rgba(255, 255, 255, 0.9);
  position: absolute;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

#popup_game .popup {
  width: 1920px;
  height: 1080px;
  max-width: 92%;
  max-height: 95svh;
  display: flex;
  align-items: center;
  position: relative;
  opacity: 1;
}

.video_box {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.video_box > p {
  position: absolute;
  bottom: -100px;
}

.video_box {
  position: relative;
  width: 100%;
  height: 100%;
  border: 15px solid #000;
  background: #000;
  margin: 0 auto;
}

.video_box iframe {
  width: 100%;
  height: 100%;
}

#popup_game .close_btn {
  box-sizing: border-box;
  background: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url(../images/icon/p_close_btn.svg);
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: center;
  width: 50px;
  height: 50px;
  transition: 0.2s ease;
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
  top: 15px;
  right: 15px;
}

@media (min-width: 769px) {
  #popup_game .close_btn:hover {
    scale: 1.1;
  }
}

@media (max-width: 900px) {
  #popup_game .close_btn {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 768px) {
  #popup_game .close_btn {
    width: 35px;
    height: 35px;
  }
}

/* 창 너비가 작아질 때 자동으로 스케일 축소 */

@media (max-width: 768px) {
  #popup_game .popup {
    width: 1920px;
    aspect-ratio: 684/835;
    max-width: unset;
    transform: scale(0.9);
  }
}
@media (max-width: 650px) {
  #popup_game .popup {
    transform: scale(0.8);
  }
}
@media (max-width: 550px) {
  #popup_game .popup {
    transform: scale(0.68);
  }
}
@media (max-width: 450px) {
  #popup_game .popup {
    transform: scale(0.58);
  }
}
@media (max-width: 400px) {
  #popup_game .popup {
    transform: scale(0.67);
  }
}
