.pbg-hcard {
	--hc-bg: #1e1e26;
	position: absolute;
	z-index: 9999;
	width: 320px;
	max-width: calc(100vw - 20px);
	border-radius: 18px;
	background: var(--hc-bg);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px) scale(0.97);
	transform-origin: 50% 0;
	transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.18s;
	pointer-events: none;
	overflow: hidden;
	font-family: inherit;
	text-align: left;
}

.pbg-hcard--above {
	transform: translateY(4px) scale(0.97);
	transform-origin: 50% 100%;
}

.pbg-hcard.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
}

.pbg-hcard__arrow {
	display: none;
}

.pbg-hcard__body {
	position: relative;
	z-index: 1;
}

.pbg-hcard__inner {
	--hc-accent: #4fea9f;
	position: relative;
	overflow: hidden;
	border-radius: 18px;
}

.pbg-hcard__inner:before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background: radial-gradient(120% 60% at 0 0, color-mix(in srgb, var(--hc-accent) 16%, transparent), transparent 60%);
	pointer-events: none;
}

.pbg-hcard__inner > * {
	position: relative;
	z-index: 1;
}

.pbg-hcard__cover {
	position: relative;
	height: 92px;
	overflow: hidden;
	background: linear-gradient(135deg, color-mix(in srgb, var(--hc-accent) 38%, #1e1e26), #1e1e26);
}

.pbg-hcard__cover .mst-adm-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	object-fit: cover;
	transform: scale(1.02);
}

.pbg-hcard__cover .mst-adm-bg-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.15);
}

.pbg-hcard__cover:after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	background: linear-gradient(180deg, rgba(30, 30, 38, 0) 20%, var(--hc-bg, #1e1e26) 100%);
}

.pbg-hcard__head {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	margin-top: -44px;
	padding: 0 16px;
}

.pbg-hcard__avatar {
	position: relative;
	z-index: 2;
	display: inline-block;
	flex: 0 0 auto;
	line-height: 0;
	border-radius: 16px;
	text-decoration: none;
	transition: transform 0.2s ease;
}

.pbg-hcard__avatar:hover {
	transform: translateY(-2px);
}

.pbg-hcard__quick {
	display: flex;
	gap: 6px;
	margin-left: auto;
	padding-bottom: 4px;
}

.pbg-hcard__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.85);
	font-size: 18px;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pbg-hcard__icon-btn:hover {
	background: color-mix(in srgb, var(--hc-accent) 22%, transparent);
	border-color: color-mix(in srgb, var(--hc-accent) 45%, transparent);
	color: #fff;
	text-decoration: none;
}

.pbg-hcard__main {
	padding: 10px 16px 12px;
}

.pbg-hcard__ident {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.pbg-hcard__login {
	overflow: hidden;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	white-space: nowrap;
	text-overflow: ellipsis;
	text-decoration: none;
}

.pbg-hcard__login:hover {
	text-decoration: none;
	filter: brightness(1.15);
}

.pbg-hcard__flag {
	display: inline-flex;
	flex: 0 0 auto;
	width: 20px;
	height: 14px;
	overflow: hidden;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.pbg-hcard__flag img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pbg-hcard__badges {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
}

.pbg-hcard__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 7px;
}

.pbg-hcard__tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 22px;
	padding: 0 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.pbg-hcard__tag--group {
	background: color-mix(in srgb, var(--hc-accent) 14%, transparent);
	border: 1px solid color-mix(in srgb, var(--hc-accent) 32%, transparent);
	color: var(--hc-accent);
}

.pbg-hcard__tag--group i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--hc-accent);
	box-shadow: 0 0 8px var(--hc-accent);
}

.pbg-hcard__tag--premium {
	background: linear-gradient(135deg, #ffd166, #f0a429);
	color: #3d2600;
}

.pbg-hcard__tag--self {
	background: rgba(255, 255, 255, 0.07);
	color: rgba(255, 255, 255, 0.7);
}

.pbg-hcard__status {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	padding: 9px 11px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.035);
	color: rgba(255, 255, 255, 0.78);
	font-size: 12.5px;
	line-height: 1.45;
	word-break: break-word;
}

