/* discover modal styles — Stage-themed grid (matches proposal-discover.html grid).
   CSS-only restyle: targets the exact classes discover.modal.js already renders. */
@keyframes discoverSpin { to { transform: rotate(360deg); } }
@keyframes discoverShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.discover-modal-content {
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.discover-modal-content::-webkit-scrollbar { display: none; }

#discoverContent::-webkit-scrollbar { width: 6px; }
#discoverContent::-webkit-scrollbar-track { background: transparent; }
#discoverContent::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ── Grid: fluid auto-fill, generous spacing ───────────────────────────── */
.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.discover-card {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    /* shimmer while the photo loads */
    background-image: linear-gradient(110deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 70%);
    background-size: 200% 100%;
    animation: discoverShimmer 1.5s ease-in-out infinite;
}
.discover-card.loaded {
    animation: none;
    background-image: none;
}
/* Bottom scrim for creator legibility (pure CSS — no markup change) */
.discover-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(8,8,12,0.78) 100%);
    pointer-events: none;
    z-index: 1;
}
.discover-card img.card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.35s ease;
    opacity: 0;
    image-orientation: from-image;
}
.discover-card img.card-photo.visible {
    opacity: 1;
}
@media (hover: hover) {
    .discover-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255,255,255,0.16);
        box-shadow: 0 18px 36px -18px rgba(0,0,0,0.8);
    }
    .discover-card:hover img.card-photo.visible { transform: scale(1.06); }
}

/* ── Lock overlay (paid + not owned): blurred photo shows through ───────── */
.discover-card .discover-lock {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.30) 55%, rgba(8,8,12,0.5) 100%);
}
.discover-card .discover-lock .lock-price {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.discover-card .discover-lock .lock-text {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.72);
    margin-top: 4px;
}

/* ── Creator tag: avatar + name on the scrim ───────────────────────────── */
.discover-card .discover-creator {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.discover-card .discover-creator img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.85);
    flex: none;
}
.discover-card .discover-creator span {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 5px rgba(0,0,0,0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Responsive column sizing ──────────────────────────────────────────── */
@media (min-width: 560px) {
    .discover-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
}
@media (min-width: 901px) {
    .discover-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
}
