/* =============================================================================
   AFTERGLOW OFFICIAL UGC Gallery ("Tagged & Featured")
   Site-wide section above footer.
   命名: .ms-ugc-* (项目前缀, 不污染其他模块)
   ============================================================================= */

.ms-ugc {
	background: linear-gradient(180deg, #000 0%, #08070a 60%, #000 100%);
	color: var(--ms-ink-inverse, #fff);
	padding: 80px 24px 100px;
	position: relative;
	overflow: hidden;
	border-top: 1px solid rgba(255, 255, 255, .08);
}

/* 顶部一条全息渐变细线 */
.ms-ugc::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 1px;
	background: var(--ms-grad-holo-bright,
		linear-gradient(90deg,
			rgba(255, 170, 230, .9),
			rgba(180, 220, 255, .9),
			rgba(220, 180, 255, .9),
			rgba(255, 220, 200, .9)));
	opacity: .5;
}

/* 微妙的全息光晕在右上角作 atmospheric */
.ms-ugc::after {
	content: '';
	position: absolute;
	top: -40%; right: -10%;
	width: 60%; height: 80%;
	background: radial-gradient(circle,
		rgba(255, 170, 230, .08) 0%,
		rgba(180, 220, 255, .04) 35%,
		transparent 70%);
	pointer-events: none;
	z-index: 0;
}

.ms-ugc__inner {
	max-width: 1400px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

/* ─── HEAD ─────────────────────────────────────────────────────────── */
.ms-ugc__head {
	text-align: center;
	margin-bottom: 48px;
}

.ms-ugc__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: 'DM Mono', 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: .35em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .55);
	margin-bottom: 18px;
}

.ms-ugc__eyebrow-dot {
	display: inline-block;
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--ms-grad-holo-bright,
		linear-gradient(90deg, #ffb1d8, #b1e0ff, #d2b1ff));
	box-shadow: 0 0 8px rgba(255, 170, 230, .5);
}

.ms-ugc__title {
	font-family: 'Archivo Narrow', 'Inter Tight', sans-serif;
	font-weight: 700;
	font-size: clamp(36px, 6.5vw, 76px);
	line-height: .95;
	letter-spacing: .01em;
	margin: 0 0 16px 0;
	color: #fff;
}

/* 高亮词的全息渐变 */
.ms-ugc__title-holo {
	background: linear-gradient(135deg,
		#ffb1d8 0%, #b1e0ff 35%, #d2b1ff 65%, #ffd8b1 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.ms-ugc__subtitle {
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	letter-spacing: .04em;
	color: rgba(255, 255, 255, .65);
	margin: 0;
}

/* ─── GRID ─────────────────────────────────────────────────────────── */
.ms-ugc__grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
	margin-bottom: 56px;
}

.ms-ugc__cell {
	position: relative;
	margin: 0;
	aspect-ratio: 1 / 1.15;
	overflow: hidden;
	border-radius: 6px;
	background: #111;
	box-shadow: 0 1px 0 rgba(255, 255, 255, .04);
}

.ms-ugc__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .9s cubic-bezier(.16, 1, .3, 1);
}

.ms-ugc__hover {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg,
		rgba(255, 170, 230, .0) 0%,
		rgba(180, 220, 255, .0) 50%,
		rgba(220, 180, 255, .0) 100%);
	pointer-events: none;
	transition: background .5s ease, opacity .5s ease;
	opacity: 0;
}

.ms-ugc__cell:hover .ms-ugc__img {
	transform: scale(1.08);
}

.ms-ugc__cell:hover .ms-ugc__hover {
	opacity: 1;
	background: linear-gradient(135deg,
		rgba(255, 170, 230, .18) 0%,
		rgba(180, 220, 255, .12) 50%,
		rgba(220, 180, 255, .18) 100%);
}

/* 每个 cell 一层 holo border 在 hover 时显现 */
.ms-ugc__cell::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 6px;
	padding: 1px;
	background: linear-gradient(135deg, #ffb1d8, #b1e0ff, #d2b1ff);
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity .5s ease;
	pointer-events: none;
}
.ms-ugc__cell:hover::after {
	opacity: .9;
}

/* ─── CTA ──────────────────────────────────────────────────────────── */
.ms-ugc__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 26px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	font-family: 'Archivo Narrow', sans-serif;
	font-size: 14px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	background: rgba(255, 255, 255, .03);
	backdrop-filter: blur(4px);
	transition: all .35s cubic-bezier(.16, 1, .3, 1);
	position: relative;
	overflow: hidden;
}

.ms-ugc__cta::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg,
		rgba(255, 170, 230, .25) 0%,
		rgba(180, 220, 255, .15) 50%,
		rgba(220, 180, 255, .25) 100%);
	opacity: 0;
	transition: opacity .35s ease;
}

.ms-ugc__cta > * {
	position: relative;
	z-index: 1;
}

.ms-ugc__cta:hover {
	border-color: rgba(255, 255, 255, .5);
	transform: translateY(-1px);
}

.ms-ugc__cta:hover::before {
	opacity: 1;
}

.ms-ugc__cta-arrow {
	transition: transform .35s ease;
}

.ms-ugc__cta:hover .ms-ugc__cta-arrow {
	transform: translateX(4px);
}

/* 居中 CTA */
.ms-ugc__inner > .ms-ugc__cta {
	display: inline-flex;
}
.ms-ugc__inner {
	text-align: center;
}
.ms-ugc__head, .ms-ugc__grid { text-align: initial; }

/* ─── 响应式 ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
	.ms-ugc__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
	.ms-ugc { padding: 60px 16px 80px; }
	.ms-ugc__head { margin-bottom: 32px; }
	.ms-ugc__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 36px; }
	.ms-ugc__cta { padding: 12px 22px; font-size: 12px; }
}

/* prefers-reduced-motion: 关掉所有动画 */
@media (prefers-reduced-motion: reduce) {
	.ms-ugc__img, .ms-ugc__cell::after, .ms-ugc__hover, .ms-ugc__cta, .ms-ugc__cta-arrow {
		transition: none;
	}
	.ms-ugc__cell:hover .ms-ugc__img {
		transform: none;
	}
}
