/**
 * Predictions + Leaderboard hub pages — visual upgrade (2026-09-16).
 * Loaded only on those two pages, after cricket-predictions.css, so every
 * rule here is an override layer; markup is unchanged apart from the
 * accuracy bar cell and data-countup attributes. Motion is transform/
 * opacity only and fully disabled under prefers-reduced-motion.
 *
 * Stage   — full-width section, drifting aurora glows, floodlight beams,
 *           pitch-grid floor, grain (all pointer-events:none, behind content)
 * Hero    — gradient display title, live chip, glass stat tiles
 * Tabs    — segmented control with a sliding indicator (cricket-hub.js)
 * Content — staggered reveal, card hover glow, podium + ranking rows
 */

:root {
	--hub-ink: #040a16;
	--hub-navy: #0a1a33;
	--hub-ice: #f1f6ff;
	--hub-ice-2: rgba( 234, 244, 255, 0.74 );
	--hub-ice-3: rgba( 234, 244, 255, 0.5 );
	--hub-gold: #ffb020;
	--hub-gold-2: #ffd66b;
	--hub-coral: #ff6b6b;
	--hub-teal: #4fd1c5;
	--hub-blue: #3a86e0;
	--hub-green: #4fd18b;
	--hub-line: rgba( 255, 255, 255, 0.09 );
	--hub-glass: rgba( 255, 255, 255, 0.045 );
	--hub-display: 'Outfit', 'PT Sans', sans-serif;
	--hub-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
	--hub-ease: cubic-bezier( 0.16, 1, 0.3, 1 );
}

/* Full-bleed stage. The template's section sits inside header.php's
   Bootstrap .container > .row (a flex row), where it was shrinking to its
   content width — the cramped centred box. Take the full row, then break
   out to the viewport edges; `clip` stops the 100vw from adding a
   horizontal scrollbar without creating a scroll container. */
body.page-template-cricket-leaderboard,
body.page-template-cricket-predictions,
body[class*="page-template-page-templatescricket-leaderboard"],
body[class*="page-template-page-templatescricket-predictions"] {
	overflow-x: clip;
}

.site-content-row > .cricket-leaderboard-page,
.site-content-row > .cricket-predictions-page,
.row > .cricket-leaderboard-page,
.row > .cricket-predictions-page {
	flex: 0 0 auto;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc( 50% - 50vw );
	margin-right: calc( 50% - 50vw );
}

