/* 모바일 동영상 표시 문제 해결 CSS */

/* 모바일 기본 설정 */
@media screen and (max-width: 768px) {
    /* 동영상 컨테이너 모바일 최적화 */
    .aspect-video {
        position: relative;
        width: 100% !important;
        height: 0 !important;
        padding-bottom: 56.25% !important; /* 16:9 비율 */
        overflow: hidden !important;
        border-radius: 12px !important;
        background-color: #f3f4f6 !important;
    }
    
    /* iframe 모바일 최적화 */
    .aspect-video iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        border-radius: 12px !important;
    }
    
    /* 동영상 섹션 전체 모바일 최적화 */
    .video-section {
        padding: 2rem 1rem !important;
    }
    
    /* 동영상 컨테이너 부모 요소 */
    .video-wrapper {
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 1rem !important;
    }
    
    /* 동영상 설명 텍스트 모바일 최적화 */
    .video-description {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        margin-top: 1rem !important;
        text-align: center !important;
    }
    
    /* 동영상 태그들 모바일 최적화 */
    .video-tags {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
    
    .video-tags .flex {
        justify-content: center !important;
    }
}

/* 태블릿 최적화 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .aspect-video {
        max-width: 90% !important;
        margin: 0 auto !important;
    }
}

/* 동영상 로딩 상태 표시 */
.aspect-video::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.aspect-video iframe {
    z-index: 2;
}

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

/* iframe 로드 완료 시 로딩 애니메이션 숨기기 */
.aspect-video.loaded::before {
    display: none;
}

/* 동영상 재생 버튼 스타일 개선 */
.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.video-play-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

