/* PYC Gallery — Frontend */

.pyc-masonry { column-count: 3; column-gap: 12px; }
.pyc-masonry[data-columns="1"] { column-count: 1; }
.pyc-masonry[data-columns="2"] { column-count: 2; }
.pyc-masonry[data-columns="4"] { column-count: 4; }
.pyc-masonry[data-columns="5"] { column-count: 5; }
.pyc-masonry[data-columns="6"] { column-count: 6; }
@media (max-width: 991px) { .pyc-masonry { column-count: 2; } }
@media (max-width: 575px) { .pyc-masonry { column-count: 1; } }

.pyc-masonry-item { break-inside: avoid; margin-bottom: 12px; border-radius: 12px; overflow: hidden; position: relative; }
.pyc-masonry-item a, .pyc-masonry-item > div { display: block; position: relative; cursor: pointer; }
.pyc-masonry-item img { width: 100%; height: auto; display: block; transition: transform 0.3s; }
.pyc-masonry-item:hover img { transform: scale(1.03); }

.pyc-more-overlay a::after, .pyc-more-overlay > div::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pyc-more-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 2; font-size: 2rem; font-weight: 700; color: white; pointer-events: none; }

/* Folder grid (archive) */
.pyc-folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.pyc-folder-card { border-radius: 16px; overflow: hidden; background: #FDFCFA; border: 1px solid rgba(0,0,0,0.05); text-decoration: none; color: #1E293B; transition: all 0.25s; display: block; }
.pyc-folder-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.06); border-color: rgba(196,30,58,0.2); color: #1E293B; }
.pyc-folder-thumb { aspect-ratio: 4/3; background: #132D42; background-size: cover; background-position: center; position: relative; }
.pyc-folder-info { padding: 1rem 1.25rem; }
.pyc-folder-info h3 { font-family: var(--display, 'Julius Black'), Georgia, serif; font-size: 1.1rem; font-weight: 500; margin: 0 0 0.2rem; }
.pyc-folder-info small { font-size: 0.75rem; color: #94A3B8; }

.pyc-gallery-locked { text-align: center; padding: 3rem 2rem; background: #FDFCFA; border-radius: 16px; border: 1px solid rgba(0,0,0,0.06); }
.pyc-locked-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.pyc-gallery-locked p { color: #475569; font-size: 0.95rem; }
.pyc-gallery-locked a { color: #C41E3A; font-weight: 600; }
.pyc-gallery-empty { color: #94A3B8; font-style: italic; }

/* ── Lightbox ─────────────────────────────────────────────── */
.pyc-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.92); display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.pyc-lightbox.active { opacity: 1; visibility: visible; }
.pyc-lb-topbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; color: rgba(255,255,255,0.6); font-size: 0.82rem; flex-shrink: 0; }
.pyc-lb-close, .pyc-lb-play { background: none; border: none; color: white; cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 8px; transition: background 0.2s; }
.pyc-lb-close { font-size: 1.5rem; }
.pyc-lb-play { font-size: 1rem; color: rgba(255,255,255,0.6); }
.pyc-lb-close:hover, .pyc-lb-play:hover { background: rgba(255,255,255,0.1); }

.pyc-lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; padding: 0 60px; }
.pyc-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; transition: opacity 0.2s; }

.pyc-lb-prev, .pyc-lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.08); border: none; color: white; font-size: 1.5rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.pyc-lb-prev { left: 12px; }
.pyc-lb-next { right: 12px; }
.pyc-lb-prev:hover, .pyc-lb-next:hover { background: rgba(255,255,255,0.2); }

.pyc-lb-caption { text-align: center; padding: 0.5rem 1rem; color: rgba(255,255,255,0.6); font-size: 0.85rem; min-height: 2rem; }

.pyc-lb-thumbs { display: flex; gap: 6px; justify-content: center; padding: 0.75rem 1rem 1rem; overflow-x: auto; flex-shrink: 0; }
.pyc-lb-thumbs img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: 0.4; transition: all 0.2s; border: 2px solid transparent; flex-shrink: 0; }
.pyc-lb-thumbs img:hover { opacity: 0.7; }
.pyc-lb-thumbs img.active { opacity: 1; border-color: #C41E3A; }

.pyc-lb-progress { height: 2px; background: rgba(255,255,255,0.1); position: relative; flex-shrink: 0; }
.pyc-lb-progress-bar { height: 100%; background: #C41E3A; width: 0; transition: width 0.1s linear; }

@media (max-width: 575px) {
    .pyc-lb-stage { padding: 0 40px; }
    .pyc-lb-prev, .pyc-lb-next { width: 36px; height: 36px; font-size: 1.2rem; }
    .pyc-lb-thumbs img { width: 36px; height: 36px; }
}
