.wp-ytcf-container {
    max-width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
    clear: both !important;
    overflow: hidden !important;
}

.ytcf-channel-block {
    margin: 40px auto !important;
    max-width: 1100px !important;
    border: 2px solid #ccc !important;
    border-radius: 12px !important;
    padding: 24px !important;
    background: #fafafa !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    text-align: center !important;
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
}

.ytcf-channel-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.ytcf-big-player {
    margin-bottom: 30px;
    text-align: center;
}

.ytcf-big-player iframe {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.ytcf-video-title {
    font-size: 1.3em;
    margin: 8px 0 2px 0;
    text-align: center;
    color: #333;
    font-weight: 500;
}

.ytcf-video-date {
    font-size: 1em;
    color: #666;
    text-align: center;
}

.ytcf-thumb-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Dynamische Anzahl pro Reihe basierend auf max_videos */
.ytcf-thumb-row[data-max-per-row="1"] .ytcf-thumb:nth-child(n+2) {
    display: none;
}

.ytcf-thumb-row[data-max-per-row="2"] {
    max-width: 500px;
    margin: 20px auto 0;
}

.ytcf-thumb-row[data-max-per-row="3"] {
    max-width: 750px;
    margin: 20px auto 0;
}

.ytcf-thumb-row[data-max-per-row="4"] {
    max-width: 1000px;
    margin: 20px auto 0;
}

.ytcf-thumb-row[data-max-per-row="5"] .ytcf-thumb:nth-child(n+6),
.ytcf-thumb-row[data-max-per-row="6"] .ytcf-thumb:nth-child(n+7),
.ytcf-thumb-row[data-max-per-row="7"] .ytcf-thumb:nth-child(n+8),
.ytcf-thumb-row[data-max-per-row="8"] .ytcf-thumb:nth-child(n+9) {
    margin-top: 24px;
}

/* Responsive Grid für mehr als 4 Thumbnails */
@media (min-width: 1200px) {
    .ytcf-thumb-row[data-max-per-row="5"],
    .ytcf-thumb-row[data-max-per-row="6"],
    .ytcf-thumb-row[data-max-per-row="7"],
    .ytcf-thumb-row[data-max-per-row="8"] {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
        justify-items: center;
    }
}

@media (max-width: 1199px) and (min-width: 768px) {
    .ytcf-thumb-row[data-max-per-row="5"],
    .ytcf-thumb-row[data-max-per-row="6"],
    .ytcf-thumb-row[data-max-per-row="7"],
    .ytcf-thumb-row[data-max-per-row="8"] {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        justify-items: center;
    }
}

.ytcf-thumb {
    width: 220px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ytcf-thumb:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.ytcf-thumb img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s ease;
}

.ytcf-thumb:hover img {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.ytcf-thumb-title {
    font-size: 1em;
    margin: 6px 0 0 0;
    color: #333;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ytcf-channel-block {
        margin: 20px 10px;
        padding: 16px;
    }
    
    .ytcf-channel-title {
        font-size: 1.5em;
    }
    
    .ytcf-big-player iframe {
        width: 95vw;
        height: 53vw;
        text-align: center;
    }
    
    .ytcf-thumb-row {
        gap: 16px;
    }
    
    .ytcf-thumb {
        width: 180px;
    }
    
    .ytcf-video-title {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .ytcf-thumb-row {
        flex-direction: column;
        align-items: center;
    }
    
    .ytcf-thumb {
        width: 250px;
        max-width: 90vw;
    }
    
    .ytcf-channel-title {
        font-size: 1.3em;
    }
}

/* Loading Animation */
.ytcf-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.ytcf-loading::after {
    content: '...';
    animation: ytcf-dots 1.5s steps(3, end) infinite;
}

@keyframes ytcf-dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #666;
        text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow: .25em 0 0 #666, .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow: .25em 0 0 #666, .5em 0 0 #666;
    }
}
