/* ═══════════════════════════════════════════════════════
   lore.farm — Explore
   ═══════════════════════════════════════════════════════ */

.nav-active { color: var(--color-text) !important; }

/* ─── Worlds Showcase ─── */
.explore-worlds {
    padding: var(--space-xl) 0 var(--space-lg);
}

.explore-worlds h2 {
    text-align: left;
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
}

.worlds-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.showcase-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.showcase-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 12px rgba(45, 90, 39, 0.08);
    text-decoration: none;
}

.showcase-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-border-light);
    flex-shrink: 0;
    object-fit: cover;
}

.showcase-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-border-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.showcase-info {
    min-width: 0;
    flex: 1;
}

.showcase-name {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 1px;
    color: var(--color-text);
}

.showcase-domain {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.showcase-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.showcase-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.75rem;
    font-weight: 500;
}

.showcase-stat-lore { color: var(--color-lore); }
.showcase-stat-canon { color: var(--color-canon); }
.showcase-stat-chars { color: var(--color-text-muted); }

/* ─── Feed Controls ─── */
.explore-feed-section {
    padding: 0 0 var(--space-2xl);
}

.feed-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.feed-filters {
    display: flex;
    gap: 2px;
    background: var(--color-border-light);
    border-radius: var(--radius);
    padding: 2px;
}

.filter-btn {
    padding: 0.35rem 0.8rem;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover { color: var(--color-text); }

.filter-btn.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.feed-world-filter select,
.feed-sort select {
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-family: var(--font-body);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
}

/* ─── Feed Items ─── */
.explore-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.feed-item {
    display: block;
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    border-left: 3px solid var(--color-border);
}

.feed-item:hover {
    border-color: var(--color-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
}

.feed-item-lore {
    border-left-color: var(--color-lore);
    background: linear-gradient(90deg, var(--color-lore-bg) 0%, var(--color-surface) 40%);
}

.feed-item-canon {
    border-left-color: var(--color-canon);
    background: linear-gradient(90deg, var(--color-canon-bg) 0%, var(--color-surface) 40%);
}

.feed-item-lore:hover { border-left-color: var(--color-lore); }
.feed-item-canon:hover { border-left-color: var(--color-canon); }

.feed-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.feed-author {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    min-width: 0;
}

.feed-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.feed-author-name {
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-author-handle {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.feed-world-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.2em 0.6em;
    border-radius: 12px;
    flex-shrink: 0;
    white-space: nowrap;
    background: var(--color-bg);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border-light);
}

.feed-world-tag-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.feed-label-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2em 0.55em;
    border-radius: 12px;
    flex-shrink: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.feed-label-tag-lore {
    background: var(--color-lore-bg);
    color: var(--color-lore);
}

.feed-label-tag-canon {
    background: var(--color-canon-bg);
    color: var(--color-canon);
}

.feed-tags {
    display: flex;
    align-items: center;
    gap: 0.35em;
    flex-shrink: 0;
}

.feed-item-body {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.feed-item-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--color-text);
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Images: show prominently when present */
.feed-item-images {
    margin-top: var(--space-sm);
    display: grid;
    gap: var(--space-sm);
    border-radius: var(--radius);
    overflow: hidden;
}

.feed-item-images.single-image {
    grid-template-columns: 1fr;
}

.feed-item-images.multi-image {
    grid-template-columns: 1fr 1fr;
}

.feed-item-images img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}

/* Fallback small thumbnail for text-heavy posts */
.feed-item-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.feed-item-foot {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.feed-skeleton {
    height: 100px;
    background: var(--color-border-light);
    border-radius: var(--radius-lg);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.feed-load-more {
    text-align: center;
    padding: var(--space-lg) 0;
}

.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 0.85rem; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .feed-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .feed-item-images img {
        max-height: 200px;
    }
    .feed-item-images.multi-image {
        grid-template-columns: 1fr;
    }
    .worlds-showcase {
        grid-template-columns: 1fr;
    }
}
