/**
 * Peterbot — The Arena
 *
 * Scoped under .pbar-app and fully prefixed. The mock used generic names
 * (.wrap, .stat, .counter, .cta) that would have collided with almost any
 * theme; nothing here is reachable from outside.
 */

.pbar-app {
	--pbar-bg: #0a060c;
	--pbar-panel-a: #2a0e2e;
	--pbar-panel-b: #120610;
	--pbar-magenta: #c026c9;
	--pbar-pink: #ff2d9b;
	--pbar-cyan: #2ab8ff;
	--pbar-gold: #ffd24a;
	--pbar-green: #3dff8f;
	--pbar-white: #ffffff;
	--pbar-muted: #b9a8bd;
	--pbar-display: "Oswald", "Arial Narrow", sans-serif;
	--pbar-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--pbar-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	position: relative;
	isolation: isolate;
	overflow: hidden;
	box-sizing: border-box;
	background: var(--pbar-bg);
	color: var(--pbar-white);
	font-family: var(--pbar-body);
	line-height: 1.5;
	border-radius: 16px;
}

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

/* display:flex on a container beats a bare [hidden], so say it louder. */
.pbar-app [hidden] {
	display: none !important;
}

.pbar-atmosphere {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(900px 500px at 15% -10%, rgba(192, 38, 201, 0.15), transparent 60%),
		radial-gradient(800px 600px at 110% 40%, rgba(42, 184, 255, 0.07), transparent 60%),
		radial-gradient(700px 500px at 50% 120%, rgba(255, 45, 155, 0.08), transparent 60%);
}

.pbar-wrap {
	position: relative;
	z-index: 1;
	max-width: 980px;
	margin: 0 auto;
	padding: 48px 20px 56px;
}

/* ---------- hero counter ---------- */
.pbar-eyebrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: var(--pbar-mono);
	font-size: 11px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--pbar-pink);
}

.pbar-live-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--pbar-green);
	box-shadow: 0 0 10px var(--pbar-green);
	animation: pbar-blink 1.6s ease-in-out infinite;
	flex: none;
}

@keyframes pbar-blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.35;
	}
}

.pbar-counter {
	font-family: var(--pbar-mono);
	font-weight: 700;
	font-size: clamp(72px, 18vw, 180px);
	line-height: 1;
	text-align: center;
	margin-top: 10px;
	color: var(--pbar-white);
	text-shadow:
		0 0 40px rgba(42, 184, 255, 0.35),
		0 0 90px rgba(192, 38, 201, 0.25);
	font-variant-numeric: tabular-nums;
}

.pbar-counter.is-tick {
	animation: pbar-tick 0.35s ease;
}

@keyframes pbar-tick {
	40% {
		text-shadow:
			0 0 60px rgba(42, 184, 255, 0.7),
			0 0 120px rgba(192, 38, 201, 0.4);
	}
}

.pbar-counter-sub {
	text-align: center;
	font-family: var(--pbar-display);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: clamp(13px, 3vw, 20px);
	color: var(--pbar-muted);
	margin: 6px 0 0;
}

.pbar-accent {
	color: transparent;
	font-weight: 700;
	background: linear-gradient(92deg, var(--pbar-pink), var(--pbar-magenta));
	-webkit-background-clip: text;
	background-clip: text;
}

/* ---------- stat grid ---------- */
.pbar-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-top: 44px;
}

.pbar-stats.pbar-row2 {
	margin-top: 14px;
}

.pbar-stat {
	background: linear-gradient(160deg, var(--pbar-panel-a), var(--pbar-panel-b));
	border: 1px solid rgba(192, 38, 201, 0.45);
	border-radius: 14px;
	padding: 18px 16px;
	text-align: center;
	box-shadow: 0 0 24px rgba(192, 38, 201, 0.12);
	min-width: 0;
}

.pbar-stat .pbar-v {
	font-family: var(--pbar-mono);
	font-weight: 700;
	font-size: clamp(20px, 4.5vw, 34px);
	font-variant-numeric: tabular-nums;
	line-height: 1.15;
	overflow-wrap: anywhere;
}

.pbar-stat.pbar-gold .pbar-v {
	color: var(--pbar-gold);
	text-shadow: 0 0 16px rgba(255, 210, 74, 0.5);
}

