/* YouTube Video Fetcher - Modern Frontend Styles */
.yvf-videos {
    margin: 20px 0;
    width: 100%;
}

/* Grid Layout */
.yvf-layout-grid {
    display: grid;
    gap: 25px;
}

.yvf-layout-grid.yvf-columns-1 {
    grid-template-columns: repeat(1, 1fr);
}
.yvf-layout-grid.yvf-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}
.yvf-layout-grid.yvf-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}
.yvf-layout-grid.yvf-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Column Layout */
.yvf-layout-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Video Card */
.yvf-video {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eef2f6;
}

.yvf-video:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.yvf-video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
}

.yvf-video p {
    padding: 14px 16px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #1a2c3e;
    background: #ffffff;
    border-top: 1px solid #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* Load More Button */
#yvf-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 30px 0 20px;
}

#yvf-load-more:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, #e60000 0%, #b30000 100%);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

#yvf-load-more:active {
    transform: scale(0.98);
}

#yvf-load-more.loading {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* Loading Spinner */
#yvf-load-more.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: yvf-spin 0.6s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes yvf-spin {
    to { transform: rotate(360deg); }
}

/* No more videos message */
.yvf-no-more {
    text-align: center;
    padding: 20px;
    color: #6c7a8a;
    font-size: 14px;
    border-top: 1px solid #eef2f6;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .yvf-layout-grid.yvf-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .yvf-layout-grid.yvf-columns-2,
    .yvf-layout-grid.yvf-columns-3,
    .yvf-layout-grid.yvf-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .yvf-video p {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .yvf-layout-grid.yvf-columns-1,
    .yvf-layout-grid.yvf-columns-2,
    .yvf-layout-grid.yvf-columns-3,
    .yvf-layout-grid.yvf-columns-4 {
        grid-template-columns: 1fr;
    }
    
    #yvf-load-more {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Fade-in animation for new videos */
.yvf-video {
    animation: yvf-fadeIn 0.4s ease-out;
}

@keyframes yvf-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty state styling */
.yvf-videos:empty::before {
    content: "No videos available";
    display: block;
    text-align: center;
    padding: 50px 20px;
    background: #f8fafc;
    border-radius: 12px;
    color: #6c7a8a;
    font-size: 14px;
}