.youtube-section {
    padding: 2rem 0;
}

.youtube-intro {
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 1rem;
    background-color: #fff;
}

.video-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    grid-column: 1 / -1;
}

.api-key-notice {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.api-key-notice h3 {
    color: #dc3545;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.api-key-notice ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.api-key-notice li {
    margin-bottom: 0.5rem;
}

.api-key-notice a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.api-key-notice a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .youtube-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .youtube-grid {
        grid-template-columns: 1fr;
    }
}