/* GitHub Galeri Sistemi CSS Stilleri */

/* Galeri Header */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.gallery-info {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.gallery-info i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.refresh-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.refresh-btn i {
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

/* Loading Spinner */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    width: 100%;
}

.loading-spinner {
    text-align: center;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-size: 1.1rem;
    margin: 0;
}

/* Boş Galeri Mesajı */
.empty-gallery {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
    margin: 2rem 0;
}

.empty-gallery i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-gallery h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.empty-gallery > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.github-guide {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.github-guide h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.github-guide ol {
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 1.2rem;
}

.github-guide li {
    margin-bottom: 0.5rem;
}

/* Galeri öğesi animasyonları */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeIn 0.5s ease-in-out;
}

/* Video stilleri */
.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    background: var(--card-bg);
}

/* Video overlay'ini gizle */
.video-item .overlay {
    display: none;
}

/* Video controls - her zaman görünür */
.video-item video {
    cursor: pointer;
}

.video-item video::-webkit-media-controls {
    opacity: 1;
}

/* Firefox için */
.video-item video::-moz-media-controls {
    opacity: 1;
}

/* Görsel yüklenirken placeholder */
.gallery-item img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.gallery-item img[src] {
    background: none;
    animation: none;
}

/* Video controls styling */
.video-item video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.video-item video::-webkit-media-controls-play-button,
.video-item video::-webkit-media-controls-volume-slider {
    filter: brightness(1.2);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Dark mode uyumluluğu */
[data-theme="dark"] .gallery-item img {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .gallery-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .refresh-btn {
        width: 100%;
        justify-content: center;
    }
    
    .empty-gallery {
        padding: 2rem 1rem;
    }
    
    .github-guide {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .gallery-info {
        font-size: 0.9rem;
    }
}

/* Galeri öğesi hover efektleri (mevcut stillerle uyumlu) */
.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* Filtre butonları için GitHub durumu göstergesi */
.filter-btn.loading::after {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-left: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Success/Error mesajları */
.gallery-message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    text-align: center;
    font-weight: 500;
}

.gallery-message.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.gallery-message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* GitHub API rate limit uyarısı */
.rate-limit-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.rate-limit-warning i {
    margin-right: 0.5rem;
}