/* --- Playlist Gallery Styles --- */
#ypg-playlist-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
}
.ypg-playlist-card {
    background-color: #ffffff;
    border-radius: 0;
    border: 1px solid #ddd; /* Color is controlled by inline style */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: inherit;
}
.ypg-playlist-card:hover {
    background-color: #efefef;
}
.ypg-playlist-card .thumbnail-container {
    display: block;
    position: relative;
}
.ypg-playlist-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.ypg-playlist-card .thumbnail-container::after {
    content: '►';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    color: white;
    background-color: rgba(0,0,0,0.4);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ypg-playlist-card:hover .thumbnail-container::after {
    opacity: 1;
}
.ypg-video-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ypg-video-count svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.ypg-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.ypg-card-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #050505;
}
.ypg-card-content p {
    margin: 0;
    font-size: 0.95rem;
    color: #606770;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Latest Videos Player Styles --- */
#ypg-video-player-wrapper {
    width: 100%;
    margin: 0 auto;
}
.ypg-video-player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border: 1px solid #ddd; /* Color is controlled by inline style */
    background-color: #000;
}
.ypg-video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.ypg-player-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    opacity: 1; /* <-- CHANGED: Arrows are now always visible */
}
.ypg-player-nav.prev {
    left: 15px;
}
.ypg-player-nav.next {
    right: 15px;
}
.ypg-video-title-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-top: 1rem;
    padding: 0 1rem;
}

/* --- Mobile Adjustments for Player Arrows --- */
@media (max-width: 768px) {
    .ypg-player-nav {
        width: 40px;
        height: 40px;
    }
    .ypg-player-nav.prev {
        left: 10px;
    }
    .ypg-player-nav.next {
        right: 10px;
    }
}


/* --- General Helper Styles --- */
.ypg-message-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
}
.ypg-loader {
    border: 5px solid #e0e0e0;
    border-top: 5px solid #c4302b;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: ypg-spin 1.2s linear infinite;
    margin: 0 auto;
}
@keyframes ypg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.ypg-error-message {
    color: #d32f2f;
    font-weight: 500;
}
