/* YouTube Playlist Layout */
.youtube-playlist-container {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 1400px;
    margin: 20px auto;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

/* Sidebar con lista de videos */
.youtube-playlist-sidebar {
    width: 400px;
    min-width: 400px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.playlist-header {
	display:none;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.playlist-title {
    font-size: 18px;
    font-weight: 600;
    color: #030303;
    margin: 0 0 4px 0;
}

.playlist-count {
    font-size: 13px;
    color: #606060;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
}

.playlist-item {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.playlist-item:hover {
    background: #f5f5f5;
}

/* CAMBIO REALIZADO AQUÍ: Color de fondo y borde activo */
.playlist-item.active {
    background: rgba(184, 150, 126, 0.15); /* Versión transparente de #B8967E */
    border-left: 3px solid #B8967E; /* Borde sólido #B8967E */
}

.playlist-item-thumbnail {
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 68px;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

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

.playlist-item-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 500;
}

.playlist-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.playlist-item-title {
    font-size: 14px !important;
    font-weight: 500;
    color: #030303;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CAMBIO REALIZADO AQUÍ: Color del texto del título activo */
.playlist-item.active .playlist-item-title {
    color: #B8967E;
}

/* Video principal */
.youtube-main-player {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 16px;
}

.main-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.main-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.main-player-info {
    padding: 0 4px;
}

.main-player-title {
    font-size: 20px;
    font-weight: 600;
    color: #030303;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.main-player-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #606060;
    font-size: 14px;
}

.video-date {
    color: #606060;
}

/* Scrollbar personalizado para la playlist */
.playlist-items::-webkit-scrollbar {
    width: 8px;
}

.playlist-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .youtube-playlist-container {
        flex-direction: column;
    }
    
    .youtube-playlist-sidebar {
        width: 100%;
        min-width: 100%;
        order: 2;
        border-right: none;
        border-top: 1px solid #e0e0e0;
    }
    
    .youtube-main-player {
        order: 1;
    }
    
    .playlist-items {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .youtube-playlist-container {
        margin: 10px;
        border-radius: 4px;
    }
    
    .playlist-item-thumbnail {
        width: 100px;
        min-width: 100px;
        height: 56px;
    }
    
    .playlist-item-title {
        font-size: 13px;
    }
    
    .main-player-title {
        font-size: 18px;
    }
    
    .youtube-main-player {
        padding: 12px;
    }
    
    .playlist-items {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .youtube-playlist-sidebar {
        width: 100%;
    }
    
    .playlist-item {
        padding: 6px 10px;
    }
    
    .playlist-item-thumbnail {
        width: 80px;
        min-width: 80px;
        height: 45px;
    }
    
    .playlist-item-title {
        font-size: 12px;
        -webkit-line-clamp: 3;
    }
    
    .main-player-title {
        font-size: 16px;
    }
}