.whg-app {
	--whg-gold: #f4bd45;
	--whg-green: #78f27c;
	--whg-red: #ff665b;
	--whg-blue: #73ddff;
	--whg-panel: #151b26;
	--whg-panel-soft: #1d2532;
	--whg-border: rgba(255, 255, 255, .14);
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: 16px;
	width: min(100%, 1420px);
	margin: 24px auto;
	color: #f8fafc;
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.whg-app *,
.whg-app *::before,
.whg-app *::after {
	box-sizing: border-box;
}

.whg-app--left .whg-leaderboard {
	grid-column: 1;
	grid-row: 1;
}

.whg-app--left .whg-game-panel {
	grid-column: 2;
}

.whg-app--left {
	grid-template-columns: 290px minmax(0, 1fr);
}

.whg-app--below {
	grid-template-columns: 1fr;
}

.whg-app--below .whg-leaderboard {
	width: 100%;
}

.whg-game-panel,
.whg-leaderboard {
	overflow: hidden;
	background: var(--whg-panel);
	border: 1px solid var(--whg-border);
	border-radius: 20px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.whg-eyebrow {
	margin-bottom: 5px;
	color: var(--whg-gold);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.whg-leaderboard {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	padding: 18px;
}

.whg-leaderboard__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.whg-leaderboard h3 {
	margin: 0;
	color: #fff;
	font-size: 25px;
	line-height: 1;
}

.whg-refresh {
	width: 36px;
	height: 36px;
	padding: 0;
	color: #cbd5e1;
	font: inherit;
	font-size: 22px;
	cursor: pointer;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--whg-border);
	border-radius: 9px;
}

.whg-periods {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 4px;
	background: rgba(0, 0, 0, .2);
	border-radius: 10px;
}

.whg-periods button {
	padding: 7px 4px;
	color: #9ba8b8;
	font: inherit;
	font-size: 11px;
	font-weight: 800;
	cursor: pointer;
	background: transparent;
	border: 0;
	border-radius: 7px;
}

.whg-periods button.is-active {
	color: #19140a;
	background: var(--whg-gold);
}

.whg-periods button:hover,
.whg-periods button:focus-visible {
	color: #17130a !important;
	background: var(--whg-gold);
}

.whg-leaderboard__list {
	flex: 1 1 auto;
	min-height: 250px;
	margin: 14px 0;
	padding: 0;
	list-style: none;
	transition: opacity .2s ease;
}

.whg-leaderboard__list.is-loading {
	opacity: .45;
}

.whg-leaderboard__list li {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 7px 5px;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.whg-leaderboard__list li:nth-child(1) .whg-rank { color: #ffd45b; }
.whg-leaderboard__list li:nth-child(2) .whg-rank { color: #d8e0ea; }
.whg-leaderboard__list li:nth-child(3) .whg-rank { color: #df9560; }

.whg-rank {
	color: #778599;
	font-weight: 900;
	text-align: center;
}

.whg-player {
	overflow: hidden;
	color: #e7edf5;
	font-size: 13px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.whg-leaderboard__list strong {
	color: var(--whg-gold);
	font-size: 15px;
}

.whg-leaderboard__list .whg-leaderboard__empty {
	display: block;
	padding: 28px 8px;
	color: #8e9aac;
	font-size: 13px;
	text-align: center;
	border: 0;
}

.whg-profile {
	margin-top: auto;
	padding: 14px;
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 12px;
}

.whg-profile label,
.whg-profile > strong {
	display: block;
	margin-bottom: 7px;
	color: #fff;
	font-size: 13px;
}

.whg-profile__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
}

.whg-profile input {
	min-width: 0;
	padding: 8px 9px;
	color: #fff;
	font: inherit;
	font-size: 13px;
	background: rgba(0, 0, 0, .25);
	border: 1px solid var(--whg-border);
	border-radius: 8px;
}

.whg-profile button,
.whg-login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 10px;
	color: #17130a;
	font: inherit;
	font-size: 12px;
	font-weight: 850;
	text-decoration: none;
	cursor: pointer;
	background: var(--whg-gold);
	border: 0;
	border-radius: 8px;
}

.whg-profile button {
	width: 100%;
	min-height: 38px;
}

.whg-profile button:hover,
.whg-profile button:focus-visible,
.whg-login:hover,
.whg-login:focus-visible {
	color: #17130a !important;
	background: #ffd05a;
}

.whg-profile p {
	margin: 8px 0 0;
	color: #8f9daf;
	font-size: 11px;
	line-height: 1.4;
}

.whg-profile__status {
	min-height: 16px;
	margin-top: 6px;
	color: var(--whg-green);
	font-size: 11px;
}

@media (max-width: 980px) {
	.whg-app,
	.whg-app--left {
		grid-template-columns: 1fr;
	}

	.whg-app--left .whg-game-panel,
	.whg-app--left .whg-leaderboard {
		grid-column: 1;
		grid-row: auto;
	}

	.whg-app--left .whg-leaderboard {
		order: 2;
	}

	.whg-leaderboard__list {
		flex: none;
		min-height: 0;
	}

	.whg-leaderboard {
		align-self: auto;
	}
}
