.topstats {
	--ts-bg: #1b1f28;
	--ts-bg-alt: #202530;
	--ts-border: #6e3b58;
	--ts-accent: #e967a7;
	--ts-text: #dce4ec;
	--ts-muted: #aab1bc;
	--ts-badge-bg: rgba(233, 103, 167, 0.14);
	margin-bottom: 18px;
}
.topstats .forabg,
.topstats .panel {
	background: var(--ts-bg);
	border: 1px solid var(--ts-border);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.topstats .forabg { padding: 0; }
.topstats .topiclist li.header {
	background: linear-gradient(180deg, rgba(233,103,167,.12), rgba(233,103,167,.04));
	border-bottom: 1px solid var(--ts-border);
	border-radius: 11px 11px 0 0;
}
.topstats .topiclist li.header dt,
.topstats .topiclist li.header dd { color: var(--ts-text); }
/* Compact Top Stats header: keep all column labels vertically centred. */
.topstats .topiclist li.header dt,
.topstats .topiclist li.header dd {
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
	line-height: 34px;
}
.topstats .topiclist li.header dt .list-inner {
	display: flex;
	align-items: center;
	min-height: 34px;
	line-height: 1.1;
}
.topstats .topiclist li.header dd {
	height: 34px;
}
.topstats .topiclist.forums > li.row { background: var(--ts-bg); border-bottom: 1px solid #303744; }
.topstats .topiclist.forums > li.row:nth-child(even) { background: var(--ts-bg-alt); }
.topstats .topiclist.forums > li.row:hover { background: #252b37; }
.topstats a { color: var(--ts-accent); }
.topstats a:hover { color: #ff8fc2; }
.topstats .forumtitle { color: var(--ts-text); font-weight: 700; font-size: 1.14em; line-height: 1.25; }
.topstats .topstats-meta { color: var(--ts-muted); font-size: .97em; line-height: 1.35; }
.topstats .topstats-row {
	background-image: url("./images/announce.png");
	background-repeat: no-repeat;
	background-position: 12px 50%;
	background-size: 32px 32px;
}
.topstats .topstats-row > dt .list-inner { padding-left: 50px; }
.topstats .topstats-row > dd { font-size: 1em; }
.topstats .topstats-row > dd.lastpost { line-height: 1.35; }
.topstats .topstats-row > dd.lastpost a { font-size: 1.1em; font-weight: bold; }
.topstats .topstats-title { display: inline-block; vertical-align: middle; }
.topstats .topstats-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 12px;
	padding: 4px 10px;
	border: 1px solid rgba(233,103,167,.30);
	border-radius: 999px;
	background: var(--ts-badge-bg);
	color: var(--ts-accent);
	font-weight: 700;
	font-size: .78em;
	letter-spacing: .02em;
	text-transform: uppercase;
	box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
	vertical-align: middle;
}
.topstats .topstats-live-badge::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #55d66b;
	box-shadow: 0 0 0 0 rgba(85, 214, 107, .55);
	animation: topstats-pulse 1.8s infinite;
}
.topstats .topstats-live-spin {
	font-size: .95em;
	animation: topstats-spin 2.2s linear infinite;
}
.topstats .topstats-scroll { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--ts-accent) #151922; }
.topstats .topstats-scroll::-webkit-scrollbar { width: 8px; }
.topstats .topstats-scroll::-webkit-scrollbar-thumb { background: var(--ts-accent); border-radius: 8px; }
.topstats .topstats-scroll::-webkit-scrollbar-track { background: #151922; }
.topstats .topstats-scroll-hidden { scrollbar-width: none; }
.topstats .topstats-scroll-hidden::-webkit-scrollbar { display: none; }
.topstats .topiclist.forums > li.row dl { margin: 0; }
.topstats .topstats-row { margin: 0; min-height: 48px; }
.topstats .topstats-row > dt,
.topstats .topstats-row > dd { min-height: 48px; }
.topstats .topstats-row > dt .list-inner {
	padding-top: 4px;
	padding-bottom: 4px;
}
.topstats .topstats-empty,
.topstats .topstats-chat-row { padding: 10px 12px; color: var(--ts-muted); }
.topstats-mchat h3 { color: var(--ts-accent); border-bottom-color: var(--ts-border); }
@keyframes topstats-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
@keyframes topstats-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(85, 214, 107, .55);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(85, 214, 107, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(85, 214, 107, 0);
	}
}
@media (max-width: 700px) {
	.topstats .topstats-row { background-size: 32px 32px; background-position: 8px 50%; }
	.topstats .topstats-row > dt .list-inner { padding-left: 43px; }
	.topstats .forumtitle { font-size: 1.08em; }
	.topstats .topstats-meta { font-size: .94em; }
	.topstats .topstats-live-badge { margin-left: 8px; padding: 3px 8px; font-size: .74em; }
	.topstats dd.topics,
	.topstats dd.posts { display: none; }
	.topstats dd.lastpost { width: 32%; }
	.topstats dt { width: 68%; }
}
/* Keep the live indicator compact on phones in both portrait and landscape. */
@media (max-width: 950px) {
	.topstats .topstats-live-badge {
		display: inline-flex;
		width: 26px;
		height: 26px;
		margin: 0 0 0 7px;
		padding: 0;
		justify-content: center;
		gap: 0;
		vertical-align: middle;
	}
	.topstats .topstats-live-badge::before,
	.topstats .topstats-live-badge > span { display: none; }
	.topstats .topstats-live-spin { font-size: 1em; margin: 0; }
}
@media (max-width: 500px) {
	.topstats dd.lastpost { display: none; }
	.topstats dt { width: 100%; }
	.topstats .topstats-meta { display: block; margin-top: 3px; }
}
