.animated-donut-wrapper {
	font-family:
		system-ui,
		-apple-system,
		sans-serif;
	padding: 40px 20px;
	display: flex;
	justify-content: center;
}

.donut-card {
	background: #ffffff;
	padding: 32px;
	border-radius: 20px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	width: 100%;
	max-width: 500px;
}

.donut-card h3 {
	font-size: 18px;
	color: #0f172a;
	margin: 0 0 24px 0;
}

.donut-chart-container {
	display: flex;
	align-items: center;
	gap: 32px;
}

.donut-chart {
	position: relative;
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: conic-gradient(#3b82f6 0% 45%, #10b981 45% 82%, #e2e8f0 82% 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

@property --sweep {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}

.donut-sweep {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: conic-gradient(transparent var(--sweep), #ffffff var(--sweep));
	animation: chartReveal 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes chartReveal {
	from {
		--sweep: 0deg;
	}

	to {
		--sweep: 360deg;
	}
}

.donut-hole {
	position: relative;
	z-index: 2;
	width: 100px;
	height: 100px;
	background: #ffffff;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.donut-label {
	font-size: 11px;
	color: #64748b;
	text-transform: uppercase;
	margin-top: 4px;
	font-weight: 600;
}

@property --num {
	syntax: "<integer>";
	initial-value: 0;
	inherits: false;
}

.donut-number {
	font-size: 24px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1;
	counter-reset: percent var(--num);
	animation: countUp 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.donut-number::after {
	content: counter(percent) "%";
}

@keyframes countUp {
	from {
		--num: 0;
	}

	to {
		--num: 82;
	}
}

.donut-legend {
	list-style: none;
	padding: 0;
	margin: 0;
	z-index: 2;
}

.donut-legend li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #475569;
	margin-bottom: 12px;
}

.donut-legend .dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}

@media (max-width: 480px) {
	.donut-chart-container {
		flex-direction: column;
	}
}