:root {
	--bg: #0d1117;
	--panel: #161b22;
	--panel-muted: #0f141b;
	--border: #30363d;
	--text: #c9d1d9;
	--text-muted: #8b949e;
	--accent: #c9d1d9;
	--cursor-x: 50vw;
	--cursor-y: 35vh;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	position: relative;
	font-family: "Space Grotesk", sans-serif;
	color: var(--text);
	background-color: var(--bg);
	background-image: radial-gradient(circle, rgba(240, 246, 252, 0.075) 1px, transparent 1.35px);
	background-size: 22px 22px;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image: radial-gradient(circle, rgba(240, 246, 252, 0.125) 1px, transparent 1.35px);
	background-size: 22px 22px;
	-webkit-mask-image: radial-gradient(
		circle 300px at var(--cursor-x) var(--cursor-y),
		rgba(0, 0, 0, 0.9) 0%,
		rgba(0, 0, 0, 0.45) 48%,
		rgba(0, 0, 0, 0) 85%
	);
	mask-image: radial-gradient(
		circle 300px at var(--cursor-x) var(--cursor-y),
		rgba(0, 0, 0, 0.9) 0%,
		rgba(0, 0, 0, 0.45) 48%,
		rgba(0, 0, 0, 0) 85%
	);
}

.container {
	width: min(1100px, 92vw);
	margin: 48px auto;
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.server {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	animation: card-in 380ms ease-out both;
	transition: border-color 180ms ease, background-color 180ms ease, opacity 180ms ease, filter 180ms ease;
}

.server--best-ping {
	border-color: #6e7681;
	background: var(--panel);
}

.server--best-ping .head {
	background: var(--panel-muted);
}

.server--best-ping .ping p {
	border-color: #6e7681;
	color: var(--text);
}

.server--dim {
	background: #0b1016;
	border-color: #202833;
	opacity: 0.72;
	filter: saturate(0.8) brightness(0.75);
}

.server--dim .head {
	background: #0a0f15;
}

.server:nth-child(1) {
	animation-delay: 40ms;
}

.server:nth-child(2) {
	animation-delay: 90ms;
}

.server:nth-child(3) {
	animation-delay: 140ms;
}

.server--overview {
	grid-column: 1 / -1;
	margin-bottom: 10px;
}

.head--overview {
	grid-template-columns: 1fr;
	grid-template-areas:
		"title"
		"location";
}

.head {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"title ping"
		"location ping";
	row-gap: 4px;
	column-gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--border);
	background: var(--panel-muted);
}

.head h1, h2 {
	grid-area: title;
	margin: 0;
	font-weight: 600;
	color: #f0f6fc;
}

.head > p {
	grid-area: location;
	margin: 0;
	font-size: 14px;
	color: var(--text-muted);
}

.ping {
	grid-area: ping;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	flex-wrap: wrap;
}

.chip {
	margin: 0;
	padding: 5px 9px;
	border: 1px solid var(--border);
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--text-muted);
	white-space: nowrap;
	background: rgba(240, 246, 252, 0.015);
}

.chip span {
    margin-right: -3px;
}


.chip-icon {
	font-size: 14px;
	font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
	color: #79b8ff;
	flex-shrink: 0;
}

.chip--ping {
	animation: ping-glow 2.6s ease-in-out infinite;
}

.ping span {
	color: var(--accent);
	font-weight: 600;
}

.content {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	padding: 14px;
}

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

.content a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 96px;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: transparent;
	color: var(--text);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.content a:hover {
	border-color: #6e7681;
	background: rgba(240, 246, 252, 0.02);
	transform: translateY(-1px);
}

.content a .material-symbols-rounded {
	font-size: 24px;
	line-height: 1;
	font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
	color: #79b8ff;
	transition: transform 180ms ease, color 180ms ease;
}

.content a:hover .material-symbols-rounded {
	color: #a5d6ff;
	transform: translateY(-1px);
}

@keyframes card-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ping-glow {
	0%,
	100% {
		border-color: var(--border);
	}
	50% {
		border-color: #46505b;
	}
}

@media (prefers-reduced-motion: reduce) {
	.server,
	.stat,
	.chip,
	.content a,
	.content a .material-symbols-rounded {
		animation: none !important;
		transition: none !important;
	}
}

@media (max-width: 760px) {
	.container {
		grid-template-columns: 1fr;
		gap: 14px;
		margin: 24px auto;
	}

	.head {
		padding: 14px;
	}

	.content {
		padding: 12px;
	}
}