.pbar-stat.pbar-cyan .pbar-v {
	color: var(--pbar-cyan);
	text-shadow: 0 0 16px rgba(42, 184, 255, 0.45);
}

.pbar-stat .pbar-k {
	font-family: var(--pbar-mono);
	font-size: 9.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--pbar-muted);
	margin-top: 7px;
}

.pbar-stat .pbar-note {
	font-family: var(--pbar-mono);
	font-size: 8.5px;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.35);
	margin-top: 4px;
	text-transform: uppercase;
}

.pbar-stats.pbar-row2 .pbar-stat {
	padding: 13px 14px;
}

.pbar-stats.pbar-row2 .pbar-stat .pbar-v {
	font-size: clamp(16px, 3.4vw, 24px);
}

@media (max-width: 560px) {
	.pbar-wrap {
		padding: 36px 14px 44px;
	}

	.pbar-stats {
		gap: 8px;
	}

	.pbar-stat {
		padding: 12px 8px;
	}
}

/* ---------- chart ---------- */
.pbar-chart-panel {
	margin-top: 44px;
	background: linear-gradient(160deg, var(--pbar-panel-a), var(--pbar-panel-b));
	border: 1px solid rgba(192, 38, 201, 0.5);
	border-radius: 16px;
	box-shadow: 0 0 30px rgba(192, 38, 201, 0.15);
	padding: 20px 20px 14px;
}

.pbar-chart-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.pbar-chart-title {
	font-family: var(--pbar-display);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 18px;
	margin: 0;
	color: var(--pbar-white);
}

.pbar-ranges {
	display: flex;
	gap: 6px;
}

