/* Custom Styles for Adult Gallery */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Subreddit tabs */
.subreddit-tab {
    background: rgba(31, 41, 55, 0.5);
    color: #9ca3af;
}

.subreddit-tab:hover {
    background: rgba(31, 41, 55, 0.8);
    color: #f9fafb;
}

.subreddit-tab.active {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
}

/* Gallery item animations */
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.2);
}

/* Image/video container */
.media-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #1f2937;
}

.media-container img,
.media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-container:hover img,
.media-container:hover video {
    transform: scale(1.05);
}

/* Overlay gradient */
.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .media-overlay {
    opacity: 1;
}

/* Video play button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(236, 72, 153, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .play-button {
    opacity: 1;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(236, 72, 153, 1);
}

/* Caption styling */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    color: white;
    font-size: 14px;
    line-height: 1.4;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Lightbox styles */
#lightbox img,
#lightbox video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
}

/* Lazy loading placeholder */
.lazy-placeholder {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Grid size variations */
.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-2 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Subreddit badge */
.subreddit-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: #f97316;
}

/* Video type badge */
.type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: white;
}

.type-badge.video {
    background: rgba(236, 72, 153, 0.8);
}

.type-badge.gallery {
    background: rgba(6, 182, 212, 0.9);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}