/* Top Compradores — tema Corrida estilo OutRun / arcade retro */

.top-compradores-fixo--corrida,
.top-compradores-fixo--corrida-active {
	background: linear-gradient(180deg, #c4b5fd 0%, #a78bfa 35%, #7c3aed 100%) !important;
	border-color: rgba(255, 255, 255, 0.25) !important;
	box-shadow: 0 12px 40px rgba(76, 29, 149, 0.35) !important;
	padding-bottom: 0.65rem !important;
}

.top-compradores-fixo--corrida::before,
.top-compradores-fixo--corrida-active::before {
	display: none !important;
}

.corrida-outrun {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin-top: 0.35rem;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
	background: #1e1b4b;
}

.corrida-outrun__scene {
	position: relative;
	width: 100%;
	height: 17.5rem;
	flex-shrink: 0;
	overflow: visible;
}

/* Céu */
.corrida-outrun__sky {
	position: absolute;
	inset: 0 0 28%;
	background: linear-gradient(180deg, #ddd6fe 0%, #a78bfa 45%, #6366f1 100%);
	z-index: 1;
}

.corrida-outrun__sun {
	position: absolute;
	left: 50%;
	top: 38%;
	width: 3.2rem;
	height: 3.2rem;
	margin-left: -1.6rem;
	margin-top: -1.6rem;
	border-radius: 50%;
	background: radial-gradient(circle, #fef08a 0%, #facc15 55%, #eab308 100%);
	box-shadow: 0 0 30px rgba(250, 204, 21, 0.65);
	z-index: 2;
}

.corrida-outrun__cloud {
	position: absolute;
	background: #fff;
	border-radius: 2px;
	opacity: 0.95;
	image-rendering: pixelated;
}
.corrida-outrun__cloud--1 { width: 2.8rem; height: 0.85rem; top: 12%; left: 8%; box-shadow: 1.2rem 0.2rem 0 #fff, 0.5rem -0.35rem 0 #fff; }
.corrida-outrun__cloud--2 { width: 2.2rem; height: 0.7rem; top: 22%; right: 12%; box-shadow: 1rem 0.15rem 0 #fff; }
.corrida-outrun__cloud--3 { width: 1.8rem; height: 0.55rem; top: 8%; right: 28%; }

/* Cidade no horizonte */
.corrida-outrun__city {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2.8rem;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 0.15rem;
	padding: 0 12%;
	z-index: 3;
}
.corrida-outrun__building {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	flex-shrink: 0;
}
.corrida-outrun__building--1 { width: 1.1rem; height: 1.4rem; }
.corrida-outrun__building--2 { width: 0.9rem; height: 2rem; }
.corrida-outrun__building--3 { width: 1.4rem; height: 2.5rem; background: #fff; }
.corrida-outrun__building--4 { width: 1rem; height: 1.8rem; }
.corrida-outrun__building--5 { width: 0.75rem; height: 2.8rem; }

/* Grama listrada */
.corrida-outrun__grass {
	position: absolute;
	bottom: 0;
	top: 52%;
	width: 50%;
	z-index: 4;
	background: repeating-linear-gradient(
		180deg,
		#4ade80 0px,
		#4ade80 8px,
		#22c55e 8px,
		#22c55e 16px
	);
}
.corrida-outrun__grass--left { left: 0; }
.corrida-outrun__grass--right { right: 0; }

/* Árvores */
.corrida-outrun__tree {
	position: absolute;
	bottom: 28%;
	z-index: 5;
	width: 0;
	height: 0;
	border-left: 0.55rem solid transparent;
	border-right: 0.55rem solid transparent;
	border-bottom: 1.4rem solid #15803d;
}
.corrida-outrun__tree::after {
	content: "";
	position: absolute;
	top: 1.35rem;
	left: -0.15rem;
	width: 0.3rem;
	height: 0.5rem;
	background: #78350f;
}
.corrida-outrun__tree--1 { left: 6%; transform: scale(0.9); }
.corrida-outrun__tree--2 { left: 14%; transform: scale(1.1); }
.corrida-outrun__tree--3 { right: 14%; transform: scale(1); }
.corrida-outrun__tree--4 { right: 6%; transform: scale(0.85); }

/* Pista em perspectiva */
.corrida-outrun__pista {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 72%;
	z-index: 6;
	pointer-events: none;
	overflow: visible;
}

.corrida-outrun__asfalto {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 100%;
	height: 100%;
	transform: translateX(-50%);
	background: linear-gradient(180deg, #9ca3af 0%, #6b7280 35%, #4b5563 100%);
	clip-path: polygon(32% 0%, 68% 0%, 100% 100%, 0% 100%);
	box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.2);
}

.corrida-outrun__faixa-centro {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 4px;
	height: 100%;
	transform: translateX(-50%);
	background: repeating-linear-gradient(
		180deg,
		#fff 0px,
		#fff 14px,
		transparent 14px,
		transparent 28px
	);
	animation: corrida-outrun-scroll 0.6s linear infinite;
	clip-path: polygon(32% 0%, 68% 0%, 100% 100%, 0% 100%);
	opacity: 0.9;
}

@keyframes corrida-outrun-scroll {
	from { background-position: 0 0; }
	to { background-position: 0 28px; }
}

/* Carros na pista — só pódio (1º–3º) */
.corrida-outrun__carros {
	position: absolute;
	inset: 0;
	z-index: 10;
	pointer-events: none;
	overflow: visible;
}

.corrida-outrun__piloto {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	transform-origin: center bottom;
	min-width: 0;
	max-width: 7.25rem;
	transition: bottom 0.4s ease, left 0.4s ease;
}

.corrida-outrun__info-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.14rem;
	margin-bottom: 0.22rem;
	padding: 0.32rem 0.42rem;
	background: rgba(15, 23, 42, 0.92);
	border: 1.5px solid rgba(255, 255, 255, 0.28);
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
	text-align: center;
	min-width: 5.25rem;
	max-width: 7rem;
	pointer-events: auto;
}

.corrida-outrun__piloto--rank-1 .corrida-outrun__info-panel {
	border-color: #facc15;
	box-shadow: 0 4px 16px rgba(250, 204, 21, 0.35), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.corrida-outrun__car-scale {
	transform: scale(var(--car-scale, 1));
	transform-origin: center bottom;
}

.corrida-outrun__car-wrap {
	position: relative;
	filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
	animation: corrida-outrun-car-idle 1.2s ease-in-out infinite;
}

.corrida-outrun__piloto--rank-1 .corrida-outrun__car-wrap {
	animation: corrida-outrun-car-lider 0.9s ease-in-out infinite;
}

.corrida-outrun__car-svg {
	display: block;
	width: 3.75rem;
	height: auto;
}

.corrida-outrun__piloto--rank-1 {
	z-index: 15;
}

.corrida-outrun__piloto--rank-1 .corrida-outrun__car-svg {
	width: 4.5rem;
}

.corrida-outrun__piloto--rank-1 .corrida-outrun__badge {
	background: #facc15;
	color: #78350f;
	font-size: 0.78rem;
}

.corrida-outrun__piloto--vazio .corrida-outrun__car-svg {
	opacity: 0.45;
}

.corrida-outrun__badge {
	position: absolute;
	top: -0.4rem;
	right: -0.6rem;
	font-size: 0.74rem;
	font-weight: 800;
	background: #0f172a;
	color: #fff;
	padding: 0.12rem 0.38rem;
	border-radius: 5px;
	border: 1.5px solid #fff;
	line-height: 1.15;
	font-family: system-ui, sans-serif;
}

.corrida-outrun__nome {
	display: block;
	font-size: 0.78rem;
	font-weight: 800;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 6.5rem;
	font-family: system-ui, -apple-system, sans-serif;
	line-height: 1.25;
}

.corrida-outrun__nome--vazio {
	opacity: 0.65;
	font-weight: 600;
	font-size: 0.72rem;
}

.corrida-outrun__km {
	display: inline-block;
	font-size: 0.74rem;
	font-weight: 800;
	color: #0f172a;
	background: #fef08a;
	padding: 0.14rem 0.42rem;
	border-radius: 5px;
	border: 1px solid #ca8a04;
	font-family: system-ui, -apple-system, sans-serif;
	line-height: 1.2;
}

.corrida-outrun__premio {
	display: block;
	font-size: 0.72rem;
	font-weight: 800;
	color: #fef08a;
	background: rgba(120, 53, 15, 0.55);
	padding: 0.1rem 0.36rem;
	border-radius: 5px;
	max-width: 6.5rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.2;
}

.corrida-outrun__premio--vazio {
	opacity: 0.65;
}

/* 4º–6º — fileira inferior */
.corrida-outrun__pelotao {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.4rem;
	padding: 0.55rem 0.45rem 0.6rem;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(30, 27, 75, 0.9) 100%);
	border-top: 2px solid rgba(255, 255, 255, 0.18);
	z-index: 20;
}

.corrida-outrun__slot {
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	min-width: 0;
	padding: 0.42rem 0.35rem;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.16);
}

.corrida-outrun__slot--vazio {
	opacity: 0.72;
}

.corrida-outrun__slot-rank {
	flex-shrink: 0;
	font-size: 0.8rem;
	font-weight: 800;
	color: #fef08a;
	background: #0f172a;
	padding: 0.16rem 0.36rem;
	border-radius: 5px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	line-height: 1.15;
}

.corrida-outrun__slot--rank-4 .corrida-outrun__slot-rank { color: #fdba74; }
.corrida-outrun__slot--rank-5 .corrida-outrun__slot-rank { color: #c4b5fd; }
.corrida-outrun__slot--rank-6 .corrida-outrun__slot-rank { color: #94a3b8; }

.corrida-outrun__slot-body {
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
	min-width: 0;
	flex: 1;
}

.corrida-outrun__slot-nome {
	font-size: 0.76rem;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.25;
}

.corrida-outrun__slot-nome--vazio {
	color: rgba(255, 255, 255, 0.55);
	font-weight: 600;
	font-size: 0.62rem;
}

.corrida-outrun__slot-km {
	font-size: 0.72rem;
	font-weight: 800;
	color: #fef08a;
	line-height: 1.2;
}

.corrida-outrun__slot-premio {
	font-size: 0.7rem;
	font-weight: 800;
	color: #fde68a;
	background: rgba(120, 53, 15, 0.45);
	padding: 0.08rem 0.32rem;
	border-radius: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

@keyframes corrida-outrun-car-idle {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-2px); }
}

@keyframes corrida-outrun-car-lider {
	0%, 100% { transform: translateY(-1px); }
	50% { transform: translateY(-4px); }
}

@media (max-width: 380px) {
	.corrida-outrun__scene {
		height: 15.5rem;
	}
	.corrida-outrun__car-svg {
		width: 3.2rem;
	}
	.corrida-outrun__piloto--rank-1 .corrida-outrun__car-svg {
		width: 3.85rem;
	}
	.corrida-outrun__piloto {
		max-width: 6rem;
	}
	.corrida-outrun__info-panel {
		min-width: 4.5rem;
		padding: 0.26rem 0.32rem;
	}
	.corrida-outrun__nome {
		font-size: 0.7rem;
		max-width: 5.5rem;
	}
	.corrida-outrun__km,
	.corrida-outrun__premio {
		font-size: 0.66rem;
	}
	.corrida-outrun__pelotao {
		gap: 0.25rem;
		padding: 0.35rem 0.28rem 0.42rem;
	}
	.corrida-outrun__slot {
		padding: 0.28rem 0.22rem;
	}
	.corrida-outrun__slot-nome {
		font-size: 0.62rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.corrida-outrun__faixa-centro,
	.corrida-outrun__car-wrap {
		animation: none !important;
	}
}
