/* ══════════════════════════════════════════════════════════════
   Elite — premium collections hub + thumbnail-grid collection page
   ══════════════════════════════════════════════════════════════ */

/* ── Hub page ── */
.elite-page { padding: 1rem 0 2rem; }
.elite-header { margin-bottom: 1.25rem; }
.elite-header h1 { font-size: 1.65rem; margin: 0 0 .3rem; }
.elite-header p { color: var(--text2); margin: 0; font-size: .95rem; line-height: 1.5; }

.elite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.elite-card {
    position: relative; display: block; border-radius: 16px; overflow: hidden;
    aspect-ratio: 3/4; text-decoration: none; background: var(--card);
    box-shadow: 0 6px 22px rgba(0,0,0,.28);
    transition: transform var(--transition), box-shadow var(--transition);
}
.elite-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.elite-card-cover { position: absolute; inset: 0; }
.elite-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.elite-card-empty {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 2.4rem; background: linear-gradient(135deg, var(--card2), var(--bg2));
}

/* Collage cover — up to 4 cells (images + video thumbs) so the card shows the
   folder has multiple files at a glance. Fills the whole card. */
.elite-collage {
    position: absolute; inset: 0;
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
    gap: 2px; background: var(--bg2);
}
.elite-collage-cell { position: relative; overflow: hidden; background: #000; }
.elite-collage-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.elite-collage-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.22); color: #fff; font-size: .8rem; pointer-events: none;
}
.elite-collage-play::before {
    content: ""; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.elite-collage-play::after {
    content: ""; position: absolute; width: 0; height: 0; margin-left: 2px;
    border-left: 7px solid #fff; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
/* 1-cell collage (single image) → full-bleed like a plain cover */
.elite-collage:has(> :only-child) { grid-template-columns: 1fr; grid-template-rows: 1fr; }
/* 3 cells → first cell spans the left column */
.elite-collage:has(> :nth-child(3):last-child) .elite-collage-cell:first-child { grid-row: 1 / 3; }

/* 2 cells → side by side, single row */
.elite-collage:has(> :nth-child(2):last-child) { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.elite-card-shade {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.04) 35%, rgba(0,0,0,.82) 100%);
}
.elite-card-info { position: absolute; left: 0; right: 0; bottom: 0; padding: .75rem .85rem; color: #fff; }
.elite-card-name { display: block; font-weight: 800; font-size: 1.02rem; line-height: 1.25; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.elite-card-counts { display: block; font-size: .78rem; opacity: .88; margin-top: .2rem; text-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* ── Collection page ── */
.elite-collection-page { max-width: 720px; margin: 0 auto; }

.elite-col-header {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; gap: .7rem;
    padding: .65rem .35rem;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.elite-back {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--card); border: 1px solid var(--border);
    color: var(--text); font-size: 1.15rem; text-decoration: none;
}
.elite-back:hover { border-color: var(--accent); color: var(--accent); }
.elite-avatar {
    flex: none; width: 42px; height: 42px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--border2); background: var(--card2);
}
.elite-col-titles { min-width: 0; display: flex; flex-direction: column; }
.elite-col-title { font-weight: 800; font-size: 1.02rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.elite-col-sub { font-size: .78rem; color: var(--text2); }

/* Thumbnail grid — square cells, newest first */
.elite-col-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .35rem;
    padding: .6rem 0 .4rem;
}
.elite-item {
    position: relative; aspect-ratio: 1/1; overflow: hidden;
    border-radius: 10px; background: #000; cursor: pointer;
}
.elite-item:active { transform: scale(.97); }
.elite-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.elite-thumb-empty { background: linear-gradient(135deg, var(--card2), var(--bg2)); }

/* Video badges */
.elite-play-badge {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.18);
    pointer-events: none;
}
.elite-play-badge span {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(0,0,0,.55); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; padding-left: 3px;
    box-shadow: 0 3px 12px rgba(0,0,0,.4);
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.elite-duration {
    position: absolute; right: 5px; bottom: 5px; z-index: 2;
    background: rgba(0,0,0,.72); color: #fff;
    font-size: .68rem; font-weight: 700; padding: .12rem .4rem;
    border-radius: 6px; pointer-events: none;
}

/* Infinite scroll */
.elite-sentinel { height: 48px; display: flex; align-items: center; justify-content: center; }
.elite-loading { color: var(--text2); font-size: .85rem; font-weight: 600; letter-spacing: .3px; }
.elite-end { color: var(--text3); font-size: .8rem; font-weight: 600; padding: .6rem 0 1.6rem; }

/* ── Feed page: Elite collections strip (teaser for free users) ── */
.feed-elite { margin: 0 0 1.5rem; }
.feed-elite-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 .7rem; }
.feed-elite-head h2 { font-size: 1.05rem; margin: 0; }
.feed-elite-row {
    display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x proximity;
}
.feed-elite-row::-webkit-scrollbar { display: none; }
.feed-elite-card {
    flex: 0 0 42%; max-width: 190px; min-width: 140px; scroll-snap-align: start;
    display: block; text-decoration: none; color: inherit;
}
.feed-elite-cover {
    position: relative; aspect-ratio: 1/1; border-radius: 14px; overflow: hidden;
    background: var(--card); box-shadow: 0 6px 22px rgba(0,0,0,.28);
}
.feed-elite-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-elite-lock {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.feed-elite-lock span {
    width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.6);
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.45);
}
.feed-elite-counts {
    display: block; margin-top: .4rem; font-size: .8rem; font-weight: 700;
    color: var(--text2); text-align: center;
}
@media (min-width: 700px) { .feed-elite-card { flex-basis: 170px; } }

/* ── Responsive ── */
@media (max-width: 560px) {
    .elite-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .elite-collection-page { max-width: 100%; }
    .elite-col-header { padding: .55rem .2rem; }
}
@media (min-width: 900px) {
    .elite-col-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .elite-card, .elite-item { transition: none; }
}