/* Base */
:root {
	--bg: #0f0f12;
	--panel: #15151a;
	--panel-2: #1b1b22;
	--text: #f5f7fa;
	--muted: #a6adbb;
	--brand: #ff4fa0;
	--brand-2: #ff7dbd;
	--accent: #6b6bff;
	--shadow: rgba(0, 0, 0, 0.4);
}

* {
	box-sizing: border-box;
}

html, body {
	height: 100%;
}

body {
	margin: 0;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
	color: var(--text);
	background: radial-gradient(1200px 600px at 70% -10%, rgba(255,79,160,0.12), transparent 60%),
	            radial-gradient(900px 500px at 0% 10%, rgba(107,107,255,0.12), transparent 60%),
	            var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Header */
.page-header {
	position: sticky;
	top: 0;
	z-index: 10;
	backdrop-filter: blur(10px);
	background: linear-gradient(180deg, rgba(15,15,18,0.9), rgba(15,15,18,0.3));
	border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	max-width: 1120px;
	margin: 0 auto;
}

.logo {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	box-shadow: 0 6px 16px var(--shadow);
}

.titles h1 {
	font-size: 18px;
	margin: 0;
}

.subtitle {
	margin: 2px 0 0 0;
	color: var(--muted);
	font-size: 12px;
}

/* Content */
.content {
	max-width: 1120px;
	margin: 0 auto;
	padding: 20px 16px 24px;
}

.fan-carousel {
	/* margin-top: clamp(48px, 8vh, 72px); */
	margin-bottom: 14px;
}
.fan-scene {
	position: relative;
	height: clamp(160px, 60vw, 360px);
	overflow: hidden; /* prevent items from overflowing the container */
}
.fan-track {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	/* responsive sizing variables */
	--item-w: clamp(140px, 44vw, 260px);
	/* spacing so左右预览更贴边，但整体仍居中 */
	--gap-l: clamp(56px, 18vw, 240px);
	--gap-r: clamp(40px, 14vw, 200px);
}
.fan-item {
	position: absolute;
	left: 50%;
	bottom: 10px;
	width: var(--item-w);
	aspect-ratio: 3 / 4;
	border-radius: 14px;
	overflow: hidden;
	transform-origin: 50% 100%;
	border: 1px solid rgba(255,255,255,0.08);
	box-shadow: 0 12px 28px rgba(0,0,0,0.45);
	background: #222;
	transition:
		transform .6s cubic-bezier(.2,.7,.2,1),
		filter .6s ease,
		opacity .6s ease,
		box-shadow .6s ease;
}
.fan-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity .35s ease, transform .35s ease;
}
/* slide-in helper for new images */
.fan-img-enter {
	opacity: 0;
	transform: translateX(-18px);
}
/* positions */
.fan-left {
	transform: translateX(calc(-2.25 * var(--gap-l))) translateY(0) scale(.94);
	filter: blur(6px) saturate(.9) brightness(.8);
	opacity: .85;
	z-index: 1;
}
.fan-center {
	transform: translateX(-50%) translateY(0) scale(1);
	left: 50%;
	filter: none;
	z-index: 3;
}
.fan-right {
	transform: translateX(var(--gap-r)) translateY(0) scale(.92);
	filter: blur(6px) saturate(.9) brightness(.8);
	opacity: .85;
	z-index: 1;
}
.fan-track.rotating .fan-item {
	transition-duration: .5s;
}
@media (min-width: 720px) {
	.fan-track {
		--item-w: clamp(200px, 30vw, 340px);
		--gap-l: clamp(96px, 16vw, 280px);
		--gap-r: clamp(72px, 12vw, 240px);
	}
	.fan-left { transform: translateX(calc(-2.25 * var(--gap-l))) translateY(0) scale(.94); }
	.fan-right { transform: translateX(var(--gap-r)) translateY(0) scale(.94); }
}

/* progress bar */
.fan-progress {
	height: 4px;
	border-radius: 999px;
	background: rgba(255,255,255,0.12);
	margin: 10px auto 0;
	max-width: 520px;
	overflow: hidden;
}
.fan-progress-bar {
	display: block;
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--brand), var(--brand-2));
	box-shadow: 0 4px 10px rgba(255,79,160,0.35);
	transition: width .12s linear;
}

.section {
	margin-top: 8px;
}

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.section h2 {
	margin: 0;
	font-size: 18px;
}

.refresh-btn {
	background: linear-gradient(180deg, #23232b, #1a1a20);
	border: 1px solid rgba(255,255,255,0.08);
	color: var(--text);
	padding: 8px 12px;
	border-radius: 10px;
	font-size: 12px;
	cursor: pointer;
	transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.refresh-btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.14); }
.refresh-btn:active { transform: translateY(0); }

/* Grid */
.grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@media (min-width: 600px) {
	.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
	.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	background: var(--panel);
	border: 1px solid rgba(255,255,255,0.06);
	box-shadow: 0 10px 24px rgba(0,0,0,0.35);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
	cursor: pointer;
}
.card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(0,0,0,0.45);
	border-color: rgba(255,255,255,0.12);
}

.cover {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	background: #222;
}

.badge {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 4px 8px;
	font-size: 11px;
	line-height: 1;
	border-radius: 999px;
	color: #101014;
	background: linear-gradient(180deg, var(--brand), var(--brand-2));
	box-shadow: 0 6px 16px rgba(255,79,160,0.45);
}

.card-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 10px 12px;
	display: flex;
	justify-content: space-between;
	align-items: end;
	background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.65) 60%, rgba(0,0,0,0.9));
}

.card-sub {
	margin: 4px 0 0 0;
	font-size: 11px;
	color: var(--muted);
}

.like {
	background: rgba(0,0,0,0.45);
	border: 1px solid rgba(255,255,255,0.15);
	padding: 6px 8px;
	border-radius: 10px;
	font-size: 12px;
}

/* Features */
.features {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 20px;
}
@media (min-width: 720px) {
	.features { grid-template-columns: repeat(3, 1fr); }
}
.feature {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	border-radius: 12px;
	background: linear-gradient(180deg, #181820, #14141a);
	border: 1px solid rgba(255,255,255,0.06);
}
.feature-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: linear-gradient(180deg, #2b2b35, #21212a);
}
.feature-text h3 {
	margin: 0;
	font-size: 14px;
}
.feature-text p {
	margin: 4px 0 0 0;
	color: var(--muted);
	font-size: 12px;
}

.download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border-radius: 12px;
	font-weight: 700;
	color: #0f0f14;
	text-decoration: none;
	background: linear-gradient(180deg, var(--brand), var(--brand-2));
	box-shadow: 0 10px 22px rgba(255,79,160,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
	border: 1px solid rgba(255,255,255,0.35);
	transition: filter .2s ease, box-shadow .2s ease;
	min-width: 140px;
}
.download-btn:hover { filter: brightness(1.03); }
.download-btn:active { filter: brightness(.98); }

/* Centered floating download button */
.download-float-center {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: calc(86px + env(safe-area-inset-bottom));
	z-index: 9999;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

