/* Playlist Buttons */
.yvg-playlist-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.yvg-playlist-buttons button {
    font-size: var(--wp--preset--font-size--small);
    color: grey;
    border: 1px solid grey;
    border-radius: 16px;
    cursor: pointer;
    line-height: 1.5;
    padding: 0.2rem 0.6rem;
    transition: all 0.3s;
    background: #000;
}
.yvg-playlist-buttons button:hover {
    border-color: #fff;
    color: #fff;
}
.yvg-playlist-buttons button.active {
    border-color: #fff;
    color: #fff;
}

/* Playlist Beschreibung */
.yvg-playlist-description {
    margin-bottom: 20px;
    font-size: var(--wp--preset--font-size--large);
    color: #ccc;
    line-height: 1.4;
}

/* Grid */
.yvg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.yvg-item {
    position: relative;
    aspect-ratio: 21/11;
    overflow: hidden;
    cursor: pointer;
}
.yvg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play Icon Overlay */
.yvg-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.yvg-play-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent white;
    pointer-events: none;
}
.yvg-item:hover .yvg-play-icon {
    transform: translate(-50%, -50%) scale(1.2);
    background: rgba(0,0,0,0.7);
}

/* Video Overlay */
#yvg-video-container {
    margin: 0!important;
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#yvg-video-container.active { 
    display: flex; 
    opacity: 1; 
}
#yvg-video-iframe {
    width: 80%; 
    height: 80%;
    opacity: 0;
    background: black;
    transition: opacity 1s ease;
}
#yvg-video-iframe.loaded { opacity: 1; }

/* Schließen (X) */
#yvg-video-close {
    position: absolute;
    top: 20px; right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Eigener Zurück-Button */
#yvg-video-back {
    position: absolute;
    top: 20px; left: 40px;
    font-size: var(--wp--preset--font-size--small);
    color: white;
    background: transparent;
    border: 1px solid white;
    border-radius: 16px;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
}
#yvg-video-back:hover {
    background: rgba(255,255,255,0.2);
}

/* Mehr laden Button */
#yvg-load-more {
    display: block;
    margin: 40px auto;
    padding: 0.2rem 0.6rem;
    font-size: var(--wp--preset--font-size--small);
    color: grey;
    border: 1px solid grey;
    border-radius: 16px;
    cursor: pointer;
    line-height: 1.5;
    background: #000;
    transition: all 0.3s;
}
#yvg-load-more:hover {
    border-color: #fff;
    color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
    .yvg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .yvg-grid { grid-template-columns: 1fr; }
}
