/* UU Stat Widget v1.1.0 — compact + live ticker */

.uu-stat {
	position: fixed;
	bottom: 16px;
	z-index: 9990;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px 6px 9px;
	max-width: 220px;
	background: rgba(255, 255, 255, 0.74);
	backdrop-filter: blur(20px) saturate(160%);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	border: 1px solid rgba(15, 23, 42, 0.07);
	border-radius: 10px;
	box-shadow:
		0 12px 28px -10px rgba(15, 23, 42, 0.20),
		0 3px 8px -3px    rgba(15, 23, 42, 0.07);
	color: #1f1f1f;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-feature-settings: 'tnum', 'cv11', 'ss01';

	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.uu-stat.is-shown { opacity: 1; transform: translateY(0); }

.uu-stat--bottom-left  { left: 16px; }
.uu-stat--bottom-right { right: 16px; }

.uu-stat__pulse {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #34a853;
	flex-shrink: 0;
	box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.5);
	animation: uu-stat-pulse 2.4s ease-out infinite;
	animation-delay: 1.5s;
}
@keyframes uu-stat-pulse {
	0%   { box-shadow: 0 0 0 0   rgba(52, 168, 83, 0.5); }
	70%  { box-shadow: 0 0 0 8px rgba(52, 168, 83, 0); }
	100% { box-shadow: 0 0 0 0   rgba(52, 168, 83, 0); }
}

.uu-stat__body {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.uu-stat__label {
	font-size: 9px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #5f6368;
	line-height: 1.25;
	max-width: 180px;
}

.uu-stat__value {
	display: flex;
	align-items: baseline;
	gap: 1px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: #1a73e8;
}
.uu-stat__unit {
	font-size: 10px;
	font-weight: 500;
	color: #1a73e8;
}

/* Dark theme */
.uu-stat--dark {
	background: rgba(15, 23, 42, 0.74);
	border-color: rgba(255, 255, 255, 0.10);
	color: #f1f5f9;
	box-shadow:
		0 12px 28px -10px rgba(0, 0, 0, 0.50),
		0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.uu-stat--dark .uu-stat__label { color: #9aa0a6; }
.uu-stat--dark .uu-stat__value,
.uu-stat--dark .uu-stat__unit  { color: #A8C7FA; }
.uu-stat--dark .uu-stat__pulse { background: #81C995; }

@media (max-width: 600px) {
	.uu-stat {
		bottom: 12px;
		max-width: 200px;
		padding: 5px 9px 5px 8px;
	}
	.uu-stat--bottom-left  { left: 10px; }
	.uu-stat--bottom-right { right: 10px; }
	.uu-stat__label { font-size: 8px; max-width: 160px; }
	.uu-stat__value { font-size: 11px; }
	.uu-stat__unit  { font-size: 9px; }
}


/* Roulette du dernier chiffre — track vertical 0-9 qui scroll */
.uu-stat__static { display: inline; }
.uu-stat__roll {
	display: inline-block;
	height: 1em;
	line-height: 1em;
	overflow: hidden;
	vertical-align: top;
}
.uu-stat__roll-track {
	display: flex;
	flex-direction: column;
	will-change: transform;
	transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.uu-stat__roll-track > span {
	display: block;
	height: 1em;
	line-height: 1em;
	text-align: left;
}

@media (prefers-reduced-motion: reduce) {
	.uu-stat__roll-track { transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.uu-stat       { opacity: 1 !important; transform: none !important; transition: none !important; }
	.uu-stat__pulse { animation: none !important; }
}