.cricket-leaderboard-page,
.cricket-predictions-page {
	isolation: isolate;
	padding: 72px 0 110px;
	min-height: 70vh;
	background:
		radial-gradient( 120% 70% at 50% 0%, #10284d 0%, rgba( 16, 40, 77, 0 ) 60% ),
		linear-gradient( 180deg, #0b1d3a 0%, #071329 38%, #050d1d 72%, var( --hub-ink ) 100% );
}

/* The site already shows a breadcrumb bar above every page. */
.cricket-leaderboard-page .cricket-leaderboard-page__crumb,
.cricket-predictions-page .cricket-leaderboard-page__crumb {
	display: none;
}

/* ---------------------------------------------------------------------
 * Stage effects — reuse the existing __fx / __arc / __grain elements.
 * ------------------------------------------------------------------- */

.cricket-leaderboard-page__fx,
.cricket-predictions-page__fx {
	z-index: -1;
}

/* Aurora glows: two soft blobs drifting slowly. */
.cricket-leaderboard-page__fx::before,
.cricket-leaderboard-page__fx::after,
.cricket-predictions-page__fx::before,
.cricket-predictions-page__fx::after {
	content: "";
	position: absolute;
	width: 62vmax;
	height: 62vmax;
	border-radius: 50%;
	filter: blur( 90px );
	opacity: 0.5;
	will-change: transform;
}

.cricket-leaderboard-page__fx::before,
.cricket-predictions-page__fx::before {
	top: -32vmax;
	left: -18vmax;
	background: radial-gradient( circle, rgba( 255, 176, 32, 0.34 ), rgba( 255, 107, 107, 0.12 ) 45%, transparent 70% );
	animation: hub-drift-a 26s ease-in-out infinite alternate;
}

.cricket-leaderboard-page__fx::after,
.cricket-predictions-page__fx::after {
	top: -20vmax;
	right: -22vmax;
	background: radial-gradient( circle, rgba( 58, 134, 224, 0.42 ), rgba( 79, 209, 197, 0.14 ) 45%, transparent 70% );
	animation: hub-drift-b 32s ease-in-out infinite alternate;
}

.cricket-predictions-page__fx::before {
	background: radial-gradient( circle, rgba( 79, 209, 197, 0.26 ), rgba( 58, 134, 224, 0.14 ) 45%, transparent 70% );
}

.cricket-predictions-page__fx::after {
	background: radial-gradient( circle, rgba( 255, 176, 32, 0.3 ), rgba( 255, 107, 107, 0.12 ) 45%, transparent 70% );
}

@keyframes hub-drift-a {
	from { transform: translate3d( 0, 0, 0 ) scale( 1 ); }
	to { transform: translate3d( 8vmax, 5vmax, 0 ) scale( 1.12 ); }
}

@keyframes hub-drift-b {
	from { transform: translate3d( 0, 0, 0 ) scale( 1.05 ); }
	to { transform: translate3d( -7vmax, 7vmax, 0 ) scale( 0.95 ); }
}

/* Floodlight beams (the old decorative arcs, reshaped). */
/* Beams hang from the two top corners and fall inward, fading out well
   before the centre so they frame the hero instead of crossing behind it. */
.cricket-leaderboard-page__arc,
.cricket-predictions-page__arc {
	top: -6% !important;
	bottom: auto !important;
	width: 24vw !important;
	height: 900px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: linear-gradient( 180deg, rgba( 255, 244, 214, 0.09 ), rgba( 255, 244, 214, 0.025 ) 40%, transparent 70% );
	clip-path: polygon( 42% 0, 58% 0, 100% 100%, 0 100% );
	transform-origin: 50% 0;
	opacity: 0.6;
	animation: hub-beam 14s ease-in-out infinite alternate;
}

.cricket-leaderboard-page__arc--a,
.cricket-predictions-page__arc--a {
	left: -8% !important;
	right: auto !important;
	transform: rotate( -18deg );
}

.cricket-leaderboard-page__arc--b,
.cricket-predictions-page__arc--b {
	right: -8% !important;
	left: auto !important;
	transform: rotate( 18deg );
	animation-delay: -7s;
}

@keyframes hub-beam {
	from { opacity: 0.35; }
	to { opacity: 0.75; }
}

/* Pitch-grid floor fading into the page bottom. */
.cricket-leaderboard-page__grain,
.cricket-predictions-page__grain {
	opacity: 1;
	mix-blend-mode: normal;
	background-image:
		var( --proace-grain ),
		linear-gradient( rgba( 255, 255, 255, 0.045 ) 1px, transparent 1px ),
		linear-gradient( 90deg, rgba( 255, 255, 255, 0.045 ) 1px, transparent 1px );
	background-size: auto, 56px 56px, 56px 56px;
	-webkit-mask-image: radial-gradient( 90% 60% at 50% 100%, #000 10%, transparent 70% );
	mask-image: radial-gradient( 90% 60% at 50% 100%, #000 10%, transparent 70% );
}

/* ---------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------- */

.cricket-leaderboard-page .cricket-leaderboard-page__header,
.cricket-predictions-page .cricket-leaderboard-page__header {
	max-width: 760px;
	margin: 0 auto 44px;
	animation: hub-rise 0.9s var( --hub-ease ) both;
}

.cricket-leaderboard-page__title,
.cricket-predictions-page__title {
	margin: 0 0 16px !important;
	font-family: var( --hub-display ) !important;
	font-size: clamp( 44px, 7vw, 84px ) !important;
	font-weight: 900 !important;
	line-height: 0.98 !important;
	letter-spacing: -0.03em !important;
	background-image: linear-gradient( 180deg, #ffffff 0%, #dbe8ff 55%, #9fb9df 100% ) !important;
	background-size: 100% 100% !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	color: transparent !important;
	-webkit-text-fill-color: transparent !important;
	filter: drop-shadow( 0 10px 40px rgba( 58, 134, 224, 0.35 ) ) !important;
}

.cricket-leaderboard-page__title {
	background-image: linear-gradient( 100deg, #fff4cc 0%, var( --hub-gold-2 ) 30%, var( --hub-gold ) 55%, #ff8a5c 100% ) !important;
	background-size: 200% 100% !important;
	filter: drop-shadow( 0 10px 42px rgba( 255, 176, 32, 0.35 ) ) !important;
	animation: hub-sheen 7s ease-in-out infinite alternate;
}

@keyframes hub-sheen {
	from { background-position: 0% 50%; }
	to { background-position: 100% 50%; }
}

.cricket-leaderboard-page .cricket-leaderboard-page__sub,
.cricket-predictions-page .cricket-leaderboard-page__sub {
	max-width: 58ch;
	margin: 0 auto;
	font-size: clamp( 16px, 1.6vw, 18.5px );
	line-height: 1.6;
	color: var( --hub-ice-2 );
}

/* Live chips */
.cricket-leaderboard-page__updated,
.cricket-predictions-page__live-badge {
	position: relative;
	gap: 9px !important;
	margin-top: 22px;
	padding: 7px 16px 7px 12px !important;
	font-size: 10.5px !important;
	letter-spacing: 0.1em !important;
	backdrop-filter: blur( 10px );
	-webkit-backdrop-filter: blur( 10px );
}

.cricket-predictions-page__live-badge {
	margin: 0 0 22px;
	color: #ffb4b4 !important;
}

.cricket-leaderboard-page__updated::before,
.cricket-predictions-page__live-badge .dot {
	animation: hub-ping 1.8s ease-out infinite;
}

.cricket-leaderboard-page__updated::before {
	box-shadow: 0 0 0 0 rgba( 79, 209, 139, 0.6 );
}

@keyframes hub-ping {
	0% { box-shadow: 0 0 0 0 currentColor; }
	70%, 100% { box-shadow: 0 0 0 8px rgba( 0, 0, 0, 0 ); }
}

/* Stat tiles (Predictions page) */
.cricket-predictions-page__stats {
	gap: 14px !important;
	margin: 34px 0 6px !important;
}

.cricket-predictions-page__stat {
	position: relative;
	gap: 14px !important;
	min-width: 190px;
	padding: 16px 22px 16px 16px !important;
	border-radius: 18px !important;
	background: linear-gradient( 160deg, rgba( 255, 255, 255, 0.08 ), rgba( 255, 255, 255, 0.02 ) ) !important;
	border: 1px solid rgba( 255, 255, 255, 0.12 ) !important;
	box-shadow: 0 20px 40px -24px rgba( 0, 0, 0, 0.8 ), inset 0 1px 0 rgba( 255, 255, 255, 0.08 ) !important;
	backdrop-filter: blur( 14px );
	-webkit-backdrop-filter: blur( 14px );
	text-align: left;
	transition: transform 0.35s var( --hub-ease ), border-color 0.35s ease;
}

.cricket-predictions-page__stat:hover {
	transform: translateY( -4px );
	border-color: rgba( 255, 176, 32, 0.4 ) !important;
}

.cricket-predictions-page__stat svg {
	box-sizing: content-box;
	width: 20px;
	height: 20px;
	padding: 11px;
	border-radius: 13px;
	color: #1a1200 !important;
	background: linear-gradient( 135deg, var( --hub-gold-2 ), var( --hub-gold ) 55%, #ff8a5c );
	box-shadow: 0 10px 22px -10px rgba( 255, 150, 50, 0.8 );
}

.cricket-predictions-page__stat:nth-child( 2 ) svg {
	background: linear-gradient( 135deg, #9be7ff, var( --hub-blue ) );
	color: #04203f !important;
	box-shadow: 0 10px 22px -10px rgba( 58, 134, 224, 0.8 );
}

.cricket-predictions-page__stat:nth-child( 3 ) svg {
	background: linear-gradient( 135deg, #b7f5d0, var( --hub-green ) );
	color: #06331c !important;
	box-shadow: 0 10px 22px -10px rgba( 79, 209, 139, 0.8 );
}

.cricket-predictions-page__stat b {
	font-family: var( --hub-display ) !important;
	font-size: 28px !important;
	font-weight: 800 !important;
	color: var( --hub-ice ) !important;
	font-variant-numeric: tabular-nums;
}

.cricket-predictions-page__stat span {
	font-size: 10px !important;
	color: var( --hub-ice-3 ) !important;
	letter-spacing: 0.08em !important;
}

/* ---------------------------------------------------------------------
 * Segmented tabs with sliding indicator
 * ------------------------------------------------------------------- */

.cricket-leaderboard-page .cricket-predictions-tabs,
.cricket-predictions-page .cricket-predictions-tabs {
	position: relative;
	display: flex;
	width: max-content;
	max-width: 100%;
	margin: 34px auto 44px;
	padding: 6px;
	gap: 4px;
	border-radius: 999px;
	background: rgba( 6, 16, 34, 0.7 );
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	box-shadow: 0 20px 40px -24px rgba( 0, 0, 0, 0.9 ), inset 0 1px 0 rgba( 255, 255, 255, 0.05 );
	backdrop-filter: blur( 14px );
	-webkit-backdrop-filter: blur( 14px );
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
}

.cricket-leaderboard-page .cricket-leaderboard-periods {
	margin: 30px auto 36px;
}

.cricket-predictions-tabs::-webkit-scrollbar {
	display: none;
}

.cricket-hub-tabs__indicator {
	position: absolute;
	top: 6px;
	left: 0;
	height: calc( 100% - 12px );
	border-radius: 999px;
	background: linear-gradient( 135deg, var( --hub-gold-2 ), var( --hub-gold ) 50%, #ff8a5c );
	box-shadow: 0 10px 24px -8px rgba( 255, 150, 50, 0.65 );
	transition: transform 0.45s var( --hub-ease ), width 0.45s var( --hub-ease );
	pointer-events: none;
	z-index: 0;
}

.cricket-leaderboard-page .cricket-predictions-tab,
.cricket-predictions-page .cricket-predictions-tab,
.cricket-leaderboard-page .cricket-predictions-tab:visited,
.cricket-predictions-page .cricket-predictions-tab:visited {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var( --hub-ice-2 );
	font-family: var( --hub-mono );
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color 0.3s ease;
}

.cricket-leaderboard-page .cricket-predictions-tab:hover,
.cricket-predictions-page .cricket-predictions-tab:hover {
	color: #ffffff;
	background: rgba( 255, 255, 255, 0.05 );
}

/* Without JS (or before it runs) the active tab paints its own pill. */
.cricket-leaderboard-page .cricket-predictions-tab.active,
.cricket-predictions-page .cricket-predictions-tab.active {
	color: #1a1200;
	background: linear-gradient( 135deg, var( --hub-gold-2 ), var( --hub-gold ) 50%, #ff8a5c );
	box-shadow: 0 10px 24px -8px rgba( 255, 150, 50, 0.65 );
}

.cricket-predictions-tabs.has-indicator .cricket-predictions-tab.active {
	background: transparent;
	box-shadow: none;
}

.cricket-predictions-page .cricket-predictions-tab .n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	margin: 0;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.1 );
	font-size: 10.5px;
	opacity: 1;
}

.cricket-predictions-page .cricket-predictions-tab.active .n {
	background: rgba( 26, 18, 0, 0.16 );
}

.cricket-predictions-page .cricket-predictions-tab:focus-visible,
.cricket-leaderboard-page .cricket-predictions-tab:focus-visible {
	outline: 2px solid var( --hub-ice );
	outline-offset: 3px;
}

/* ---------------------------------------------------------------------
 * Reveal-on-scroll (cricket-hub.js adds .hub-js to <html>, .is-in on view)
 * ------------------------------------------------------------------- */

.hub-js [data-hub-reveal] {
	opacity: 0;
	transform: translateY( 26px ) scale( 0.985 );
	transition: opacity 0.8s var( --hub-ease ), transform 0.8s var( --hub-ease );
	transition-delay: calc( var( --hub-i, 0 ) * 70ms );
}

.hub-js [data-hub-reveal].is-in {
	opacity: 1;
	transform: none;
}

@keyframes hub-rise {
	from { opacity: 0; transform: translateY( 22px ); }
	to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
 * Predictions grid cards
 * ------------------------------------------------------------------- */

.cricket-predictions-page .proace-predictions-grid {
	max-width: 1080px;
	gap: 24px;
}

.cricket-predictions-page .proace-prediction {
	position: relative;
}

/* Gradient hairline border that lights up on hover. */
.cricket-predictions-page .proace-prediction__surface {
	position: relative;
	padding: 24px 26px;
	border-radius: 20px;
	background:
		radial-gradient( 120% 80% at 100% 0%, rgba( 58, 134, 224, 0.14 ), transparent 55% ),
		linear-gradient( 180deg, rgba( 15, 36, 66, 0.92 ), rgba( 8, 20, 40, 0.94 ) );
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	box-shadow: 0 30px 60px -34px rgba( 0, 0, 0, 0.9 ), inset 0 1px 0 rgba( 255, 255, 255, 0.07 );
	transition: transform 0.45s var( --hub-ease ), box-shadow 0.45s ease, border-color 0.45s ease;
}

.cricket-predictions-page .proace-prediction__surface::after {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient( 135deg, rgba( 255, 214, 107, 0.9 ), rgba( 255, 107, 107, 0.4 ) 40%, rgba( 58, 134, 224, 0.6 ) 100% );
	-webkit-mask: linear-gradient( #000 0 0 ) content-box, linear-gradient( #000 0 0 );
	-webkit-mask-composite: xor;
	mask: linear-gradient( #000 0 0 ) content-box exclude, linear-gradient( #000 0 0 );
	opacity: 0;
	transition: opacity 0.45s ease;
	pointer-events: none;
}

.cricket-predictions-page .proace-prediction:hover .proace-prediction__surface {
	transform: translateY( -6px );
	box-shadow: 0 40px 70px -34px rgba( 0, 0, 0, 0.95 ), 0 0 60px -30px rgba( 255, 176, 32, 0.45 );
}

.cricket-predictions-page .proace-prediction:hover .proace-prediction__surface::after {
	opacity: 1;
}

/* Open predictions: a thin animated gold light along the top edge. */
.cricket-predictions-page .proace-prediction:not( .proace-prediction--resolved ):not( .proace-prediction--locked ) .proace-prediction__surface::before {
	content: "";
	position: absolute;
	top: 0;
	left: 12%;
	right: 12%;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient( 90deg, transparent, var( --hub-gold ), transparent );
	background-size: 200% 100%;
	animation: hub-scan 3.6s linear infinite;
}

@keyframes hub-scan {
	from { background-position: 200% 0; }
	to { background-position: -200% 0; }
}

.cricket-predictions-page .proace-prediction__question {
	font-family: var( --hub-display );
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var( --hub-ice );
}

.cricket-predictions-page .proace-prediction__login a,
.cricket-predictions-page .proace-prediction__login a:visited {
	color: var( --hub-gold );
	font-weight: 700;
}

.cricket-predictions-page .proace-predictions-grid__empty {
	max-width: 520px;
	margin: 10px auto 0;
	padding: 36px 28px;
	border-radius: 20px;
	border: 1px dashed rgba( 255, 255, 255, 0.16 );
	background: rgba( 255, 255, 255, 0.03 );
	font-size: 16px;
	color: var( --hub-ice-2 );
}

/* ---------------------------------------------------------------------
 * Leaderboard — podium
 * ------------------------------------------------------------------- */

.cricket-leaderboard-page .cricket-podium {
	max-width: 860px;
	gap: 22px;
	margin: 20px auto 56px;
	padding-top: 26px;
}

.cricket-leaderboard-page .cricket-podium__place {
	--medal: #c7d2e0;
	--medal-glow: rgba( 199, 210, 224, 0.35 );
	padding: 30px 18px 0;
	overflow: visible;
	border-radius: 22px 22px 16px 16px;
	background:
		radial-gradient( 90% 60% at 50% 0%, color-mix( in srgb, var( --medal ) 18%, transparent ), transparent 70% ),
		linear-gradient( 180deg, rgba( 18, 40, 72, 0.95 ), rgba( 9, 21, 42, 0.96 ) );
	border: 1px solid color-mix( in srgb, var( --medal ) 35%, transparent );
	box-shadow: 0 30px 60px -30px rgba( 0, 0, 0, 0.9 ), inset 0 1px 0 rgba( 255, 255, 255, 0.08 );
	transition: transform 0.5s var( --hub-ease ), box-shadow 0.5s ease;
}

.cricket-leaderboard-page .cricket-podium__place--1 {
	--medal: #ffc53d;
	--medal-glow: rgba( 255, 176, 32, 0.5 );
	transform: translateY( -18px );
	padding-top: 38px;
}

.cricket-leaderboard-page .cricket-podium__place--3 {
	--medal: #e8a06b;
	--medal-glow: rgba( 232, 160, 107, 0.4 );
}

.cricket-leaderboard-page .cricket-podium__place:hover {
	box-shadow: 0 40px 70px -30px rgba( 0, 0, 0, 0.95 ), 0 0 70px -24px var( --medal-glow ), inset 0 1px 0 rgba( 255, 255, 255, 0.1 );
}

.cricket-leaderboard-page .cricket-podium__place--1:hover {
	transform: translateY( -24px );
}

.cricket-leaderboard-page .cricket-podium__place--2:hover,
.cricket-leaderboard-page .cricket-podium__place--3:hover {
	transform: translateY( -6px );
}

/* Shimmer sweep across the #1 card. */
.cricket-leaderboard-page .cricket-podium__place--1::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient( 105deg, transparent 38%, rgba( 255, 236, 180, 0.16 ) 50%, transparent 62% );
	background-size: 260% 100%;
	animation: hub-shimmer 4.5s ease-in-out infinite;
	pointer-events: none;
}

@keyframes hub-shimmer {
	0%, 35% { background-position: 130% 0; }
	75%, 100% { background-position: -130% 0; }
}

/* Pedestal: the step each place stands on, with a big faint rank numeral. */
.cricket-leaderboard-page .cricket-podium__place::after {
	content: "2";
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	margin: 18px -19px -1px;
	border-radius: 0 0 16px 16px;
	background: linear-gradient( 180deg, color-mix( in srgb, var( --medal ) 22%, #0c1f3b ), color-mix( in srgb, var( --medal ) 6%, #07132a ) );
	border-top: 1px solid color-mix( in srgb, var( --medal ) 45%, transparent );
	font-family: var( --hub-display );
	font-size: 44px;
	font-weight: 900;
	line-height: 1;
	color: color-mix( in srgb, var( --medal ) 55%, transparent );
	transform-origin: bottom;
}

.cricket-leaderboard-page .cricket-podium__place--1::after {
	content: "1";
	height: 92px;
	font-size: 62px;
	color: color-mix( in srgb, var( --medal ) 70%, transparent );
}

.cricket-leaderboard-page .cricket-podium__place--3::after {
	content: "3";
	height: 48px;
	font-size: 36px;
}

.hub-js .cricket-leaderboard-page .cricket-podium.is-in .cricket-podium__place::after {
	animation: hub-grow 0.9s var( --hub-ease ) both;
	animation-delay: 0.25s;
}

@keyframes hub-grow {
	from { transform: scaleY( 0.2 ); opacity: 0; }
	to { transform: none; opacity: 1; }
}

.cricket-leaderboard-page .cricket-podium__crown {
	top: -22px;
	width: 38px;
	height: 30px;
	filter: drop-shadow( 0 6px 14px rgba( 255, 176, 32, 0.6 ) );
	animation: hub-float 3.2s ease-in-out infinite;
}

@keyframes hub-float {
	0%, 100% { transform: translate( -50%, 0 ); }
	50% { transform: translate( -50%, -5px ); }
}

/* Rotating medal-coloured halo behind each avatar. */
.cricket-leaderboard-page .cricket-podium__top {
	margin-bottom: 14px;
	isolation: isolate;
}

.cricket-leaderboard-page .cricket-podium__top::before {
	content: "";
	position: absolute;
	inset: -7px;
	z-index: -1;
	border-radius: 50%;
	background: conic-gradient( from 0deg, var( --medal ), transparent 30%, var( --medal ) 55%, transparent 80%, var( --medal ) );
	opacity: 0.75;
	animation: hub-spin 7s linear infinite;
	-webkit-mask: radial-gradient( circle, transparent 60%, #000 62% );
	mask: radial-gradient( circle, transparent 60%, #000 62% );
}

.cricket-leaderboard-page .cricket-podium__place--1 .cricket-podium__top::before {
	inset: -9px;
	opacity: 1;
	animation-duration: 5s;
	filter: drop-shadow( 0 0 10px rgba( 255, 176, 32, 0.7 ) );
}

@keyframes hub-spin {
	to { transform: rotate( 360deg ); }
}

.cricket-leaderboard-page .cricket-podium__avatar {
	border: 3px solid #0a1a33;
}

.cricket-leaderboard-page .cricket-podium__rank-chip {
	width: 26px;
	height: 26px;
	font-size: 12px;
	background: var( --medal );
	border-color: #0a1a33;
	box-shadow: 0 4px 12px -2px var( --medal-glow );
}

.cricket-leaderboard-page .cricket-podium__name {
	font-family: var( --hub-display );
	font-size: 17px;
	font-weight: 700;
	color: var( --hub-ice );
}

.cricket-leaderboard-page .cricket-podium__place--1 .cricket-podium__name {
	font-size: 19px;
}

.cricket-leaderboard-page .cricket-podium__level {
	color: var( --medal );
	opacity: 0.85;
	letter-spacing: 0.1em;
}

.cricket-leaderboard-page .cricket-podium__points {
	font-family: var( --hub-display );
	font-size: 34px;
	font-weight: 900;
	background: linear-gradient( 180deg, #ffffff, var( --medal ) );
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	font-variant-numeric: tabular-nums;
}

.cricket-leaderboard-page .cricket-podium__place--1 .cricket-podium__points {
	font-size: 44px;
}

.cricket-leaderboard-page .cricket-podium__points-label {
	-webkit-text-fill-color: var( --hub-ice-3 );
	color: var( --hub-ice-3 );
}

.cricket-leaderboard-page .cricket-podium__stat {
	border-color: color-mix( in srgb, var( --medal ) 30%, transparent );
	background: color-mix( in srgb, var( --medal ) 8%, transparent );
	color: var( --hub-ice-2 );
}

/* ---------------------------------------------------------------------
 * Leaderboard — "your standing", toolbar, ranking rows
 * ------------------------------------------------------------------- */

.cricket-leaderboard-page .cricket-leaderboard-you {
	max-width: 860px;
	border-radius: 18px;
	background:
		radial-gradient( 80% 120% at 0% 50%, rgba( 255, 176, 32, 0.16 ), transparent 60% ),
		rgba( 10, 24, 48, 0.8 );
	border-color: rgba( 255, 176, 32, 0.32 );
	backdrop-filter: blur( 14px );
	-webkit-backdrop-filter: blur( 14px );
}

.cricket-leaderboard-page .cricket-leaderboard-toolbar,
.cricket-leaderboard-page .cricket-leaderboard-table-wrap {
	max-width: 860px;
}

.cricket-leaderboard-page .cricket-leaderboard-search {
	min-height: 50px;
	border-radius: 999px;
	padding: 0 20px;
	background: rgba( 6, 16, 34, 0.7 );
	border-color: rgba( 255, 255, 255, 0.12 );
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cricket-leaderboard-page .cricket-leaderboard-search:focus-within {
	border-color: var( --hub-gold );
	box-shadow: 0 0 0 4px rgba( 255, 176, 32, 0.16 );
}

.cricket-leaderboard-page .cricket-leaderboard-search input {
	font-size: 15px;
	color: var( --hub-ice );
}

.cricket-leaderboard-page .cricket-leaderboard-count {
	font-size: 11.5px;
	color: var( --hub-ice-3 );
}

/* Rows become individual cards. */
.cricket-leaderboard-page .cricket-leaderboard-table-wrap {
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: visible;
}

.cricket-leaderboard-page .cricket-leaderboard-table {
	border-collapse: separate;
	border-spacing: 0 10px;
	margin-top: -10px;
}

.cricket-leaderboard-page .cricket-leaderboard-table th {
	padding: 6px 20px 2px;
	border: 0;
	background: transparent;
	font-size: 10px;
	letter-spacing: 0.12em;
	color: var( --hub-ice-3 );
}

.cricket-leaderboard-page .cricket-leaderboard-table td {
	padding: 14px 20px;
	border: 0;
	border-top: 1px solid rgba( 255, 255, 255, 0.07 );
	border-bottom: 1px solid rgba( 255, 255, 255, 0.07 );
	/* One flat colour per cell — a per-cell gradient restarts in every td
	   and shows as seams between columns. */
	background: rgba( 13, 30, 57, 0.92 );
	font-size: 14.5px;
	color: var( --hub-ice-2 );
	transition: background 0.3s ease, border-color 0.3s ease;
}

.cricket-leaderboard-page .cricket-leaderboard-table td:first-child {
	position: relative;
	border-left: 1px solid rgba( 255, 255, 255, 0.07 );
	border-radius: 14px 0 0 14px;
}

.cricket-leaderboard-page .cricket-leaderboard-table td:last-child {
	border-right: 1px solid rgba( 255, 255, 255, 0.07 );
	border-radius: 0 14px 14px 0;
}

.cricket-leaderboard-page .cricket-leaderboard-table td:first-child::before {
	content: "";
	position: absolute;
	left: -1px;
	top: 14%;
	bottom: 14%;
	width: 3px;
	border-radius: 3px;
	background: linear-gradient( 180deg, var( --hub-gold ), var( --hub-coral ) );
	opacity: 0;
	transform: scaleY( 0.3 );
	transition: opacity 0.3s ease, transform 0.3s var( --hub-ease );
}

.cricket-leaderboard-page .cricket-leaderboard-table tbody tr:hover td,
.cricket-leaderboard-page .cricket-leaderboard-table tbody tr:focus-within td {
	background: rgba( 22, 46, 84, 0.96 );
	border-color: rgba( 255, 176, 32, 0.25 );
}

.cricket-leaderboard-page .cricket-leaderboard-table tbody tr:hover td:first-child::before {
	opacity: 1;
	transform: none;
}

.cricket-leaderboard-page .cricket-leaderboard-table th.cricket-leaderboard-table__rank {
	width: 74px;
}

.cricket-leaderboard-page .cricket-leaderboard-table td.cricket-leaderboard-table__rank {
	font-family: var( --hub-display );
	font-size: 16px;
	font-weight: 800;
	color: var( --hub-ice-3 );
	width: 74px;
}

.cricket-leaderboard-page .cricket-leaderboard-table__user {
	font-family: var( --hub-display );
	font-size: 15.5px;
	font-weight: 700;
	color: var( --hub-ice );
}

.cricket-leaderboard-page .cricket-leaderboard-table td.cricket-leaderboard-table__points {
	font-family: var( --hub-display );
	font-size: 20px;
	font-weight: 900;
	color: var( --hub-gold );
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.cricket-leaderboard-page .cricket-leaderboard-table th:last-child {
	text-align: right;
}

.cricket-leaderboard-page .cricket-leaderboard-table tr.cricket-leaderboard-row--you td {
	background: linear-gradient( 90deg, rgba( 255, 176, 32, 0.2 ), rgba( 9, 22, 44, 0.9 ) 60% );
	border-color: rgba( 255, 176, 32, 0.35 );
}

/* Accuracy: number + mini bar */
.cricket-acc {
	display: inline-flex;
	flex-direction: column;
	gap: 6px;
	min-width: 86px;
}

.cricket-acc__num {
	font-family: var( --hub-mono );
	font-size: 12.5px;
	font-weight: 700;
	color: var( --hub-ice );
}

.cricket-acc__bar {
	display: block;
	height: 4px;
	border-radius: 4px;
	background: rgba( 255, 255, 255, 0.1 );
	overflow: hidden;
}

.cricket-acc__bar > span {
	display: block;
	height: 100%;
	width: var( --acc, 0% );
	border-radius: inherit;
	background: linear-gradient( 90deg, var( --hub-teal ), var( --hub-green ) );
	transform-origin: left;
}

.hub-js .cricket-leaderboard-table tr.is-in .cricket-acc__bar > span {
	animation: hub-bar 1s var( --hub-ease ) both;
	animation-delay: calc( var( --hub-i, 0 ) * 70ms + 200ms );
}

@keyframes hub-bar {
	from { transform: scaleX( 0 ); }
	to { transform: none; }
}

.cricket-leaderboard-page .cricket-leaderboard-page__empty {
	max-width: 560px;
	margin: 0 auto;
	padding: 36px 28px;
	border-radius: 20px;
	border: 1px dashed rgba( 255, 255, 255, 0.16 );
	background: rgba( 255, 255, 255, 0.03 );
	color: var( --hub-ice-2 );
}

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------- */

@media ( max-width: 720px ) {
	.cricket-leaderboard-page,
	.cricket-predictions-page {
		padding: 44px 0 72px;
	}

	.cricket-leaderboard-page .cricket-podium {
		gap: 14px;
	}

	.cricket-leaderboard-page .cricket-podium__place--1 {
		transform: none;
		margin-bottom: 8px;
	}

	.cricket-leaderboard-page .cricket-podium__place--1:hover {
		transform: translateY( -4px );
	}

	.cricket-leaderboard-page .cricket-podium__place::after {
		height: 46px;
		font-size: 32px;
	}

	.cricket-leaderboard-page .cricket-podium__place--1::after {
		height: 58px;
		font-size: 42px;
	}

	.cricket-leaderboard-page .cricket-podium__points {
		font-size: 28px;
	}

	.cricket-leaderboard-page .cricket-podium__place--1 .cricket-podium__points {
		font-size: 36px;
	}

	.cricket-predictions-page__stat {
		min-width: 0;
		flex: 1 1 100%;
	}

	.cricket-leaderboard-page .cricket-predictions-tabs,
	.cricket-predictions-page .cricket-predictions-tabs {
		margin: 26px auto 32px;
	}

	.cricket-leaderboard-page .cricket-predictions-tab,
	.cricket-predictions-page .cricket-predictions-tab {
		padding: 0 14px;
		font-size: 10.5px;
	}

	.cricket-predictions-page .proace-prediction__surface {
		padding: 20px 18px;
	}
}

@media ( max-width: 640px ) {
	.cricket-leaderboard-page .cricket-leaderboard-table td {
		padding: 12px 12px;
	}

	.cricket-leaderboard-page .cricket-leaderboard-table__rank {
		width: 48px;
		font-size: 14px;
	}

	.cricket-leaderboard-page .cricket-leaderboard-table__points {
		font-size: 18px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.cricket-leaderboard-page *,
	.cricket-predictions-page *,
	.cricket-leaderboard-page__fx::before,
	.cricket-leaderboard-page__fx::after,
	.cricket-predictions-page__fx::before,
	.cricket-predictions-page__fx::after,
	.cricket-leaderboard-page .cricket-podium__place::before,
	.cricket-leaderboard-page .cricket-podium__place::after,
	.cricket-leaderboard-page .cricket-podium__top::before {
		animation: none !important;
		transition: none !important;
	}

	.hub-js [data-hub-reveal] {
		opacity: 1;
		transform: none;
	}
}

/* A lone prediction shouldn't sit in the left half of a two-column grid. */
.cricket-predictions-page .proace-predictions-grid:has( > .proace-prediction:only-child ) {
	grid-template-columns: minmax( 0, 1fr );
	max-width: 620px;
}

/* Phones: rank · predictor · points only (correct + accuracy were already
   hidden at this width; streak now too) so the Points column is never cut
   off, and long names truncate instead of widening the table. */
@media ( max-width: 640px ) {
	.cricket-leaderboard-page .cricket-leaderboard-table {
		table-layout: fixed;
		width: 100%;
	}

	.cricket-leaderboard-page .cricket-leaderboard-table th:nth-child( 5 ),
	.cricket-leaderboard-page .cricket-leaderboard-table td:nth-child( 5 ) {
		display: none;
	}

	.cricket-leaderboard-page .cricket-leaderboard-table th.cricket-leaderboard-table__rank,
	.cricket-leaderboard-page .cricket-leaderboard-table td.cricket-leaderboard-table__rank {
		width: 58px;
	}

	.cricket-leaderboard-page .cricket-leaderboard-table th:last-child,
	.cricket-leaderboard-page .cricket-leaderboard-table td:last-child {
		width: 74px;
	}

	.cricket-leaderboard-page .cricket-leaderboard-table__user {
		min-width: 0;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
}

@media ( max-width: 640px ) {
	.cricket-leaderboard-page .cricket-leaderboard-table th {
		padding: 6px 10px 2px;
		white-space: nowrap;
		letter-spacing: 0.06em;
	}
}

/* ---------------------------------------------------------------------
 * Client-side tab filtering (2026-09-16): every prediction is rendered once
 * and .cricket-predictions-list[data-filter] hides the others, so switching
 * tabs is instant (no page reload). Server sets the initial filter, so
 * there is no flash of the wrong cards.
 * ------------------------------------------------------------------- */
.cricket-predictions-list[data-filter="open"] .proace-prediction:not( [data-status="open"] ),
.cricket-predictions-list[data-filter="closed"] .proace-prediction:not( [data-status="closed"] ),
.cricket-predictions-list[data-filter="resolved"] .proace-prediction:not( [data-status="resolved"] ) {
	display: none;
}

/* Lone visible card stays centred (replaces the :only-child rule). */
.cricket-predictions-page .proace-predictions-grid.is-single {
	grid-template-columns: minmax( 0, 1fr );
	max-width: 620px;
	margin-inline: auto;
}

.cricket-predictions-list .proace-prediction.is-filter-in {
	animation: cricket-filter-in 0.45s cubic-bezier( 0.16, 1, 0.3, 1 ) both;
	animation-delay: calc( var( --fi, 0 ) * 60ms );
}

@keyframes cricket-filter-in {
	from { opacity: 0; transform: translateY( 14px ) scale( 0.98 ); }
	to { opacity: 1; transform: none; }
}

.cricket-predictions-list__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 10px auto 0;
	padding: 28px 20px;
	max-width: 560px;
	border-radius: 18px;
	background: rgba( 255, 255, 255, 0.05 );
	box-shadow: inset 0 0 0 1px rgba( 255, 255, 255, 0.12 );
	color: rgba( 234, 244, 255, 0.8 );
	font-size: 15px;
	font-weight: 600;
	text-align: center;
}

.cricket-predictions-list__empty[hidden] {
	display: none;
}

@media ( prefers-reduced-motion: reduce ) {
	.cricket-predictions-list .proace-prediction.is-filter-in {
		animation: none;
	}
}
