/**
 * Hero Video Support CSS
 * Hero 슬라이드에서 영상 지원을 위한 스타일
 */

.video-slide-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 1;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 2;
}

/* 텍스트 오버레이가 영상 위에 표시되도록 */
.video-slide-container + .slatbx {
    z-index: 3;
    position: relative;
}

/* 영상 슬라이드의 텍스트 가독성 향상 */
li[data-media-type="video"] .slatbx {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

li[data-media-type="video"] .slatbx .inlinebx {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

li[data-media-type="video"] .slatbx .txt,
li[data-media-type="video"] .slatbx .b_txt,
li[data-media-type="video"] .slatbx .sub_txt {
    color: #ffffff;
}

li[data-media-type="video"] .line_bar {
    opacity: 0.9;
}

/* 영상 재생 제어 */
.hero-video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 4;
    min-width: 200px;
}

.video-control-basic {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.video-control-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.video-control-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.video-control-btn:active {
    transform: scale(0.95);
}

.video-control-btn.active {
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

/* 시간 조절 패널 */
.video-time-panel {
    background: rgba(0,0,0,0.85);
    border-radius: 12px;
    padding: 15px;
    color: white;
    font-size: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

/* 시간 표시 */
.time-display {
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: #ffffff;
}

/* 프로그레스 바 */
.progress-container {
    margin: 10px 0;
}

.progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 3px;
    transition: width 0.1s ease;
    position: relative;
}

.progress-handle {
    position: absolute;
    top: -3px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transform: translateX(-50%);
}

.progress-handle:active {
    cursor: grabbing;
    transform: translateX(-50%) scale(1.2);
}

/* 시간 조절 버튼들 */
.time-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.time-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.time-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.time-btn:active {
    transform: translateY(0);
}

.speed-display {
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

/* 구간 설정 */
.segment-controls {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
    margin-top: 10px;
}

.segment-controls label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #ffffff;
}

.segment-controls input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: white;
    padding: 4px 6px;
    width: 60px;
    font-size: 11px;
}

.segment-controls input::placeholder {
    color: rgba(255,255,255,0.6);
}

.segment-controls input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3);
}

.segment-controls > * {
    margin: 2px;
    vertical-align: middle;
}

/* 알림 애니메이션 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .video-slide-container {
        height: 70vh;
    }
    
    .hero-video-controls {
        bottom: 10px;
        right: 10px;
        min-width: 150px;
    }
    
    .video-control-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .video-time-panel {
        padding: 10px;
        font-size: 11px;
    }
    
    .time-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .segment-controls input {
        width: 50px;
        font-size: 10px;
    }
    
    li[data-media-type="video"] .slatbx {
        background: rgba(0,0,0,0.6);
    }
}

/* 접근성 향상 */
.hero-video:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.video-control-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* 성능 최적화 */
.hero-video {
    will-change: transform;
}

.video-overlay {
    will-change: opacity;
}

/* 어두운 테마 지원 */
@media (prefers-color-scheme: dark) {
    .video-overlay {
        background: linear-gradient(45deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 100%);
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    li[data-media-type="video"] .slatbx {
        background: rgba(0,0,0,0.8);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    li[data-media-type="video"] .slatbx .inlinebx {
        text-shadow: none;
        border: 1px solid #ffffff;
        padding: 20px;
    }
}

/* 애니메이션 감소 모드 지원 */
@media (prefers-reduced-motion: reduce) {
    .video-control-btn {
        transition: none;
    }
    
    .video-control-btn:hover {
        transform: none;
    }
    
    .video-control-btn:active {
        transform: none;
    }
}
