/* YouTube Sync Plugin Styles */

.youtube-sync-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.youtube-sync-error {
    background: #fee;
    border: 2px solid #c33;
    color: #c33;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

/* Filtry */
.youtube-sync-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f5f5f5;
    border: 2px solid #ddd;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: #e8e8e8;
    border-color: #c33;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #c33;
    color: white;
    border-color: #c33;
}

.filter-btn .icon {
    font-size: 20px;
}

/* Statystyki */
.youtube-sync-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Grid filmów */
.youtube-sync-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.youtube-sync-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.youtube-sync-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.youtube-sync-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

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

.video-card.type-short::before {
    content: "🎞️ SHORT";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #c33;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-card:hover .video-play-overlay {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.video-content {
    padding: 20px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #888;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.video-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-stats {
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Load More */
.youtube-sync-load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    background: #c33;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #a22;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(204, 51, 51, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .youtube-sync-grid {
        grid-template-columns: 1fr !important;
    }

    .youtube-sync-stats {
        grid-template-columns: 1fr;
    }

    .filter-btn {
        font-size: 14px;
        padding: 10px 18px;
    }
}

/* Modal dla odtwarzania */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 36px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.video-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}
