/* 테마의 중복 타이틀/헤더 숨기기 */
.nv-single-video-wrap .header-author,
.nv-single-video-wrap .post-header,
.nv-single-video-wrap .breadcrumb,
.nv-single-video-wrap .page-header {
    display: none !important;
}

/* 상단 브레드크럼 (상세 페이지 전용) */
.nv-single-breadcrumb {
    padding: 15px 0 25px;
    font-size: 14px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}
.nv-single-breadcrumb a { color: #aaa; text-decoration: none; transition: color 0.2s; display: flex; align-items: center; }
.nv-single-breadcrumb a:hover { color: #fff; }
.nv-single-breadcrumb .sep { color: #444; font-size: 12px; }
.nv-single-breadcrumb .current { color: #555; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }


/* ── 다음 회차 자동 재생 카드 (Netflix 스타일) ────────────── */
.nv-player-next-up {
    position: absolute;
    bottom: 80px;
    right: 20px;
    z-index: 150;
    width: 320px;
    background: rgba(20,20,20,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    animation: nextUpSlide 0.5s ease-out;
}

@keyframes nextUpSlide {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.next-up-card {
    display: flex;
    gap: 12px;
}

.next-up-img {
    width: 100px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}
.next-up-img img { width: 100%; height: 100%; object-fit: cover; }

.next-up-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.next-up-label {
    font-size: 11px;
    color: #e50914;
    font-weight: 800;
    text-transform: uppercase;
}

.next-up-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 4px 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.next-up-btns {
    display: flex;
    gap: 8px;
}

.nv-btn-next {
    background: #fff;
    color: #000;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}
.nv-btn-next:hover { background: #e50914; color: #fff; }

.nv-btn-cancel {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.nv-btn-cancel:hover { background: rgba(255,255,255,0.2); }

/* ── 자체 광고 레이어 (EVP 스타일) ────────────────────────── */
.nv-player-custom-ad {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: rgba(0,0,0,0.85);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 80%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.nv-player-custom-ad img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.nv-ad-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    background: #e50914;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 101;
}

/* ── 스티키(Sticky) 플레이어 모드 ─────────────────────────── */
.nv-player-wrap.nv-sticky {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    width: 350px !important; /* 모바일은 나중에 미디어쿼리 처리 */
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    z-index: 999999 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;
    animation: stickyAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #222;
}

@keyframes stickyAppear {
    from { opacity: 0; transform: translateY(50px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 스티키 상태에서는 광고 레이어 숨김 */
.nv-sticky .nv-player-custom-ad {
    display: none !important;
}

@media (max-width: 480px) {
    .nv-player-wrap.nv-sticky {
        width: 220px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
}

/* ── Video.js Professional Skin (Netflix Style - Scoped) ────────────── */

/* 1. 포커스 테두리 완전 제거 (플레이어 내부 한정 - 강력 조치) */
.nv-player-wrap .video-js *:focus,
.nv-player-wrap .video-js .vjs-control:focus,
.nv-player-wrap .video-js .vjs-control-bar:focus,
.nv-player-wrap .video-js .vjs-big-play-button:focus,
.nv-player-wrap .video-js .vjs-slider:focus,
.nv-player-wrap .video-js .vjs-button:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* 2. 중앙 큰 재생 버튼 디자인 (X 버튼 대신 고급스러운 버튼) */
.nv-player-wrap .video-js .vjs-big-play-button {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    width: 80px !important;
    height: 80px !important;
    line-height: 76px !important;
    margin-left: -40px !important;
    margin-top: -40px !important;
    font-size: 45px !important;
    transition: all 0.3s ease !important;
    top: 50% !important;
    left: 50% !important;
    transform: none !important;
}

.nv-player-wrap .video-js:hover .vjs-big-play-button {
    background-color: #e50914 !important;
    border-color: #e50914 !important;
    transform: none !important;
}

/* 중앙 X 버튼 및 에러 표시기 잔상 제거 */
.nv-player-wrap .vjs-error-display,
.nv-player-wrap .vjs-modal-dialog,
.nv-player-wrap .vjs-close-button {
    display: none !important;
}

/* 3. 진행바 (넷플릭스 레드) */
.nv-player-wrap .video-js .vjs-play-progress {
    background-color: #e50914 !important;
}
.nv-player-wrap .video-js .vjs-play-progress::before {
    display: none !important;
}

/* 4. 컨트롤 바 투명 그라데이션 (플레이어 하단 한정) */
.nv-player-wrap .video-js .vjs-control-bar {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%) !important;
}


/* ── 시청 제한 화면 (Locked Player) 사이즈 최적화 ────────── */
.nv-locked-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 1100px;
    border: 1px solid #222;
}

.nv-locked-inner {
    text-align: center;
    padding: 20px;
}

.nv-locked-title { font-size: 24px; color: #fff; margin-bottom: 10px; }
.nv-locked-desc { color: #888; margin-bottom: 20px; }

/* ── 상단 액션 버튼 레이아웃 복구 ────────────────────────── */
.nv-single-actions {
    display: flex !important;
    gap: 15px !important;
    padding: 20px 0 !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    border-bottom: 1px solid #222;
}

.nv-action-btn {
    all: unset !important; /* 기존 깨진 스타일 초기화 */
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    background: #222 !important;
    border-radius: 4px !important;
    color: #eee !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: 0.2s !important;
}

.nv-action-btn:hover { background: #333 !important; color: #fff !important; }
.nv-action-btn .icon { font-size: 16px !important; }
.nv-action-btn.active { background: #e50914 !important; color: #fff !important; }

/* 기존 깨진 스타일 강제 덮어쓰기 */
.nv-single-actions a, .nv-single-actions button {
    text-decoration: none !important;
}






/* 로딩 스피너 */
.vjs-loading-spinner {
    border: 3px solid rgba(229, 9, 20, 0.5) !important;
}

/* ── 플레이어 래퍼 ─────────────────────────────────────────── */
.nv-player-wrap {
    position: relative;
    width: 100%;
    max-width: 1100px; /* 사이즈 축소: 너무 거대하지 않게 */
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
    z-index: 1;
}

/* 워터마크 로고 (이미지) */
.nv-player-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 5;
    max-width: 120px;
    height: auto;
    pointer-events: none;
    opacity: 0.8;
}

/* 컨트롤바를 가리지 않도록 오버레이 조정 */
.nv-player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none; /* 클릭 통과 */
}

/* ── 신규 상세 페이지 레이아웃 (Netflix 스타일 v3) ───────────── */
.nv-single-v2:not(.nv-is-profile) {
    background: #0d0d0d;
    color: #fff;
    min-height: 100vh;
}

.nv-single-hero:not(.nv-is-profile) {
    width: 100%;
    background: #000;
    padding: 30px 4% 50px;
    margin-bottom: 20px;
    border-bottom: 1px solid #1a1a1a;
}

.nv-single-player-container:not(.nv-is-profile),
.nv-single-content:not(.nv-is-profile) {
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0 4% 80px;
}

/* ── 관련 콘텐츠 및 최신 업로드 그리드 크기 확대 (메인 페이지와 동일하게 7열) ── */
.nv-single-content .nv-library-grid,
.nv-single-content .nv-related-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important; 
    gap: 10px 8px !important;
    margin-bottom: 40px !important;
}

/* 카드 크기 및 스타일 통일 */
.nv-single-content .nv-card,
.nv-single-content .nv-related-card {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #222;
    text-decoration: none !important;
    transition: transform 0.25s ease;
}

.nv-single-content .nv-card:hover,
.nv-single-content .nv-related-card:hover {
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 8px 28px rgba(0,0,0,0.7);
}

/* 마이페이지 내 썸네일 그리드 강제 고정 (크기 축소 유지) */
.nv-is-profile .nv-profile-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 130px) !important;
    gap: 15px !important;
    justify-content: flex-start !important;
}

.nv-is-profile .nv-profile-card {
    width: 130px !important;
    aspect-ratio: 2 / 3 !important;
}

.nv-single-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.nv-single-title {
    font-size: clamp(24px, 4.5vw, 38px);
    font-weight: 900;
    margin: 0 0 16px;
    color: #fff;
    letter-spacing: -0.8px;
}

/* 액션 버튼 그룹 (Sleek Modern Style) */
.nv-single-actions {
    display: flex;
    gap: clamp(10px, 2vw, 24px); /* 간격 유동적 조절 */
    padding-top: 5px;
    flex-wrap: nowrap; /* 무조건 한 줄 */
    overflow-x: auto; /* 넘치면 스크롤 (모바일 대응) */
    scrollbar-width: none;
}
.nv-single-actions::-webkit-scrollbar { display: none; }

.nv-action-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    padding: 0;
    min-width: 64px; /* 최소 너비 약간 축소 */
    flex-shrink: 0;
}

.nv-action-btn .icon {
    width: clamp(40px, 5vw, 48px); /* 크기 유동적 조절 */
    height: clamp(40px, 5vw, 48px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 2vw, 20px);
    transition: inherit;
    background: rgba(255,255,255,0.02);
}

.nv-action-btn .label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.nv-action-btn:hover { color: #fff; }
.nv-action-btn:hover .icon { 
    border-color: #fff; 
    background: rgba(255,255,255,0.1); 
    transform: scale(1.05); 
}

.nv-action-btn.active { color: #e50914; }
.nv-action-btn.active .icon { 
    border-color: #e50914; 
    color: #e50914; 
    background: rgba(229, 9, 20, 0.08); 
}

.nv-single-video-wrap .nv-action-btn .icon {
    position: relative !important;
    width: clamp(38px, 4.5vw, 48px) !important;
    height: clamp(38px, 4.5vw, 48px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nv-single-video-wrap .nv-action-btn .icon i {
    display: none !important;
}

.nv-single-video-wrap .nv-action-btn .icon::before {
    display: block !important;
    color: currentColor !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.nv-single-video-wrap .nv-wishlist-toggle .icon::before { content: "♡"; }
.nv-single-video-wrap .nv-wishlist-toggle.active .icon::before { content: "♥"; }
.nv-single-video-wrap .nv-playlist-add .icon::before { content: "▤"; font-size: 18px !important; }
.nv-single-video-wrap .nv-share-btn .icon::before { content: "↗"; }
.nv-single-video-wrap .nv-report-btn .icon::before { content: "!"; }


/* 상세 본문 */
.nv-single-body {
    max-width: 900px;
    margin-bottom: 50px;
}

.nv-single-desc {
    font-size: 17px;
    line-height: 1.7;
    color: #d2d2d2;
    margin-bottom: 30px;
}

.nv-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.nv-single-tags .tag-label {
    font-size: 13px;
    color: #777;
    text-transform: uppercase;
    font-weight: 700;
}

.nv-single-tags a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.nv-single-tags a:hover { color: #e50914; }

.section-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    color: #fff;
    border-left: 4px solid #e50914;
    padding-left: 15px;
}

/* ── 모바일 싱글 영상 미세 조정: 요청 영역만 제한 ───────────── */
@media (max-width: 767.98px) {
    .nv-single-video-wrap .nv-single-header {
        display: block;
        margin-bottom: 26px;
    }

    .nv-single-video-wrap .nv-single-actions {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 7px !important;
        width: 100% !important;
        padding: 14px 0 10px !important;
        margin: 12px 0 0 !important;
        overflow: visible !important;
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
    }

    .nv-single-video-wrap .nv-action-btn {
        all: unset !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
        height: 70px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        padding: 7px 3px !important;
        border-radius: 12px !important;
        color: #fff !important;
        border: 1px solid rgba(255,255,255,.08) !important;
        background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025)) !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.22) !important;
        cursor: pointer !important;
        text-align: center !important;
    }

    .nv-single-video-wrap .nv-action-btn:nth-child(1) { background: linear-gradient(145deg, rgba(229,9,20,.34), rgba(229,9,20,.08)) !important; }
    .nv-single-video-wrap .nv-action-btn:nth-child(2) { background: linear-gradient(145deg, rgba(142,68,255,.30), rgba(142,68,255,.07)) !important; }
    .nv-single-video-wrap .nv-action-btn:nth-child(3) { background: linear-gradient(145deg, rgba(41,151,247,.30), rgba(41,151,247,.07)) !important; }
    .nv-single-video-wrap .nv-action-btn:nth-child(4) { background: linear-gradient(145deg, rgba(255,111,6,.30), rgba(255,111,6,.07)) !important; }

    .nv-single-video-wrap .nv-action-btn .icon {
        width: 30px !important;
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        border: 1px solid rgba(255,255,255,.16) !important;
        background: rgba(0,0,0,.18) !important;
        font-size: 14px !important;
    }

    .nv-single-video-wrap .nv-action-btn .icon::before {
        font-size: 16px !important;
    }

    .nv-single-video-wrap .nv-playlist-add .icon::before {
        font-size: 15px !important;
    }

    .nv-single-video-wrap .nv-action-btn .label {
        max-width: 100% !important;
        font-size: 10px !important;
        line-height: 1.15 !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        letter-spacing: -0.35px !important;
    }

    .nv-single-video-wrap .nv-action-btn.active {
        background: linear-gradient(145deg, #e50914, #8d0007) !important;
        color: #fff !important;
    }

    .nv-single-video-wrap .nv-player-wrap .video-js,
    .nv-single-video-wrap .nv-player-wrap .vjs-poster {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .nv-single-video-wrap .nv-player-wrap .vjs-poster {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }

    .nv-single-video-wrap .nv-player-wrap .vjs-poster img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center center !important;
    }

    .nv-single-video-wrap .nv-player-wrap .video-js .vjs-tech {
        object-fit: contain !important;
        object-position: center center !important;
    }

    .nv-single-video-wrap .yasr-visitor-votes,
    .nv-single-video-wrap .yasr-rater-stars,
    .nv-single-video-wrap .yasr-total-average-container,
    .nv-single-video-wrap .yasr-container-custom-text-and-overall {
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .nv-single-video-wrap .yasr-visitor-votes,
    .nv-single-video-wrap .yasr-total-average-container,
    .nv-single-video-wrap .yasr-container-custom-text-and-overall {
        padding: 12px 14px !important;
        border-radius: 14px !important;
        background: linear-gradient(145deg, rgba(229,9,20,.20), rgba(255,255,255,.04)) !important;
        border: 1px solid rgba(229,9,20,.26) !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(0,0,0,.24) !important;
    }

    .nv-single-video-wrap .yasr-visitor-votes .yasr-rater-stars,
    .nv-single-video-wrap .yasr-total-average-container .yasr-rater-stars {
        display: inline-flex !important;
        justify-content: center !important;
        vertical-align: middle !important;
    }
}
