:root {
	--bg: #08090b;
	--panel: #101216;
	--panel-2: #14171d;
	--line: #1e232b;
	--text: #e8eaee;
	--muted: #8b95a5;
	--gold: #e9c46a;
	--gold-2: #f3d79b;
	--blue: #5b9cf8;
	--radius: 14px;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
		"Microsoft YaHei", "Noto Sans SC", sans-serif;
	-webkit-font-smoothing: antialiased;
	padding: 0 24px 48px;
	position: relative;
	overflow-x: hidden;
}

.glow {
	position: fixed;
	inset: -30vh -10vw auto -10vw;
	height: 70vh;
	background: radial-gradient(60% 60% at 30% 20%, rgba(233, 196, 106, 0.09), transparent 70%),
		radial-gradient(50% 50% at 75% 0%, rgba(91, 156, 248, 0.07), transparent 70%);
	pointer-events: none;
	z-index: 0;
}

.top,
main,
footer {
	position: relative;
	z-index: 1;
	max-width: 1080px;
	margin: 0 auto;
}

/* ---------------------------------------------------------------- header */

.top {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	align-items: baseline;
	justify-content: space-between;
	padding: 34px 2px 22px;
}

.brand {
	display: flex;
	align-items: baseline;
	gap: 12px;
}

.brand h1 {
	margin: 0;
	font-size: 26px;
	font-weight: 650;
	letter-spacing: 0.5px;
}

.tag {
	font-size: 12px;
	color: var(--muted);
	letter-spacing: 0.4px;
}

.meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12.5px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.live {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: #7fd39a;
}

.live i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 0 0 currentColor;
	animation: pulse 2.4s ease-out infinite;
}

.live.off {
	color: #d98b8b;
}

.live.off i {
	animation: none;
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(127, 211, 154, 0.5);
	}
	70% {
		box-shadow: 0 0 0 7px rgba(127, 211, 154, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(127, 211, 154, 0);
	}
}

.sep {
	opacity: 0.4;
}

.src {
	color: var(--muted);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.src:hover {
	color: var(--text);
	border-bottom-color: var(--line);
}

/* ------------------------------------------------------------------ kpis */

.kpis {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 22px;
}

.kpi {
	background: linear-gradient(180deg, var(--panel-2), var(--panel));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px 18px 14px;
}

.kpi .value {
	font-size: 30px;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.5px;
	font-variant-numeric: tabular-nums;
}

.kpi .value small {
	font-size: 15px;
	font-weight: 500;
	color: var(--muted);
	margin-left: 2px;
}

.kpi .label {
	margin-top: 7px;
	font-size: 12.5px;
	color: var(--muted);
}

/* ----------------------------------------------------------------- panel */

.panel {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 22px 22px;
	margin-bottom: 18px;
}

.panel-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.panel-head h2 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: #c7ced9;
}

.hint {
	margin: 0;
	font-size: 12.5px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ bars */

.bars {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.row {
	display: grid;
	grid-template-columns: 24px 118px minmax(0, 1fr) 46px 42px;
	align-items: center;
	gap: 12px;
	position: relative;
	padding: 4px 0;
	will-change: transform;
}

.row .rank {
	font-size: 12px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.row .name {
	font-size: 14.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.row .track {
	height: 12px;
	border-radius: 999px;
	background: #191d24;
	overflow: hidden;
}

.row .fill {
	height: 100%;
	width: 100%;
	border-radius: 999px;
	transform-origin: left center;
	transform: scaleX(0);
	background: linear-gradient(90deg, #2f5eab, var(--blue));
	transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.row .votes {
	font-size: 13.5px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.row .share {
	font-size: 12px;
	color: var(--muted);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* leader */
.row.lead .fill {
	background: linear-gradient(90deg, #a5761f, var(--gold) 60%, var(--gold-2));
	box-shadow: 0 0 18px rgba(233, 196, 106, 0.45);
}

.row.lead .name {
	font-weight: 600;
}

.row.lead .rank,
.row.lead .votes {
	color: var(--gold);
}

.row.lead .rank::after {
	content: "";
}

/* leader sheen */
.row.lead .fill {
	position: relative;
	overflow: hidden;
}

.row.lead .fill::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.5) 46%, transparent 70%);
	transform: translateX(-100%);
	animation: sheen 4.5s ease-in-out 1.2s infinite;
}

@keyframes sheen {
	0% {
		transform: translateX(-100%);
	}
	35%,
	100% {
		transform: translateX(130%);
	}
}

/* recent nominations */
.recent {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 18px 0 0;
	padding: 14px 0 0;
	list-style: none;
	border-top: 1px solid var(--line);
	font-size: 12px;
	color: var(--muted);
}

.recent::before {
	content: "最新提名";
	color: #5f6875;
	margin-right: 2px;
}

.recent li {
	display: inline-flex;
	gap: 6px;
	align-items: baseline;
	font-variant-numeric: tabular-nums;
}

.recent li b {
	font-weight: 500;
	color: #c7ced9;
}

.recent li span {
	color: #5f6875;
}

/* new votes flash */
.row .flash {
	position: absolute;
	right: -2px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 11px;
	color: var(--gold);
	opacity: 0;
	pointer-events: none;
}

.row.bump .fill {
	animation: bump 900ms ease-out;
}

.row.bump .flash {
	animation: floatUp 1.2s ease-out;
}

@keyframes bump {
	0% {
		filter: brightness(1);
	}
	18% {
		filter: brightness(1.55);
	}
	100% {
		filter: brightness(1);
	}
}

@keyframes floatUp {
	0% {
		opacity: 0;
		transform: translate(0, -40%);
	}
	25% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translate(6px, -140%);
	}
}

.empty {
	color: var(--muted);
	font-size: 13.5px;
	padding: 18px 2px;
}

/* ------------------------------------------------------------------ chart */

.chart {
	position: relative;
	height: 150px;
}

.chart canvas {
	width: 100%;
	height: 150px;
	display: block;
}

/* ----------------------------------------------------------------- footer */

footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 2px 0;
	font-size: 11.5px;
	color: #5f6875;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 760px) {
	body {
		padding: 0 14px 36px;
	}

	.kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.row {
		grid-template-columns: 18px 84px minmax(0, 1fr) 38px;
		gap: 9px;
	}

	.row .share {
		display: none;
	}

	.brand h1 {
		font-size: 21px;
	}

	.top {
		padding-top: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
	}
}
