.modal_wrap {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  z-index: 10000;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.modal_wrap.open {
  display: block;
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.65);
  transition: opacity 0.4s ease;
}
.modal_container {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1280px;
  max-height: 90vh;
  background-color: #000;
  z-index: 10001;
  padding: 40px;
  border-radius: 10px;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.4s ease;
  
}


.modal_wrap.open .modal_container {
  transition: opacity 0.4s ease;

  opacity: 1;
}

.modal_info {
  overflow-y: auto;
  max-height: calc(90vh - 80px);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.modal_header {
  width: 40%;
  margin-bottom: 0;
}

.modal_contents {
  width: 60%;
  margin-bottom: 0;
  align-items: center;
  justify-content: flex-start;
  display: flex;
  flex-direction: column;
}

.modal_contents p {
  width: 100%;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  margin: 0;
}

.modal_contents p:first-child{
}

.modal_contents p:last-child{
  border-bottom: none;
}


.modal_contents div{
  padding:18px 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  width: 100%;
}

.modal_contents div:last-child{
  border-bottom: none;
  color: #000;
}

.modal_contents div:last-child span{
  border-bottom: none;
  color: transparent;
}

.modal_contents div span{
  font-weight: 600;
  font-size: 1rem;
  color:#ff3e00;
  width: 180px;
}

.modal_category {
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #fff;
}

.modal_title {
  font-size: 24px;
  margin-bottom: 20px;
  line-height: 1.4;
  color: #fff;
}


.modal_slide {
  position: relative;
  width: 100%;
}

.modal_slide_img {
  position: relative;
  width: 100%;
  height: 100%;

  aspect-ratio: 16/9;
  position: relative;
  margin-bottom: 10px;
  background-color: #000;
  overflow: hidden;
  /* 텍스트 선택 방지 */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: zoom-in;
  transition: cursor 0.2s ease;
}

.modal_slide_img.zoomed {
  overflow: auto;
  cursor: zoom-out;
  padding-top: 0;
}

.modal_slide_img.zoomed img,
.modal_slide_img.zoomed video {
  transform-origin: center top;
  transition: transform 0.3s ease;
}

/* 확대 시 CSS 워터마크 숨김 (JavaScript로 동적 워터마크 사용) */
.modal_slide_img.zoomed::after {
  display: none;
}

.modal_slide_img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/static/assets/images/common/watermark.svg');
  background-repeat: repeat;
  background-size: 60px 60px;
  opacity: 0.08;
  pointer-events: none;
  mix-blend-mode: overlay;
  /* transform: rotate(-30deg); */
}


@media (max-width: 768px) {
  .modal_slide_img::after {
    background-size: 48px 48px;
  }
}

.modal_slide_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 드래그 방지 */
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal_slide_img img.loaded {
  opacity: 1;
}

.modal_slide_thumb {
  width: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 5px;
  scrollbar-width: thin;
}

.modal_slide_thumb .swiper-slide {
    width: 120px;
    height: 67.5px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modal_slide_thumb .swiper-slide.active {
    border: 2px solid #ff3e00;
    border-radius: 5px;
}

.modal_slide_thumb .swiper-slide:hover {
    opacity: 0.8;
}

.modal_slide_thumb .swiper-slide img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 5px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    background-color: #000;
    display: block;
}

.modal_slide_thumb .swiper-slide.active img {
    opacity: 1;
}

.modal_close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 10002;
}

.modal_close::before,
.modal_close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transition: transform 0.3s ease;
}

.modal_close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal_close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal_close:hover::before,
.modal_close:hover::after {
  background-color: #ff3e00;
}

.modal_prev,
.modal_next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10002;
  transition: opacity 0.3s ease;
}

.modal_prev {
  left: calc((100% - 1280px) / 2 - 80px);
}

.modal_next {
  right: calc((100% - 1280px) / 2 - 80px);
}

.modal_prev span,
.modal_next span {
  display: block;
  width: 20px;
  height: 20px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transition: border-color 0.3s ease;
}

.modal_prev span {
  transform: rotate(-135deg);
  margin-left: 5px;
}

.modal_next span {
  transform: rotate(45deg);
  margin-right: 5px;
}

.modal_prev:hover span,
.modal_next:hover span {
  border-color: #ff3e00;


}
/* 모달 알림 애니메이션 */
.modal_alert {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 30px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10002;
}

.modal_alert.show {
  opacity: 1;
}

.modal_alert p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: white;
  white-space: nowrap;
}

.modal_prev.disabled,
.modal_next.disabled {
    opacity: 0.2;
    cursor: not-allowed;
}


.modal_prev.disabled:hover span,
.modal_next.disabled:hover span {
    border-color: #fff;
}



.modal_slide_img img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal_slide_img img.loaded {
    opacity: 1;
}

.modal_slide_thumb .swiper-slide {
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal_slide_thumb .swiper-slide:hover {
    transform: scale(1.05);
}

.index_img {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.index_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none !important;
    user-drag: none !important;
    -webkit-touch-callout: none !important;
    pointer-events: auto !important; /* pointer-events를 auto로 변경 */
}

/* 모바일에서도 동작하도록 추가 */
.index_img * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 추가: 이미지 선택 방지를 위한 전역 스타일 */
img {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    user-drag: none !important;
    -webkit-touch-callout: none !important;
}