.yvp-container {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.yvp-layout-right {
    flex-direction: row;
}

.yvp-layout-left {
    flex-direction: row-reverse;
}

.yvp-main-video {
    flex: 3;
    padding: 20px;
    min-width: 0; /* Important for responsive iframe */
}

.yvp-playlist {
    flex: 1;
    background: #f9f9f9;
    border-left: 1px solid #eee;
    padding: 20px;
    min-width: 300px;
}

.yvp-layout-left .yvp-playlist {
    border-left: none;
    border-right: 1px solid #eee;
}

/* تحسينات للفيديو الرئيسي لجعله متجاوباً */
.yvp-video-wrapper {
    width: 100%;
    margin-bottom: 15px;
}

.yvp-responsive-iframe {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.yvp-responsive-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: none;
}

.yvp-video-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #333;
    line-height: 1.3;
}

.yvp-video-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.yvp-video-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #888;
}

.yvp-publish-date {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
}

.yvp-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.yvp-playlist-title {
    margin: 0;
    font-size: 1.1em;
    color: #333;
    border-bottom: 2px solid #e62117;
    padding-bottom: 8px;
}

.yvp-refresh-btn {
    background: #e62117;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.yvp-refresh-btn:hover {
    background: #cc0000;
    transform: rotate(90deg);
}

.yvp-refresh-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.yvp-playlist-items {
    max-height: 500px;
    overflow-y: auto;
}

.yvp-playlist-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.yvp-playlist-item:hover {
    background: #f8f8f8;
    transform: translateX(5px);
    border-color: #ddd;
}

.yvp-layout-left .yvp-playlist-item:hover {
    transform: translateX(-5px);
}

.yvp-playlist-item.active {
    background: #e3f2fd;
    border-color: #2196f3;
}

.yvp-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 68px;
}

.yvp-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.yvp-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yvp-playlist-item:hover .yvp-play-icon {
    opacity: 1;
}

.yvp-duration-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 3px;
}

.yvp-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.yvp-item-title {
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

.yvp-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    font-size: 11px;
    color: #666;
}

.yvp-item-views {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.yvp-item-date {
    color: #888;
}

.yvp-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.yvp-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e62117;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: yvp-spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .yvp-container {
        flex-direction: column;
    }
    
    .yvp-layout-right,
    .yvp-layout-left {
        flex-direction: column;
    }
    
    .yvp-playlist {
        border-left: none;
        border-right: none;
        border-top: 1px solid #eee;
        min-width: auto;
    }
    
    .yvp-playlist-item:hover {
        transform: none;
    }
    
    .yvp-main-video {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .yvp-container {
        margin: 10px 0;
        border-radius: 4px;
    }
    
    .yvp-main-video,
    .yvp-playlist {
        padding: 12px;
    }
    
    .yvp-video-info h3 {
        font-size: 1.1em;
    }
    
    .yvp-thumbnail {
        width: 100px;
        height: 60px;
    }
    
    .yvp-playlist-item {
        padding: 10px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .yvp-thumbnail {
        width: 80px;
        height: 50px;
    }
    
    .yvp-item-title {
        font-size: 12px;
        -webkit-line-clamp: 3;
    }
    
    .yvp-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

/* Scrollbar styling */
.yvp-playlist-items::-webkit-scrollbar {
    width: 6px;
}

.yvp-playlist-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.yvp-playlist-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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