	/* =====================
		Trending Page Styles
		===================== */

	/* Filter Bar */
	.filter-bar {
	    display: flex;
	    gap: 16px;
	    align-items: center;
	    justify-content: center;
	    flex-wrap: wrap;
	    background: var(--card);
	    border: 1px solid var(--accent-2);
	    border-radius: 16px;
	    padding: 10px 12px;
	    box-shadow: 0 6px 24px rgba(2, 6, 23, 0.08);
	}

	.filter-left {
	    display: flex;
	    gap: 12px;
	    align-items: center;
	    flex-wrap: wrap;
	    justify-content: center;
	}

	.filter-right {
	    display: flex;
	    gap: 12px;
	    align-items: center;
	    justify-content: center;
	}

	.filter-field {
	    display: flex;
	    flex-direction: column;
	    gap: 6px;
	}

	.field-label {
	    font-size: .82rem;
	    opacity: .75;
	}

	.field-control {
	    appearance: none;
	    background: var(--surface-1, #fff);
	    color: inherit;
	    border: 1px solid var(--accent-2);
	    border-radius: 12px;
	    padding: 10px 12px;
	    min-width: 180px;
	    box-shadow: inset 0 1px 0 rgba(2, 6, 23, 0.02);
	}

	.field-control:focus {
	    outline: 2px solid var(--accent);
	    outline-offset: 2px;
	}

	.apply-btn {
	    background: var(--accent);
	    color: #fff;
	    border: none;
	    border-radius: 10px;
	    padding: 10px 14px;
	    font-weight: 600;
	    box-shadow: 0 2px 10px rgba(2, 6, 23, .12);
	    cursor: pointer;
	}

	.apply-btn:hover {
	    background: var(--accent-2);
	}

	.clear-btn {
	    display: inline-block;
	    border: 1px solid var(--accent-2);
	    border-radius: 10px;
	    padding: 10px 14px;
	    text-decoration: none;
	    color: inherit;
	}

	.clear-btn:hover {
	    border-color: var(--accent);
	}

	/* View Toggle Buttons */
	.view-toggle {
	    display: flex;
	    background: var(--surface-1, #fff);
	    border: 1px solid var(--accent-2);
	    border-radius: 12px;
	    padding: 4px;
	    box-shadow: inset 0 1px 0 rgba(2, 6, 23, 0.02);
	}

	.toggle-btn {
	    border: none;
	    background: transparent;
	    color: inherit;
	    padding: 8px 10px;
	    border-radius: 8px;
	    cursor: pointer;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    width: 36px;
	    height: 36px;
	}

	.toggle-btn[aria-pressed="true"] {
	    background: var(--accent);
	    color: #fff;
	    box-shadow: 0 2px 10px rgba(2, 6, 23, .12);
	}

	/* Trending Grid & Cards */
	.trending-grid {
	    display: grid;
	    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	    gap: 32px;
	}

	.trending-card {
	    background: rgba(255, 255, 255, 0.35);
	    border-radius: 10px;
	    backdrop-filter: blur(24px) saturate(180%);
	    box-shadow: 0 8px 32px 0 rgba(2, 6, 23, 0.18), 0 8px 32px 0 rgba(2, 6, 23, 0.12);
	    flex: auto;
	    overflow: hidden;
	    display: flex;
	    flex-direction: column;
	    transition: box-shadow 0.2s, transform 0.2s;
	    padding: 0;
	    /* Remove default padding, use details section for spacing */
	}

	.trending-card:hover {
	    box-shadow: 0 12px 48px rgba(2, 6, 23, 0.18), 0 12px 48px rgba(2, 6, 23, 0.14);
	    transform: translateY(-4px) scale(1.02);
	    border-color: var(--accent);
	}

	/* Card Image Section */
	.trending-card-img {
	    width: 100%;
	    height: 220px;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    background: transparent;
	    position: relative;
	    overflow: hidden;
	}

	.trending-card-img::before {
	    content: "";
	    position: absolute;
	    top: 0;
	    left: 0;
	    width: 100%;
	    height: 100%;
	    background: #fff;
	    filter: blur(12px);
	    z-index: 1;
	}

	.trending-card-img img {
	    position: relative;
	    z-index: 2;
	    max-width: 96%;
	    max-height: 200px;
	    object-fit: cover;
	    border-radius: 4px;
	    box-shadow: 0 2px 12px rgba(2, 6, 23, 0.10);
	    filter: none;
	    transition: filter 0.2s;
	}

/* fallback small image used for cards without images: keep same visual as infinite-scroll default */
.fallback-img {
    width: 140px;
    height: 140px;
    display: inline-block;
}

.trending-card-img.fallback img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    filter: blur(1px) brightness(0.85);
    border-radius: 4px;
}

	.trending-card-img.thumbnail img {
	    filter: blur(2.5px) brightness(0.85);
	}

	.play-overlay {
	    position: absolute;
	    left: 50%;
	    top: 50%;
	    transform: translate(-50%, -50%);
	    z-index: 3;
	    pointer-events: none;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	}

	.play-overlay svg {
	    width: 56px;
	    height: 56px;
	    opacity: 0.85;
	    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18));
	}

	/* Platform Logo & Topic Tag */
	.platform-logo {
	    height: 28px;
	    width: 28px;
	    vertical-align: middle;
	    margin-right: 8px;
	    border-radius: 6px;
	    background: #fff;
	    box-shadow: 0 1px 4px rgba(2, 6, 23, 0.10);
	}
	
	.topic-tag {
	    background: linear-gradient(90deg, #ede9fe 0%, #f3f0ff 100%);
	    color: #5b21b6;
	    padding: 4px 16px;
	    border-radius: 12px;
	    font-size: 1.05rem;
	    font-weight: 700;
	    margin-left: 2px;
	    letter-spacing: 0.02em;
	    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.10);
	    max-width: 800px;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    white-space: normal;
	    display: inline-block;
	    vertical-align: middle;
	    transition: box-shadow 0.2s, background 0.2s, transform 0.18s cubic-bezier(.4, 2, .3, 1);
	}

	/* Open Link Button */
	.open-link-btn {
	    margin-top: 10px;
	    display: inline-block;
	    background: var(--accent);
	    color: #fff;
	    border: none;
	    padding: 6px 18px;
	    border-radius: 8px;
	    text-decoration: none;
	    font-weight: 500;
	    font-size: 1rem;
	    box-shadow: 0 2px 8px rgba(2, 6, 23, 0.10);
	    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
	    cursor: pointer;
	}

	.open-link-btn:hover {
	    background: var(--accent-2);
	    color: var(--accent);
	    box-shadow: 0 4px 16px rgba(2, 6, 23, 0.16);
	}

	/* View Modes */
	#trending-root.compact .trending-grid {
	    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	    gap: 16px;
	}

	#trending-root.compact .trending-card {
	    border-radius: 14px;
	}

	#trending-root.compact .trending-card .trending-card-img {
	    display: none;
	}

	#trending-root.compact .trending-card .topic-tag {
	    font-size: .95rem;
	    padding: 2px 10px;
	}

	#trending-root.compact .trending-card div[style*="padding:24px"] {
	    padding: 14px 14px 12px 14px !important;
	}

	#trending-root.compact .trending-card:hover {
	    transform: translateY(-2px) scale(1.01);
	}

	#trending-root.comfy .trending-grid {
	    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	    gap: 34px;
	}

	#trending-root.list .trending-grid {
	    display: grid;
	    grid-template-columns: 1fr;
	    gap: 14px;
	}

	#trending-root.list .trending-card {
	    flex-direction: row;
	    align-items: stretch;
	}

	#trending-root.list .trending-card .trending-card-img {
	    display: flex;
	    width: 220px;
	    min-height: 160px;
	    height: auto;
	}

	#trending-root.list .trending-card .trending-card-img img {
	    max-width: 92%;
	    max-height: 140px;
	    border-radius: 10px;
	}

	#trending-root.list .trending-card div[style*="padding:24px"] {
	    padding: 16px 18px !important;
	}

	#trending-root.list .trending-card .topic-tag {
	    font-size: 1rem;
	}

	/* Post Info Ellipsis Preview */
	.post-info-ellipsis {
	    max-width: 100%;
	    max-height: 1.5em;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    white-space: pre-line;
	    cursor: pointer;
	    transition: max-height 0.35s cubic-bezier(.4, 0, .2, 1), background 0.2s, box-shadow 0.2s, padding 0.2s;
	    display: block;
	    position: relative;
	}

	.post-info-ellipsis.expanded,
	.post-info-ellipsis.is-truncated:hover {
	    max-height: 500px !important;
	    overflow: visible !important;
	    background: #f3f0ff;
	    z-index: 2;
	    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.10);
	    padding: 2px 6px;
	    border-radius: 6px;
	}

	.post-info-ellipsis.is-truncated::after {
	    content: '\2026';
	    /* Unicode for ellipsis */
	    position: absolute;
	    right: 0;
	    bottom: 0;
	    padding-left: 12px;
	    background: linear-gradient(to right, rgba(255, 255, 255, 0), #f3f0ff 80%);
	    color: #888;
	    font-weight: bold;
	    pointer-events: none;
	    opacity: 1;
	    transition: opacity 0.2s;
	}

	.post-info-ellipsis.is-truncated:hover::after,
	.post-info-ellipsis.expanded.is-truncated::after {
	    opacity: 0;
	}

	.post-info-ellipsis:hover {
	    height: auto;
	    overflow: visible;
	    white-space: pre-line;
	    background: #f3f0ff;
	    z-index: 2;
	    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.10);
	    padding: 2px 6px;
	    border-radius: 6px;
	}