.pbar-range-btn {
	font-family: var(--pbar-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	background: transparent;
	color: var(--pbar-muted);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 6px;
	padding: 6px 13px;
	cursor: pointer;
	text-transform: uppercase;
	transition:
		color 0.12s ease,
		border-color 0.12s ease,
		background-color 0.12s ease;
}

.pbar-range-btn:hover {
	border-color: rgba(42, 184, 255, 0.5);
	color: var(--pbar-white);
}

.pbar-range-btn:focus-visible {
	outline: 2px solid var(--pbar-cyan);
	outline-offset: 2px;
}

.pbar-range-btn.is-active {
	color: var(--pbar-cyan);
	border-color: var(--pbar-cyan);
	background: rgba(42, 184, 255, 0.1);
	box-shadow: 0 0 12px rgba(42, 184, 255, 0.25);
}

.pbar-chart-box {
	position: relative;
	height: 240px;
}

.pbar-canvas {
	width: 100%;
	height: 100%;
	display: block;
	cursor: crosshair;
	touch-action: pan-y;
}

.pbar-chart-tip {
	position: absolute;
	pointer-events: none;
	font-family: var(--pbar-mono);
	font-size: 10px;
	letter-spacing: 0.06em;
	background: rgba(10, 6, 12, 0.92);
	border: 1px solid rgba(42, 184, 255, 0.5);
	border-radius: 6px;
	padding: 6px 9px;
	white-space: nowrap;
	z-index: 2;
	transform: translate(-50%, -130%);
	color: var(--pbar-white);
}

.pbar-chart-tip b {
	color: var(--pbar-cyan);
}

.pbar-chart-msg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	text-align: center;
	font-family: var(--pbar-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
	padding: 0 12px;
}

/* ---------- CTA ---------- */
.pbar-cta {
	margin-top: 44px;
	background: linear-gradient(160deg, var(--pbar-panel-a), var(--pbar-panel-b));
	border: 1px solid rgba(255, 45, 155, 0.5);
	border-radius: 16px;
	box-shadow: 0 0 34px rgba(255, 45, 155, 0.16);
	padding: 28px 24px;
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 26px;
	align-items: center;
}

@media (max-width: 720px) {
	.pbar-cta {
		grid-template-columns: minmax(0, 1fr);
	}
}

.pbar-cta-title {
	font-family: var(--pbar-display);
	font-weight: 700;
	text-transform: uppercase;
	font-size: clamp(26px, 5vw, 38px);
	line-height: 1;
	margin: 0;
	color: var(--pbar-white);
}

.pbar-features {
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pbar-feat {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--pbar-muted);
	margin: 0;
}

.pbar-feat svg {
	width: 14px;
	height: 14px;
	stroke: var(--pbar-cyan);
	fill: none;
	stroke-width: 2.4;
	flex: none;
}

.pbar-cta-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.pbar-code-pill {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-family: var(--pbar-mono);
	font-weight: 700;
	font-size: clamp(15px, 3vw, 21px);
	letter-spacing: 0.08em;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(42, 184, 255, 0.5);
	border-radius: 12px;
	padding: 14px 18px;
	cursor: pointer;
	box-shadow: inset 0 0 20px rgba(42, 184, 255, 0.07);
	transition:
		border-color 0.12s ease,
		box-shadow 0.12s ease;
	color: var(--pbar-white);
	width: 100%;
}

.pbar-code-pill:hover {
	border-color: var(--pbar-cyan);
	box-shadow:
		0 0 18px rgba(42, 184, 255, 0.3),
		inset 0 0 20px rgba(42, 184, 255, 0.1);
}

.pbar-code-pill:focus-visible {
	outline: 2px solid var(--pbar-cyan);
	outline-offset: 2px;
}

.pbar-code {
	overflow-wrap: anywhere;
}

.pbar-cp {
	font-size: 9px;
	letter-spacing: 0.16em;
	color: var(--pbar-white);
	text-transform: uppercase;
	font-weight: 500;
	flex: none;
}

/* Scoped to .pbar-app and spelling out every link state: this is an <a>, and a
   bare .pbar-play-btn loses to the .entry-content a that most themes ship. */
.pbar-app .pbar-play-btn,
.pbar-app .pbar-play-btn:link,
.pbar-app .pbar-play-btn:visited {
	display: block;
	text-align: center;
	text-decoration: none;
	font-family: var(--pbar-display);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 17px;
	color: var(--pbar-white);
	background: linear-gradient(92deg, var(--pbar-pink), var(--pbar-magenta));
	border-radius: 999px;
	padding: 16px 20px;
	box-shadow: 0 0 24px rgba(255, 45, 155, 0.4);
	transition:
		box-shadow 0.12s ease,
		transform 0.12s ease;
}

.pbar-app .pbar-play-btn:hover,
.pbar-app .pbar-play-btn:focus,
.pbar-app .pbar-play-btn:active {
	color: var(--pbar-white);
	box-shadow: 0 0 36px rgba(255, 45, 155, 0.6);
}

.pbar-app .pbar-play-btn:active {
	transform: scale(0.98);
}

.pbar-train-link {
	text-align: center;
	font-family: var(--pbar-mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pbar-muted);
	margin: 0;
}

.pbar-train-link a {
	color: var(--pbar-cyan);
	text-decoration: none;
}

.pbar-train-link a:hover {
	text-decoration: underline;
}

/* ---------- footer ---------- */
.pbar-footer {
	margin-top: 40px;
	text-align: center;
	font-family: var(--pbar-mono);
	font-size: 9.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.28);
}

.pbar-footer .pbar-sep {
	margin: 0 6px;
}

/* The one number on the page that genuinely moves every second, so it gets
   tabular figures — otherwise the footer jitters as the digits change. */
.pbar-fresh {
	font-variant-numeric: tabular-nums;
}

.pbar-stale {
	color: var(--pbar-gold);
}

/* ---------- standalone mini counter ---------- */

/* This one drops into a header whose background belongs to the theme, and a
   theme header is as likely to be white as black. So it inherits the
   surrounding text colour instead of forcing the section's own palette —
   the dot carries the brand, not the type. */
.pbar-app-mini {
	display: inline-block;
	background: none;
	border-radius: 0;
	overflow: visible;
	line-height: inherit;
	color: inherit;
}

.pbar-mini {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--pbar-mono);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	color: inherit;
}

.pbar-mini-v {
	color: inherit;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.pbar-mini-k {
	opacity: 0.7;
}

a.pbar-mini:hover .pbar-mini-v {
	color: var(--pbar-cyan);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.pbar-app *,
	.pbar-app *::before,
	.pbar-app *::after {
		animation: none !important;
		transition: none !important;
	}

	.pbar-live-dot {
		opacity: 1;
	}
}
