/**
 * 파일명: frontend.css
 * 파일위치: /wp-content/plugins/youtube-playlist/assets/css/
 * 
 * YouTube Playlist - Frontend Styles
 * Version: 2.0.0
 */

/* 메인 컨테이너 - 플레이리스트 전체 래퍼 */
.ypl-playlist-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: -40px 0 20px 0;
    position: relative;
    height: auto; /* 높이 자동 조정 */
    overflow: visible; /* 컨테이너 자체는 스크롤 없음 */
    /* 컨테이너 스크롤바 제거 - 브라우저 기본만 사용 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ypl-playlist-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* 모바일 주소창 최소화를 위한 뷰포트 설정 - 일반 페이지에 영향 주지 않도록 제거 */
/* html, body 스타일은 플레이리스트 컨테이너 내부에서만 적용 */

/* Presto Player 컨테이너 */
.presto-player-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.presto-player-iframe-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.presto-player-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 채널로 가기 버튼 스타일 - 제거됨 (전체 영역이 클릭 가능) */
.ypl-channel-button {
    display: none;
}

/* 재생창 박스 */
.ypl-player-box {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

/* 재생설정 박스 */
.ypl-controls-box {
    background: #2a2a2a;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    padding: 14px 25px;
    min-height: 58px;
}

/* 채널정보 박스 */
.ypl-channel-box {
    background: #2a2a2a;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

/* 메인 플레이어 래퍼 */
.ypl-main-player-wrapper {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 플레이어 컨테이너 */
.ypl-player-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 비율 */
    background: #000;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

/* 아스트라 테마 모바일 전체화면 설정 */
@media only screen and (max-width: 768px) {
    .ypl-playlist-container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding: 0 !important;
    }
    
    .ypl-player-box {
        position: relative;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
        overflow: hidden;
        box-shadow: none !important;
        background: transparent !important;
        /* 재생창 스크롤바 완전 제거 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .ypl-player-box::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    
    .ypl-player-container {
        position: relative;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
        overflow: hidden;
        padding-bottom: 56.25% !important; /* 16:9 비율 강제 */
        /* 재생창 스크롤바 완전 제거 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .ypl-player-container::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    
    .ypl-player-container iframe,
    .ypl-player-container video {
        /* 재생창 내부 요소 스크롤바 제거 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .ypl-player-container iframe::-webkit-scrollbar,
    .ypl-player-container video::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}

/* 아스트라 테마 특정 설정 */
@media only screen and (max-width: 768px) {
    /* Astra 테마의 기본 컨테이너 패딩 재정의 */
    .ast-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Astra 테마 모바일에서 섹션 여백 제거 */
    .ast-separate-container .ast-article-post,
    .ast-separate-container .ast-article-single {
        padding: 0 !important;
    }
    
    /* 특정 Astra 영역에서 YouTube 플레이리스트 컨테이너 최적화 */
    .entry-content .ypl-playlist-container,
    .entry-content .ypl-player-box {
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        width: 100vw !important;
    }
}

.ypl-player-container > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 데스크톱에서 iframe과 video 요소 전체 크기 설정 */
.ypl-player-container iframe,
.ypl-player-container video,
.ypl-player-container object,
.ypl-player-container embed {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Shorts 비디오 스타일 */
.ypl-player-container.ypl-shorts-video {
    padding-bottom: 177.78%; /* 9:16 비율 */
    max-width: 400px;
    margin: 0 auto;
}

/* 숏츠 전용 레이아웃 */
.ypl-shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px;
}

.ypl-shorts-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}

.ypl-shorts-horizontal {
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.ypl-shorts-horizontal .ypl-player-container {
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* 숏츠 전용 컨트롤 */
.ypl-shorts-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    margin: 10px auto;
    max-width: 200px;
}

.ypl-shorts-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.ypl-shorts-controls button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.ypl-shorts-controls button:active {
    transform: scale(0.95);
}

.ypl-shorts-controls .ypl-shorts-play {
    background: rgba(255, 0, 0, 0.8);
    width: 50px;
    height: 50px;
}

.ypl-shorts-controls .ypl-shorts-play:hover {
    background: rgba(255, 0, 0, 1);
}

.ypl-shorts-controls .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* 숏츠 성능 최적화 */
.ypl-shorts-video {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.ypl-shorts-video iframe {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* 숏츠 접근성 개선 */
.ypl-shorts-controls button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.ypl-shorts-controls button:focus:not(:focus-visible) {
    outline: none;
}

.ypl-shorts-controls button:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* 숏츠 다크 모드 */
@media (prefers-color-scheme: dark) {
    .ypl-shorts-controls {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .ypl-shorts-controls button {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
    
    .ypl-shorts-controls button:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* 숏츠 고대비 모드 */
@media (prefers-contrast: high) {
    .ypl-shorts-controls {
        background: rgba(0, 0, 0, 0.95);
        border: 2px solid white;
    }
    
    .ypl-shorts-controls button {
        background: white;
        color: black;
        border: 2px solid black;
    }
    
    .ypl-shorts-controls .ypl-shorts-play {
        background: #ff0000;
        color: white;
    }
}

/* 숏츠 애니메이션 최적화 */
@media (prefers-reduced-motion: reduce) {
    .ypl-shorts-controls button {
        transition: none;
    }
    
    .ypl-shorts-controls button:hover {
        transform: none;
    }
    
    .ypl-shorts-controls button:active {
        transform: none;
    }
}

/* 데스크톱에서 Shorts 비디오 내부 요소들 전체 크기 설정 */
.ypl-player-container.ypl-shorts-video iframe,
.ypl-player-container.ypl-shorts-video video,
.ypl-player-container.ypl-shorts-video object,
.ypl-player-container.ypl-shorts-video embed {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 모바일에서 Shorts 비디오 전체화면 설정 */
@media only screen and (max-width: 768px) {
    .ypl-player-container.ypl-shorts-video {
        padding-bottom: 177.78% !important; /* 9:16 비율 유지 */
        max-width: 100vw !important;
        width: 100vw !important;
        margin: 0 !important;
    }
    
    /* 숏츠 전용 모바일 레이아웃 */
    .ypl-shorts-vertical {
        padding: 0 !important;
        gap: 0 !important;
    }
    
    .ypl-shorts-horizontal {
        padding: 0 !important;
        gap: 0 !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .ypl-shorts-grid {
        grid-template-columns: 1fr;
        gap: 0 !important;
        padding: 0 !important;
    }
    
    /* 숏츠 컨트롤 모바일 최적화 */
    .ypl-shorts-controls {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .ypl-shorts-controls button {
        width: 50px;
        height: 50px;
        touch-action: manipulation;
    }
    
    .ypl-shorts-controls .ypl-shorts-play {
        width: 60px;
        height: 60px;
    }
}
    
    /* Shorts 비디오 내부 요소들 전체 크기 */
    .ypl-player-container.ypl-shorts-video iframe,
    .ypl-player-container.ypl-shorts-video video,
    .ypl-player-container.ypl-shorts-video object,
    .ypl-player-container.ypl-shorts-video embed,
    .ypl-player-container.ypl-shorts-video > *,
    .ypl-player-container.ypl-shorts-video .ypl-video-thumbnail,
    .ypl-player-container.ypl-shorts-video .ypl-play-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 177.78vw !important; /* 9:16 비율 */
        max-width: 100vw !important;
        max-height: 177.78vw !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        transform: none !important;
    }
}

/* 태블릿 크기 화면 (769px ~ 1024px) */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .ypl-player-container iframe,
    .ypl-player-container video,
    .ypl-player-container object,
    .ypl-player-container embed {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .ypl-player-container.ypl-shorts-video iframe,
    .ypl-player-container.ypl-shorts-video video,
    .ypl-player-container.ypl-shorts-video object,
    .ypl-player-container.ypl-shorts-video embed {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* 모바일 전체화면 강화 설정 */
@media only screen and (max-width: 768px) {
    /* 재생창만 전체화면 */
    .ypl-player-box,
    .ypl-player-container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* 모든 요소를 전체 가로폭으로 설정 */
    .ypl-playlist-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
    }
    
    .ypl-current-video-info {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }
    
    /* 재생창 내부 iframe과 비디오 요소 강제 전체 크기 */
    .ypl-player-container iframe,
    .ypl-player-container video,
    .ypl-player-container object,
    .ypl-player-container embed {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 56.25vw !important; /* 16:9 비율 */
        max-width: 100vw !important;
        max-height: 56.25vw !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
    
    /* 플레이어 내부 모든 요소들 전체 크기 */
    .ypl-player-container > * {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 56.25vw !important;
        max-width: 100vw !important;
        max-height: 56.25vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 비디오 썸네일 전체화면 */
    .ypl-video-thumbnail {
        width: 100vw !important;
        height: 56.25vw !important;
        max-width: 100vw !important;
        max-height: 56.25vw !important;
        object-fit: cover !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    /* 재생 오버레이 전체 크기 */
    .ypl-play-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 56.25vw !important;
        max-width: 100vw !important;
        max-height: 56.25vw !important;
    }
}

/* 플레이어 플레이스홀더 */
.ypl-player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* 자동 로드 시 플레이스홀더 숨기기 */
.ypl-playlist-container.auto-loading .ypl-player-placeholder {
    opacity: 0;
    /* pointer-events: none; 제거 - 재생 버튼 클릭을 위해 */
}

.ypl-video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* 재생 오버레이 */
.ypl-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
    z-index: 2; /* 썸네일보다 위에 표시 */
    pointer-events: auto; /* 명시적으로 클릭 이벤트 허용 */
}

.ypl-play-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* 비디오 로드 후 오버레이 숨기기 */
.ypl-player-container.video-loaded .ypl-play-overlay {
    opacity: 0;
    visibility: hidden;
    /* pointer-events: none; 제거 - 재생 버튼 클릭을 위해 */
}

/* 비디오 로드 후 플레이스홀더 완전히 숨기기 */
.ypl-player-container.video-loaded .ypl-player-placeholder {
    display: none !important;
}

/* 큰 재생 버튼 */
.ypl-big-play-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 3; /* 오버레이보다 위에 표시 */
    pointer-events: auto; /* 명시적으로 클릭 이벤트 허용 */
}

.ypl-big-play-button:hover {
    transform: scale(1.1);
}

.ypl-big-play-button svg {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.ypl-play-text {
    color: #fff;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ypl-play-hint {
    color: #fff;
    font-size: 12px;
    margin-top: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 비디오 정보 */
.ypl-current-video-info {
    padding: 15px 20px;
    background: #1a1a1a;
}

/* 채널정보 컨테이너 */
.ypl-channel-info-container {
    padding: 10px;
    background: transparent;
}

/* 비디오 채널 정보 (제목 위) */
.ypl-video-channel-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 0;
}

/* 채널 링크 스타일 */
.ypl-channel-link-small {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
}

.ypl-channel-link-small:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.ypl-channel-link-small:active {
    transform: translateY(0);
}

.ypl-channel-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.ypl-channel-thumbnail-small {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ypl-channel-placeholder-small {
    width: 100%;
    height: 100%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.ypl-channel-details-small {
    flex: 1;
    min-width: 0;
}

.ypl-channel-name-small {
    font-size: 16px;
    color: #fff;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 2px;
}

.ypl-channel-handle-small {
    font-size: 14px;
    color: #aaa;
    line-height: 1.2;
}

.ypl-video-title {
    margin: 20px 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    padding: 0 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 채널 정보 */
.ypl-channel-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
    padding: 12px 20px;
    background: #333;
    border-radius: 0;
    min-height: 60px;
    width: 100%;
}

.ypl-channel-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 5px;
    width: 100%;
}

.ypl-channel-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.ypl-channel-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.ypl-channel-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.ypl-channel-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.ypl-channel-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ypl-channel-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
}

.ypl-channel-subscribers {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
}

/* 채널로 가기 화살표 아이콘 */
.ypl-channel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #aaa;
    font-size: 16px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.ypl-channel-link:hover .ypl-channel-arrow {
    color: #fff;
    transform: translateX(2px);
}

/* 채널 링크에 원형 화살표 아이콘 추가 (CSS로) */
.ypl-channel-link::after {
    content: "→";
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    background: rgba(0, 123, 255, 0.7);
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ypl-channel-link:hover::after {
    background: rgba(0, 86, 179, 0.9);
    transform: translateX(2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}





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

/* 채널 로딩 상태 */
.ypl-channel-loading {
    cursor: pointer;
}

.ypl-channel-loading:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.ypl-channel-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 20px;
}

.ypl-channel-loading .ypl-channel-name {
    color: #999;
    font-style: italic;
}

.ypl-channel-loading .ypl-channel-subscribers {
    color: #666;
    font-style: italic;
}

/* 채널 오류 상태 */
.ypl-channel-error {
    cursor: pointer;
}

.ypl-channel-error:hover {
    background: rgba(255, 102, 102, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 102, 102, 0.3);
}

.ypl-channel-error .ypl-channel-placeholder {
    background: #4a1a1a;
    color: #ff6666;
}

.ypl-channel-error .ypl-channel-name {
    color: #ff6666;
    font-style: italic;
}

.ypl-channel-error .ypl-channel-subscribers {
    color: #cc4444;
    font-style: italic;
}

/* 설명 토글 버튼 */
.ypl-description-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 8px auto;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ccc;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
    user-select: none;
    min-width: 50px;
}

.ypl-description-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
}

.ypl-description-toggle-btn i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.ypl-description-toggle-btn.expanded i {
    transform: rotate(180deg);
}

.ypl-description-toggle-btn.expanded span {
    display: none;
}

.ypl-description-toggle-btn.expanded::after {
    content: "Hide";
    font-size: 11px;
    font-weight: 500;
}

/* 비디오 설명 */
.ypl-video-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    background: #333;
    border-radius: 8px;
    margin-top: 0;
    transition: all 0.3s ease;
}

.ypl-video-description.expanded {
    max-height: 200px;
    padding: 15px;
    margin-top: 10px;
    overflow-y: auto;
}

/* 데스크탑 스크롤바 스타일링 */
@media (min-width: 769px) {
    .ypl-video-description.expanded {
        /* 웹킷 기반 브라우저 스크롤바 스타일링 */
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }
    
    .ypl-video-description.expanded::-webkit-scrollbar {
        width: 6px;
    }
    
    .ypl-video-description.expanded::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .ypl-video-description.expanded::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }
    
    .ypl-video-description.expanded::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* 모바일 터치 스크롤 최적화 */
@media (max-width: 768px) {
    .ypl-video-description.expanded {
        /* 모바일에서 터치 스크롤 최적화 */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        /* 스크롤바 숨김 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .ypl-video-description.expanded::-webkit-scrollbar {
        display: none;
    }
}

.ypl-video-description p {
    margin: 0 0 10px 0;
    white-space: pre-line;
    word-wrap: break-word;
}

.ypl-video-description p:last-child {
    margin-bottom: 0;
}

/* 플레이어 컨트롤 */
.ypl-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px;
    background: transparent;
    flex-wrap: wrap;
    min-height: 43px;
    overflow: visible;
    position: relative;
}

.ypl-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 5px;
    min-width: 32px;
    height: 29px;
    position: relative;
}

.ypl-control-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    color: #ff0000;
    transform: scale(1.05);
}

/* 툴팁 스타일 */
.ypl-control-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #333333;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 99999;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-out;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    min-width: max-content;
    max-width: 200px;
    text-align: center;
    line-height: 1.4;
}

.ypl-control-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% - 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #ffffff;
    z-index: 100000;
    pointer-events: none;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 다크 모드 툴팁 스타일 */
.ypl-playlist-container:not(.light-mode) .ypl-control-btn[title]:hover::after {
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 99999;
}

.ypl-playlist-container:not(.light-mode) .ypl-control-btn[title]:hover::before {
    border-top-color: rgba(0, 0, 0, 0.95);
    z-index: 100000;
}

.ypl-control-btn.active {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.ypl-control-btn i {
    font-size: 14px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 무작위 재생 버튼 (셔플) 특별 스타일 */
.ypl-shuffle-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-color: #ff6b6b;
    color: #fff;
    font-weight: 600;
}

.ypl-shuffle-btn:hover {
    background: linear-gradient(45deg, #ff5252, #ff7979);
    border-color: #ff5252;
    transform: scale(1.1);
}

.ypl-shuffle-btn.active {
    background: linear-gradient(45deg, #e53935, #ff6b6b);
    border-color: #e53935;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
    animation: shufflePulse 2s infinite;
}

@keyframes shufflePulse {
    0% { box-shadow: 0 0 15px rgba(255, 107, 107, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 107, 107, 0.8); }
    100% { box-shadow: 0 0 15px rgba(255, 107, 107, 0.5); }
}

/* 상태 오버레이 */
.ypl-status-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
    transition: opacity 0.3s ease-out;
}

.ypl-status-overlay.fade-out {
    opacity: 0;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ypl-status-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ypl-status-icons {
    display: flex;
    gap: 4px;
}

.ypl-status-icon {
    font-size: 14px;
    color: #ff6b6b;
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.ypl-status-text {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

/* 밝은 모드 상태 텍스트 */
.ypl-playlist-container.light-mode .ypl-status-text {
    color: #333333;
}

/* 연속재생 아이콘 특별 스타일 */
.ypl-loop-icon {
    color: #4CAF50;
}

/* 무작위재생 아이콘 특별 스타일 */
.ypl-shuffle-icon {
    color: #ff6b6b;
}

/* 플레이리스트 토글 버튼 특별 스타일 */
.ypl-playlist-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 9px 13px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    user-select: none;
    min-height: 29px;
}

.ypl-playlist-toggle-btn i {
    /* pointer-events: none; 제거 - 아이콘 클릭을 위해 */
    user-select: none;
}

.ypl-playlist-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.ypl-playlist-toggle-btn.active {
    background: rgba(76, 175, 80, 0.8);
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}


/* 플레이리스트 사이드바 */
.ypl-playlist-sidebar {
    width: 100%;
    background: #2a2a2a;
    display: flex;
    flex-direction: column;
    max-height: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    /* 초기 상태를 명확히 설정 - 깜빡임 방지 */
    opacity: 0;
    box-sizing: border-box;
}

.ypl-playlist-sidebar.closed {
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

/* active 클래스 명시적 정의 */
.ypl-playlist-sidebar.active {
    max-height: 400px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    position: relative; /* 스크롤 컨테이너 고정 */
    overflow: hidden; /* 외부 스크롤 방지 */
}

/* 애니메이션 중복 방지 - 제거됨 */

.ypl-playlist-header {
    padding: 10px 12px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ypl-playlist-header h4 {
    margin: 0;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ypl-video-count {
    font-size: 12px;
    color: #ccc;
    font-weight: normal;
}

/* 플레이리스트 아이템 */
.ypl-playlist-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
    max-height: 755px; /* 6개 항목이 보이도록 높이 조정 (120px * 6 + 5px * 5 + padding 10px) */
    position: relative; /* 스크롤 컨테이너 고정 */
}

.ypl-playlist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: transparent !important;
    border-radius: 6px;
    cursor: default; /* 클릭 커서 제거 */
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    z-index: 100;
    touch-action: manipulation;
    min-height: 120px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ypl-playlist-item:hover {
    background: #3a3a3a;
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ypl-playlist-item.active,
.ypl-playlist-item.current-playing,
.ypl-playlist-item.ypl-active {
    background: rgba(76, 175, 80, 0.3) !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4) !important;
    transform: scale(1.02) !important;
    border-left: 4px solid #4CAF50 !important;
    position: relative;
}

/* 강화된 하이라이트 스타일 */
.ypl-playlist-item.active::before,
.ypl-playlist-item.current-playing::before,
.ypl-playlist-item.ypl-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #4CAF50 0%, #2E7D32 100%);
    border-radius: 0 2px 2px 0;
}

/* 재생 중 표시 강화 */
.ypl-now-playing {
    position: absolute !important;
    top: 12px !important;
    right: 8px !important;
    background: #4CAF50 !important;
    color: #ffffff !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 10 !important;
    animation: pulse 2s infinite !important;
    white-space: nowrap !important;
}

/* 재생 아이콘 스타일 */
.ypl-play-icon {
    color: #ff0000 !important;
    font-size: 16px !important;
    margin-right: 8px !important;
    animation: bounce 1s infinite !important;
}

/* 애니메이션 효과 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-2px); }
}

/* 기본 상태 강화 - 다크 모드 */
.ypl-playlist-item:not(.active):not(.current-playing):not(.ypl-active) {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 기본 상태 강화 - 밝은 모드 */
.ypl-playlist-container.light-mode .ypl-playlist-item:not(.active):not(.current-playing):not(.ypl-active) {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    color: #333333 !important;
    transform: none !important;
    box-shadow: none !important;
}

.ypl-playlist-item.played {
    opacity: 0.6;
}

/* 플레이리스트 아이템 액션 버튼 */
.ypl-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.ypl-play-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 0;
    margin: 0;
    outline: none;
    position: relative;
    z-index: 10;
    pointer-events: auto; /* 재생 버튼은 클릭 가능 */
    touch-action: manipulation; /* 터치 최적화 */
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2); /* 터치 피드백 */
    min-width: 36px; /* 최소 터치 영역 보장 */
    min-height: 36px;
}

.ypl-play-item-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ypl-play-item-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.ypl-play-item-btn i {
    font-size: 14px;
    margin-left: 2px; /* 재생 아이콘 중앙 정렬을 위한 미세 조정 */
}

/* 삭제 버튼 스타일 */
.ypl-delete-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 50%;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 0;
    margin: 0;
    outline: none;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(220, 38, 38, 0.2);
    min-width: 36px;
    min-height: 36px;
}

.ypl-delete-item-btn:hover {
    background: rgba(220, 38, 38, 0.3);
    border-color: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    color: #ef4444;
}

.ypl-delete-item-btn:active {
    transform: scale(0.95);
    background: rgba(220, 38, 38, 0.4);
}

.ypl-delete-item-btn i {
    font-size: 14px;
}


.ypl-playlist-container .ypl-playlist-item .ypl-item-thumbnail {
    position: relative;
    width: 173px !important;
    height: 97px !important;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
    flex-shrink: 0;
    max-width: 173px !important;
    min-width: 173px !important;
}

.ypl-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ypl-duration {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 3px 6px;
    font-size: 12px;
    border-radius: 3px;
    font-weight: 500;
}

.ypl-item-info {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 290px);
    overflow: hidden;
}

.ypl-item-title {
    font-size: 14px;
    color: #fff;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ypl-shorts-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff0000;
    color: #fff;
    width: 20px;
    height: 20px;
    font-size: 12px;
    border-radius: 50%;
    font-weight: bold;
    margin-left: 5px;
}

.ypl-shorts-badge .dashicons {
    font-size: 10px;
    width: 10px;
    height: 10px;
}

.ypl-view-count {
    font-size: 13px;
    color: #aaa;
    font-weight: 400;
}

/* 기존 재생 중 표시 스타일 제거됨 - 위의 강화된 스타일 사용 */

/* 플레이리스트 푸터 */
.ypl-playlist-footer {
    padding: 10px 12px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ypl-progress-bar {
    height: 4px;
    background: #555;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ypl-progress-fill {
    height: 100%;
    background: #ff0000;
    transition: width 0.3s ease;
}

.ypl-playlist-info {
    font-size: 12px;
    color: #ccc;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.ypl-video-count-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ypl-revision-info {
    color: #888;
    font-size: 10px;
    font-style: italic;
}

.ypl-player-info {
    display: flex;
    align-items: center;
}

.ypl-current-player {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    transition: all 0.3s ease;
}

.ypl-player-presto {
    color: #999;
}

.ypl-player-youtube {
    color: #999;
}

/* 밝은 모드 플레이리스트 정보 스타일 */
.ypl-playlist-container.light-mode .ypl-playlist-info {
    color: #666;
}

.ypl-playlist-container.light-mode .ypl-revision-info {
    color: #999;
}

.ypl-playlist-container.light-mode .ypl-current-player {
    color: #888;
}

.ypl-playlist-container.light-mode .ypl-player-presto {
    color: #888;
}

.ypl-playlist-container.light-mode .ypl-player-youtube {
    color: #888;
}


/* 로딩 인디케이터 */
.ypl-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.ypl-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* 에러 메시지 */
.ypl-error-message,
.ypl-error {
    background: #4a1a1a;
    color: #ff6666;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* 플레이리스트 종료 */
.ypl-playlist-ended {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    background: #2a2a2a;
    padding: 40px;
}

.ypl-playlist-ended h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #fff;
}

.ypl-replay-btn {
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ypl-replay-btn:hover {
    background: #cc0000;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .ypl-playlist-container {
        flex-direction: column;
        /* 컨테이너 스크롤바 제거 - 브라우저 기본만 사용 */
        overflow-x: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .ypl-playlist-container::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    .ypl-player-box,
    .ypl-channel-box,
    .ypl-controls-box {
        margin-bottom: 0;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
        /* 재생창 관련 요소 스크롤바 제거 */
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .ypl-player-box::-webkit-scrollbar,
    .ypl-channel-box::-webkit-scrollbar,
    .ypl-controls-box::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    .ypl-playlist-sidebar {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 500px;
        order: 2;
        background: #2a2a2a;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
        position: relative; /* 스크롤 컨테이너 고정 */
    }
    
    .ypl-playlist-sidebar.active {
        max-height: 500px;
    }
    
    .ypl-playlist-sidebar.closed {
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        transition: max-height 0.3s ease, opacity 0.3s ease !important;
    }
    
    .ypl-playlist-header {
        padding: 4px 6px;
    }
    
    .ypl-playlist-items {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        max-height: 755px; /* 6개 항목이 보이도록 높이 조정 */
        overflow-y: auto;
        overflow-x: hidden;
        grid-template-columns: none !important;
        width: 100%;
        box-sizing: border-box;
        position: relative; /* 스크롤 컨테이너 고정 */
        -webkit-overflow-scrolling: touch; /* 모바일 터치 스크롤 최적화 */
        /* 플레이리스트 스크롤바 표시 */
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }
    
    .ypl-playlist-items::-webkit-scrollbar {
        width: 6px;
        display: block;
    }
    
    .ypl-playlist-items::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .ypl-playlist-items::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }
    
    .ypl-playlist-items::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
    
    .ypl-playlist-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        background: transparent;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
        min-height: 110px;
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .ypl-playlist-container .ypl-playlist-item .ypl-item-thumbnail {
        width: 128px !important;
        height: 72px !important;
        flex-shrink: 0;
        border-radius: 4px;
        max-width: 128px !important;
        min-width: 128px !important;
    }
    
    .ypl-item-title {
        font-size: 14px;
        line-height: 1.3;
        color: #fff;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 3px;
        flex: 1;
        min-width: 0;
        font-weight: 500;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .ypl-item-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        max-width: calc(100% - 182px);
        overflow: hidden;
    }
    
    
    .ypl-duration {
        font-size: 10px;
        padding: 2px 4px;
        font-weight: 500;
    }
    
    .ypl-view-count {
        font-size: 11px;
        color: #999;
        font-weight: 400;
    }
    
    .ypl-now-playing {
        position: absolute !important;
        top: 10px !important;
        right: 6px !important;
        font-size: 9px !important;
        z-index: 10 !important;
        white-space: nowrap !important;
    }
    
    
    /* 모바일에서도 플레이리스트 스크롤바 표시 (재생창 스크롤바는 제거) */
    /* 플레이리스트 스크롤바는 이미 위에서 설정됨 */
    
    /* 태블릿 영상 제목 폰트 크기 조정 */
    .ypl-video-title {
        font-size: 16px;
        line-height: 1.3;
        padding: 0 8px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin: 18px 0 15px 0;
    }
    
}

@media (max-width: 480px) {
    .ypl-playlist-header {
        padding: 6px 8px;
    }
    
    .ypl-playlist-header h4 {
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .ypl-playlist-items {
        max-height: 350px;
        padding: 6px;
        /* 모바일 터치 스크롤 개선 */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scroll-behavior: smooth;
        /* 터치 피드백 개선 */
        touch-action: pan-y;
        scroll-snap-type: y proximity;
        /* 스크롤바 표시 (모바일에서도 표시) */
        scrollbar-width: thin !important;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent !important;
        -ms-overflow-style: scrollbar !important;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .ypl-playlist-items::-webkit-scrollbar {
        display: block !important;
        width: 6px !important;
    }
    
    .ypl-playlist-items::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .ypl-playlist-items::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3) !important;
        border-radius: 3px;
    }
    
    .ypl-playlist-items::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5) !important;
    }
    
    .ypl-playlist-item {
        padding: 6px 8px;
        min-height: 95px;
        gap: 6px;
        background: transparent;
        width: 100%;
        box-sizing: border-box;
        /* 터치 피드백 */
        scroll-snap-align: start;
        transition: transform 0.1s ease, background-color 0.1s ease;
        cursor: default; /* 클릭 커서 제거 */
    }
    
    .ypl-playlist-item:active {
        /* 터치 피드백 제거 - 의도치 않은 선택 방지 */
        transform: none;
        background-color: transparent;
    }
    
    /* 모바일 재생 버튼 스타일 */
    .ypl-item-actions {
        margin-left: auto;
        flex-shrink: 0;
    }
    
    .ypl-play-item-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.3);
        pointer-events: auto; /* 재생 버튼은 클릭 가능 */
        min-width: 40px; /* 최소 터치 영역 보장 */
        min-height: 40px;
        touch-action: manipulation; /* 터치 최적화 */
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2); /* 터치 피드백 */
    }
    
    .ypl-play-item-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }
    
    .ypl-play-item-btn i {
        font-size: 12px;
    }
    
    /* 모바일 삭제 버튼 스타일 */
    .ypl-delete-item-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        background: rgba(220, 38, 38, 0.25);
        border: 1px solid rgba(220, 38, 38, 0.4);
        pointer-events: auto;
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(220, 38, 38, 0.2);
    }
    
    .ypl-delete-item-btn:hover {
        background: rgba(220, 38, 38, 0.35);
        transform: scale(1.05);
    }
    
    .ypl-delete-item-btn i {
        font-size: 12px;
    }
        user-select: none; /* 텍스트 선택 방지 */
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-tap-highlight-color: transparent; /* 모바일 탭 하이라이트 제거 */
    }
    
    .ypl-item-title {
        font-size: 15px;
        line-height: 1.4;
        font-weight: 500;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 5px;
    }
    
    .ypl-playlist-container .ypl-playlist-item .ypl-item-thumbnail {
        width: 80px !important;
        height: 45px !important;
        max-width: 80px !important;
        min-width: 80px !important;
    }
    
    .ypl-item-title {
        font-size: 14px;
        line-height: 1.3;
        font-weight: 500;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 4px;
    }
    
    
    .ypl-duration {
        font-size: 9px;
        padding: 2px 3px;
        font-weight: 500;
    }
    
    .ypl-view-count {
        font-size: 10px;
        font-weight: 400;
    }
    
    .ypl-now-playing {
        position: absolute !important;
        top: 8px !important;
        right: 4px !important;
        font-size: 8px !important;
        z-index: 10 !important;
        white-space: nowrap !important;
    }
    
    /* 모바일 플레이리스트 정보 스타일 */
    .ypl-playlist-info {
        flex-direction: row;
        gap: 5px;
        text-align: center;
        flex-wrap: wrap;
    }
    
    .ypl-video-count-info,
    .ypl-player-info {
        justify-content: center;
    }
    
    .ypl-current-player {
        font-size: 10px;
        color: #999;
    }
    
    .ypl-control-btn {
        padding: 6px 8px;
        min-width: 29px;
        height: 26px;
        border-radius: 4px;
    }
    
    .ypl-control-btn i {
        font-size: 13px;
        width: 13px;
        height: 13px;
    }
    
    .ypl-playlist-toggle-btn {
        padding: 7px 11px;
        font-size: 11px;
        min-height: 26px;
        border-radius: 5px;
    }
    
    /* 모바일 채널 정보 */
    .ypl-channel-info {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        margin-bottom: 6px;
        min-height: 50px;
    }
    
    .ypl-channel-avatar {
        width: 40px;
        height: 40px;
    }
    
    .ypl-channel-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .ypl-channel-name {
        font-size: 14px;
    }
    
    .ypl-channel-subscribers {
        font-size: 11px;
    }
    
    .ypl-channel-button {
        display: none;
    }
    
    .ypl-channel-arrow {
        width: 18px;
        height: 18px;
        font-size: 12px;
    }
    
    .ypl-channel-link::after {
        width: 28px;
        height: 28px;
        font-size: 12px;
        background: rgba(0, 123, 255, 0.7);
        border-radius: 50%;
        color: #fff;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .ypl-channel-placeholder {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* 매우 작은 모바일 화면 전체화면 강화 */
@media only screen and (max-width: 480px) {
    /* 재생창만 전체화면 */
    .ypl-player-box,
    .ypl-player-container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* 모든 요소를 전체 가로폭으로 설정 */
    .ypl-playlist-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        position: relative;
        left: auto !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
    }
    
    .ypl-current-video-info {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
    
    /* 480px 이하에서 모든 박스 전체 가로폭 설정 */
    .ypl-controls-box,
    .ypl-channel-box,
    .ypl-playlist-sidebar {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-radius: 0 !important;
    }
    
    .ypl-player-container {
        padding-bottom: 56.25% !important;
    }
    
    /* 480px 이하에서 재생창 내부 영상 요소들 전체 크기 */
    .ypl-player-container iframe,
    .ypl-player-container video,
    .ypl-player-container object,
    .ypl-player-container embed,
    .ypl-player-container > *,
    .ypl-video-thumbnail,
    .ypl-play-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 56.25vw !important;
        max-width: 100vw !important;
        max-height: 56.25vw !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        transform: none !important;
    }
    
    .ypl-channel-link {
        flex-direction: row;
        justify-content: flex-start;
        max-width: 100%;
    }
    
    .ypl-channel-details {
        max-width: 100%;
    }
    
    .ypl-channel-button-container {
        display: none;
    }
    
    .ypl-channel-arrow {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
    
    /* 480px 이하에서 채널 버튼 제거 */
    .ypl-channel-button {
        display: none;
    }
    
    .ypl-channel-arrow {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
    
    .ypl-channel-link::after {
        width: 24px;
        height: 24px;
        font-size: 10px;
        background: rgba(0, 123, 255, 0.7);
        border-radius: 50%;
        color: #fff;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    /* 모바일 영상 제목 폰트 크기 조정 */
    .ypl-video-title {
        font-size: 14px;
        line-height: 1.3;
        padding: 0 6px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin: 16px 0 15px 0;
    }
    
    /* 모바일 채널 정보 조정 */
    .ypl-video-channel-info {
        margin-bottom: 12px;
        padding: 4px 0;
    }
    
    .ypl-channel-avatar-small {
        width: 36px;
        height: 36px;
    }
    
    .ypl-channel-name-small {
        font-size: 15px;
    }
    
    .ypl-channel-handle-small {
        font-size: 13px;
    }
    
    .ypl-channel-placeholder-small {
        font-size: 14px;
    }
    
    /* 모바일 채널 링크 스타일 */
    .ypl-channel-link-small {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        touch-action: manipulation;
    }
    
    .ypl-channel-link-small:active {
        background: rgba(255, 255, 255, 0.15);
        transform: scale(0.98);
    }
    
}

/* ========================================
   LIGHT MODE STYLES (기존 다크 모드 보존)
   ======================================== */

/* 밝은 모드 컨테이너 */
.ypl-playlist-container.light-mode {
    /* 기본 설정 유지 */
}

/* 밝은 모드 재생창 박스 */
.ypl-playlist-container.light-mode .ypl-player-box {
    background: #ffffff;
    border: none;
    box-shadow: none;
}

/* 밝은 모드 재생설정 박스 */
.ypl-playlist-container.light-mode .ypl-controls-box {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 14px 25px;
    min-height: 58px;
    overflow: visible;
}

/* 밝은 모드 채널정보 박스 */
.ypl-playlist-container.light-mode .ypl-channel-box {
    background: #ffffff;
    border: none;
    box-shadow: none;
}

/* 밝은 모드 플레이어 컨테이너 */
.ypl-playlist-container.light-mode .ypl-player-container {
    background: #000; /* 플레이어는 검은색 유지 */
}

/* 밝은 모드 플레이어 컨트롤 */
.ypl-playlist-container.light-mode .ypl-player-controls {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333333;
    gap: 12px;
    padding: 11px;
    min-height: 43px;
    margin: 10px 0;
}

/* 밝은 모드 버튼들 */
.ypl-playlist-container.light-mode .ypl-control-btn {
    color: #333333;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 7px 10px;
    min-width: 32px;
    height: 29px;
    border-radius: 5px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ypl-playlist-container.light-mode .ypl-control-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ypl-playlist-container.light-mode .ypl-control-btn.active {
    background: #007cba;
    color: #ffffff;
    border: 1px solid #0056b3;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.4);
    font-weight: 600;
}


/* 밝은 모드 재생/일시정지 버튼 */
.ypl-playlist-container.light-mode .ypl-play-pause-btn {
    color: #333333;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ypl-playlist-container.light-mode .ypl-play-pause-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 밝은 모드 이전/다음 버튼 */
.ypl-playlist-container.light-mode .ypl-prev-btn,
.ypl-playlist-container.light-mode .ypl-next-btn {
    color: #333333;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ypl-playlist-container.light-mode .ypl-prev-btn:hover,
.ypl-playlist-container.light-mode .ypl-next-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 밝은 모드 플레이리스트 토글 버튼 */
.ypl-playlist-container.light-mode .ypl-playlist-toggle-btn {
    background: #f8f9fa;
    color: #333333;
    border: 1px solid #dee2e6;
    padding: 9px 13px;
    font-size: 13px;
    min-height: 29px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ypl-playlist-container.light-mode .ypl-playlist-toggle-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ypl-playlist-container.light-mode .ypl-playlist-toggle-btn.active {
    background: #007cba;
    color: #ffffff;
    border: 1px solid #0056b3;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.4);
    font-weight: 600;
}

/* 밝은 모드 재생 버튼 */
.ypl-playlist-container.light-mode .ypl-play-item-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #333333;
}

.ypl-playlist-container.light-mode .ypl-play-item-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.4);
    color: #000000;
}

/* 밝은 모드 삭제 버튼 */
.ypl-playlist-container.light-mode .ypl-delete-item-btn {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

.ypl-playlist-container.light-mode .ypl-delete-item-btn:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: #dc2626;
    color: #ef4444;
}
}

/* 밝은 모드 플레이리스트 사이드바 */
.ypl-playlist-container.light-mode .ypl-playlist-sidebar {
    background: #ffffff;
    border-left: none;
    box-shadow: none;
}

/* 밝은 모드 플레이리스트 헤더 */
.ypl-playlist-container.light-mode .ypl-playlist-header {
    background: transparent;
    border-bottom: none;
    color: #333333;
}

.ypl-playlist-container.light-mode .ypl-playlist-header h4 {
    color: #333333;
}

/* 밝은 모드 플레이리스트 아이템 */
.ypl-playlist-container.light-mode .ypl-playlist-item {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    color: #333333 !important;
}

.ypl-playlist-container.light-mode .ypl-playlist-item:hover {
    background: #f8f9fa;
}

.ypl-playlist-container.light-mode .ypl-playlist-item.active,
.ypl-playlist-container.light-mode .ypl-playlist-item.current-playing,
.ypl-playlist-container.light-mode .ypl-playlist-item.ypl-active {
    background: #e3f2fd !important;
    border-left: 4px solid #007cba !important;
    color: #333333 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3) !important;
    position: relative;
}

/* 밝은 모드 강화된 하이라이트 스타일 */
.ypl-playlist-container.light-mode .ypl-playlist-item.active::before,
.ypl-playlist-container.light-mode .ypl-playlist-item.current-playing::before,
.ypl-playlist-container.light-mode .ypl-playlist-item.ypl-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #007cba 0%, #005a8b 100%);
    border-radius: 0 2px 2px 0;
}

/* 밝은 모드 재생 중 표시 강화 */
.ypl-playlist-container.light-mode .ypl-now-playing {
    position: absolute !important;
    top: 12px !important;
    right: 8px !important;
    background: #007cba !important;
    color: #ffffff !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 10 !important;
    animation: pulse 2s infinite !important;
    white-space: nowrap !important;
}

/* 밝은 모드 재생 아이콘 스타일 */
.ypl-playlist-container.light-mode .ypl-play-icon {
    color: #ff0000 !important;
    font-size: 16px !important;
    margin-right: 8px !important;
    animation: bounce 1s infinite !important;
}

.ypl-playlist-container.light-mode .ypl-playlist-item.played {
    background: #f5f5f5;
    color: #444444;
}

.ypl-playlist-container.light-mode .ypl-playlist-item.played .ypl-item-title {
    color: #444444;
}

/* 밝은 모드 플레이리스트 아이템 제목 */
.ypl-playlist-container.light-mode .ypl-item-title {
    color: #222222;
    font-weight: 500;
}

.ypl-playlist-container.light-mode .ypl-playlist-item:hover .ypl-item-title {
    color: #007cba;
}

/* 밝은 모드 현재 재생 표시 - 위의 강화된 스타일 사용 */

/* 밝은 모드 진행률 바 */
.ypl-playlist-container.light-mode .ypl-progress-bar {
    background: transparent;
}

.ypl-playlist-container.light-mode .ypl-progress-fill {
    background: transparent;
}

/* 밝은 모드 비디오 정보 */
.ypl-playlist-container.light-mode .ypl-current-video-info {
    background: #f5f5f5;
}

.ypl-playlist-container.light-mode .ypl-video-title {
    color: #222222;
    font-weight: 600;
}

/* 밝은 모드 - 설명 토글 버튼 */
.ypl-playlist-container.light-mode .ypl-description-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 11px;
    font-weight: 500;
}

.ypl-playlist-container.light-mode .ypl-description-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: #333;
}

.ypl-playlist-container.light-mode .ypl-description-toggle-btn i {
    font-size: 10px;
}

.ypl-playlist-container.light-mode .ypl-description-toggle-btn.expanded::after {
    font-size: 11px;
    font-weight: 500;
}

/* 밝은 모드 - 비디오 설명 */
.ypl-playlist-container.light-mode .ypl-video-description {
    color: #333333;
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

/* 밝은 모드 채널 정보 */
.ypl-playlist-container.light-mode .ypl-channel-info {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    min-height: 60px;
    padding: 12px 15px;
    gap: 15px;
}

.ypl-playlist-container.light-mode .ypl-channel-link {
    color: #333333;
    gap: 15px;
    padding: 5px;
    max-width: 70%;
}

.ypl-playlist-container.light-mode .ypl-channel-link:hover {
    background: #f8f9fa;
}

.ypl-playlist-container.light-mode .ypl-channel-name {
    color: #222222;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
}

.ypl-playlist-container.light-mode .ypl-channel-subscribers {
    color: #444444;
    font-size: 12px;
    line-height: 1.3;
}

.ypl-playlist-container.light-mode .ypl-channel-avatar {
    width: 48px;
    height: 48px;
}

.ypl-playlist-container.light-mode .ypl-channel-thumbnail {
    width: 48px;
    height: 48px;
}

.ypl-playlist-container.light-mode .ypl-channel-details {
    max-width: 60%;
    gap: 4px;
}

/* 밝은 모드 채널로 가기 버튼 제거 */
.ypl-playlist-container.light-mode .ypl-channel-button-container {
    display: none;
}

.ypl-playlist-container.light-mode .ypl-channel-button {
    display: none;
}

.ypl-playlist-container.light-mode .ypl-channel-arrow {
    color: #666;
}

.ypl-playlist-container.light-mode .ypl-channel-link:hover .ypl-channel-arrow {
    color: #333;
    transform: translateX(2px);
}

.ypl-playlist-container.light-mode .ypl-channel-link::after {
    background: rgba(0, 123, 255, 0.7);
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ypl-playlist-container.light-mode .ypl-channel-link:hover::after {
    background: rgba(0, 86, 179, 0.9);
    transform: translateX(2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* 라이트 모드 모바일 채널 버튼 제거 */
@media (max-width: 768px) {
    .ypl-playlist-container.light-mode .ypl-channel-button {
        display: none;
    }
    
    .ypl-playlist-container.light-mode .ypl-channel-arrow {
        width: 18px;
        height: 18px;
        font-size: 12px;
        color: #666;
    }
    
    .ypl-playlist-container.light-mode .ypl-channel-link::after {
        width: 28px;
        height: 28px;
        font-size: 12px;
        background: rgba(0, 123, 255, 0.7);
        border-radius: 50%;
        color: #fff;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
}

@media (max-width: 480px) {
    .ypl-playlist-container.light-mode .ypl-channel-button {
        display: none;
    }
    
    .ypl-playlist-container.light-mode .ypl-channel-arrow {
        width: 16px;
        height: 16px;
        font-size: 10px;
        color: #666;
    }
    
    .ypl-playlist-container.light-mode .ypl-channel-link::after {
        width: 24px;
        height: 24px;
        font-size: 10px;
        background: rgba(0, 123, 255, 0.7);
        border-radius: 50%;
        color: #fff;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
}

.ypl-playlist-container.light-mode .ypl-channel-placeholder {
    width: 48px;
    height: 48px;
    font-size: 20px;
}


/* 밝은 모드 상태 오버레이 */
.ypl-playlist-container.light-mode .ypl-status-overlay {
    background: rgba(255, 255, 255, 0.95);
    color: #333333;
    border: 1px solid #e0e0e0;
}

.ypl-playlist-container.light-mode .ypl-status-icon {
    color: #007cba;
}

/* 플레이 모드 상태 */
.ypl-play-mode-status {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

/* 밝은 모드 플레이 모드 상태 */
.ypl-playlist-container.light-mode .ypl-play-mode-status {
    color: #333333;
}

/* 밝은 모드 카운터 */
.ypl-playlist-container.light-mode .ypl-current-index {
    color: #333333;
}

.ypl-playlist-container.light-mode .ypl-video-count {
    color: #333333;
}

/* 밝은 모드 플레이리스트 아이템 메타 정보 */
.ypl-playlist-container.light-mode .ypl-item-info {
    color: #444444;
}

.ypl-playlist-container.light-mode .ypl-item-info span {
    color: #444444;
}

.ypl-playlist-container.light-mode .ypl-duration {
    color: #333333;
    background: rgba(0, 0, 0, 0.8);
}

/* 밝은 모드 재생 완료 화면 */
.ypl-playlist-container.light-mode .ypl-playlist-ended {
    background: #ffffff;
    color: #333333;
    border: 1px solid #e0e0e0;
}

.ypl-playlist-container.light-mode .ypl-replay-btn {
    background: #007cba;
    color: #ffffff;
    border: 1px solid #007cba;
}

.ypl-playlist-container.light-mode .ypl-replay-btn:hover {
    background: #005a87;
    border-color: #005a87;
}

/* 밝은 모드 에러 상태 */
.ypl-playlist-container.light-mode .ypl-channel-error {
    background: #fff5f5;
    border-color: #ff6b6b;
}

.ypl-playlist-container.light-mode .ypl-channel-error .ypl-channel-name {
    color: #d63031;
}

.ypl-playlist-container.light-mode .ypl-channel-error .ypl-channel-subscribers {
    color: #ff6b6b;
}


/* 밝은 모드 로딩 상태 */
.ypl-playlist-container.light-mode .ypl-channel-loading {
    background: #f8f9fa;
}

.ypl-playlist-container.light-mode .ypl-channel-loading .ypl-channel-name {
    color: #666666;
}

/* 밝은 모드 플레이스홀더 */
.ypl-playlist-container.light-mode .ypl-player-placeholder {
    background: #f8f9fa;
    color: #666666;
    border: 1px solid #e0e0e0;
}

/* 밝은 모드 큰 재생 버튼 */
.ypl-playlist-container.light-mode .ypl-big-play-button {
    background: rgba(0, 124, 186, 0.9);
    color: #ffffff;
    border: 2px solid #ffffff;
}

.ypl-playlist-container.light-mode .ypl-big-play-button:hover {
    background: rgba(0, 124, 186, 1);
    transform: scale(1.1);
}

/* 밝은 모드 모바일 토글 */
.ypl-playlist-container.light-mode .ypl-mobile-playlist-toggle {
    background: #f8f9fa;
    color: #333333;
    border: 1px solid #e0e0e0;
}

.ypl-playlist-container.light-mode .ypl-mobile-playlist-toggle:hover {
    background: #e9ecef;
}

/* 테마 토글 버튼 */
.ypl-theme-toggle-btn {
    position: relative;
}

.ypl-theme-toggle-btn i {
    transition: all 0.3s ease;
}

.ypl-theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* 밝은 모드 테마 토글 버튼 */
.ypl-playlist-container.light-mode .ypl-theme-toggle-btn {
    color: #333333;
    background: transparent;
    border: none;
}

.ypl-playlist-container.light-mode .ypl-theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border: none;
}

/* 자동 테마 아이콘 애니메이션 */
.ypl-theme-toggle-btn [data-theme="auto"] {
    animation: auto-theme-pulse 2s infinite;
}

@keyframes auto-theme-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 자동 테마 모드일 때 버튼 스타일 */
.ypl-theme-toggle-btn.auto-mode {
    border: none;
    background: rgba(0, 124, 186, 0.1);
}

.ypl-theme-toggle-btn.auto-mode:hover {
    background: rgba(0, 124, 186, 0.2);
}

/* 밝은 모드 반응형 설정 */
@media only screen and (max-width: 768px) {
    .ypl-playlist-container.light-mode .ypl-player-box {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    
    .ypl-playlist-container.light-mode .ypl-controls-box {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0;
        border: none;
        background: transparent;
        box-shadow: none;
    }
    
    .ypl-playlist-container.light-mode .ypl-channel-box {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    
    .ypl-playlist-container.light-mode .ypl-playlist-sidebar {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0;
        box-shadow: none;
    }
}

/* 알림 시스템 스타일 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.ypl-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.ypl-notification {
    margin-bottom: 10px;
    border-radius: 4px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

.ypl-notification-fade-out {
    animation: slideOut 0.3s ease-in;
}

.ypl-notification-icon {
    margin-right: 8px;
    font-weight: bold;
}

.ypl-notification-message {
    flex: 1;
}

.ypl-notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-left: 8px;
    padding: 0;
    line-height: 1;
}

.ypl-notification-close:hover {
    opacity: 0.7;
}

/* 반응형 알림 */
@media (max-width: 768px) {
    .ypl-notifications {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* 모바일 스크롤 안내 메시지 제거됨 */

/* fadeInOut 애니메이션 제거됨 */
