.modal-video-layer {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}
.w800{
    max-width: 800px !important;
}
.right-c{
    right: auto !important;
    float: right;
    position: relative !important;
    top: -25px !important;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    border: none;
}

/* iframe 전용 스타일 */
.video-player[id="modalVideoFrame"] {
    border-radius: 8px;
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9; /* 비율 고정 */
}

/* 1000px 이하에서 반응형 조정 */
@media (max-width: 1000px) {
    .modal-video-layer {
        width: 100%;
        max-width: 90vw; /* 뷰포트 너비의 90% */
        max-height: 70vh; /* 뷰포트 높이의 70% */
        aspect-ratio: 16/9;
    }

    .video-container {
        width: 100%;
        height: 100%;
    }

    .video-player[id="modalVideoFrame"] {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
    }
}

/* 768px 이하 (모바일) */
@media (max-width: 768px) {
    .modal-video-layer {
        width: 100%;
        max-width: 95vw;
        max-height: 60vh;
        aspect-ratio: 16/9;
    }
}

/* 480px 이하 (작은 모바일) */
@media (max-width: 480px) {
    .modal-video-layer {
        width: 100%;
        max-width: 98vw;
        max-height: 50vh;
        aspect-ratio: 16/9;
    }
}

/* video 태그 전용 스타일 */
.video-player[id="modalVideo"] {
    object-fit: contain;
}

.video-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls-overlay {
    opacity: 1;
}

.control-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255,255,255,0.3);
}

.control-btn span {
    font-size: 20px;
}

.video-info {
    flex: 1;
    color: white;
}

.video-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.video-duration {
    font-size: 14px;
    opacity: 0.8;
}

/* 로딩 상태 스타일 - 비디오/iframe이 로드되면 자동으로 숨김 */
.video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

/* 로드 완료 시 스피너 숨김 */
.video-container.loaded::before {
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .video-controls-overlay {
        padding: 15px;
        gap: 10px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }

    .control-btn span {
        font-size: 16px;
    }

    .video-title {
        font-size: 14px;
    }

    .video-duration {
        font-size: 12px;
    }
}