.pbg-hcard__status i {
	flex: 0 0 auto;
	margin-top: 1px;
	color: color-mix(in srgb, var(--hc-accent) 80%, #fff);
	font-size: 14px;
	opacity: 0.8;
}

.pbg-hcard__status span {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pbg-hcard__team {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	padding: 8px 10px;
	border-radius: 12px;
	background: linear-gradient(90deg, color-mix(in srgb, var(--team-color, #4fea9f) 14%, transparent), rgba(255, 255, 255, 0.02));
	border: 1px solid color-mix(in srgb, var(--team-color, #4fea9f) 26%, transparent);
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.pbg-hcard__team:hover {
	border-color: color-mix(in srgb, var(--team-color, #4fea9f) 55%, transparent);
	text-decoration: none;
}

.pbg-hcard__team-logo {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	object-fit: cover;
	background: rgba(255, 255, 255, 0.06);
}

.pbg-hcard__team-info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.pbg-hcard__team-name {
	overflow: hidden;
	color: #fff;
	font-size: 12.5px;
	font-weight: 800;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.pbg-hcard__team-lvl {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: #ffc94a;
	font-size: 10.5px;
	font-weight: 800;
}

.pbg-hcard__team-lvl i {
	font-size: 10px;
}

.pbg-hcard__team-go {
	flex: 0 0 auto;
	color: rgba(255, 255, 255, 0.4);
	font-size: 18px;
}

.pbg-hcard__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}

.pbg-hcard__pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	max-width: 100%;
	height: 24px;
	padding: 0 9px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.6);
	font-size: 11.5px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pbg-hcard__pill i {
	flex: 0 0 auto;
	color: rgba(255, 255, 255, 0.4);
	font-size: 13px;
}

.pbg-hcard__offline {
	overflow: hidden;
	text-overflow: ellipsis;
}

.pbg-hcard__stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	padding: 0 12px 10px;
}

.pbg-hcard__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	min-width: 0;
	padding: 8px 2px 7px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.035);
	transition: background 0.15s ease;
}

.pbg-hcard__stat:hover {
	background: rgba(255, 255, 255, 0.06);
}

.pbg-hcard__stat i {
	margin-bottom: 2px;
	color: color-mix(in srgb, var(--hc-accent) 75%, #fff);
	font-size: 15px;
	opacity: 0.85;
}

.pbg-hcard__stat b {
	color: #fff;
	font-size: 14.5px;
	font-weight: 800;
	line-height: 1.2;
}

.pbg-hcard__stat span {
	max-width: 100%;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.42);
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.pbg-hcard__cta {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	margin: 0 12px 12px;
	padding: 0 14px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--hc-accent) 16%, transparent);
	border: 1px solid color-mix(in srgb, var(--hc-accent) 34%, transparent);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.pbg-hcard__cta i {
	color: var(--hc-accent);
	font-size: 17px;
}

.pbg-hcard__cta span {
	flex: 1 1 auto;
}

.pbg-hcard__cta:hover {
	background: color-mix(in srgb, var(--hc-accent) 28%, transparent);
	border-color: color-mix(in srgb, var(--hc-accent) 60%, transparent);
	color: #fff;
	text-decoration: none;
}

.pbg-hcard__cta-arrow {
	transition: transform 0.2s ease;
}

.pbg-hcard__cta:hover .pbg-hcard__cta-arrow {
	transform: translateX(3px);
}

.pbg-hcard--premium {
	--hc-bg: #221d15;
	border-color: rgba(240, 180, 41, 0.4);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(240, 180, 41, 0.14);
}

.pbg-hcard__inner--premium:before {
	background:
		radial-gradient(120% 60% at 0 0, rgba(240, 180, 41, 0.18), transparent 60%),
		linear-gradient(180deg, transparent 40%, rgba(240, 180, 41, 0.04));
}

.pbg-hcard__inner--premium .pbg-hcard__cover:after {
	background: linear-gradient(180deg, rgba(34, 29, 21, 0) 20%, #221d15 100%);
}

.pbg-hcard__inner--premium .pbg-hcard__avatar {
	box-shadow: 0 0 0 2px rgba(240, 180, 41, 0.7), 0 6px 18px rgba(240, 180, 41, 0.25);
}

.pbg-hcard__inner--premium .pbg-hcard__stat {
	background: rgba(240, 180, 41, 0.06);
}

.pbg-hcard__inner--premium .pbg-hcard__stat b {
	color: #ffe2a0;
}

.pbg-hcard__inner--premium .pbg-hcard__cta {
	background: linear-gradient(135deg, #ffd166, #f0a429);
	border-color: transparent;
	color: #3d2600;
}

.pbg-hcard__inner--premium .pbg-hcard__cta i {
	color: #3d2600;
}

.pbg-hcard__inner--premium .pbg-hcard__cta:hover {
	background: linear-gradient(135deg, #ffdc85, #f5b33b);
	color: #3d2600;
}

.pbg-hcard__inner--skeleton .pbg-hcard__cover {
	background: rgba(255, 255, 255, 0.03);
}

.pbg-hcard__inner--skeleton .pbg-hcard__main {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 14px;
}

.pbg-hcard__sk {
	display: block;
	border-radius: 8px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.05) 75%);
	background-size: 200% 100%;
	animation: pbgHcardShimmer 1.1s linear infinite;
}

.pbg-hcard__sk--ava {
	position: relative;
	z-index: 2;
	width: 74px;
	height: 74px;
	border-radius: 16px;
	box-shadow: 0 0 0 3px var(--hc-bg, #1e1e26);
}

.pbg-hcard__sk--line {
	height: 12px;
}

.pbg-hcard__sk--tile {
	height: 58px;
	border-radius: 12px;
}

.pbg-hcard__inner--skeleton .pbg-hcard__stats {
	padding-bottom: 12px;
}

@keyframes pbgHcardShimmer {
	to { background-position: -200% 0; }
}

@media (max-width: 560px) {
	.pbg-hcard {
		width: calc(100vw - 24px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pbg-hcard, .pbg-hcard__avatar, .pbg-hcard__cta-arrow {
		transition: none;
	}
	.pbg-hcard__sk {
		animation: none;
	}
}
