/**
 * Estilos Sorteo Slot Machine - Sorteos Elite
 * Adaptado para Gutierrez Neumáticos
 */

:root {
	--gutierrez-orange: #ff6600;
	--gutierrez-orange-dim: #cc5200;
	--gutierrez-orange-light: #ff8533;
	--elite-dark: #050505;
	--elite-dark-surface: #121212;
	--elite-glass: rgba(255, 255, 255, 0.05);
	--elite-border: rgba(255, 102, 0, 0.3);
	--elite-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
	--font-head: 'Montserrat', sans-serif;
	--font-body: 'Roboto', sans-serif;
}

/* Importar tipografías Google Fonts: Montserrat y Roboto */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Roboto:wght@300;400;500;700&display=swap');

/* Contenedor principal del sorteo */
.sorteos-elite-sorteo-container {
	max-width: 900px;
	margin: 60px auto;
	padding: 60px 40px;
	background: radial-gradient(circle at top right, #1a1a1a 0%, #050505 100%);
	border-radius: 30px;
	box-shadow:
		0 20px 60px rgba(0, 0, 0, 0.6),
		inset 0 0 0 1px rgba(255, 102, 0, 0.15);
	text-align: center;
	position: relative;
	overflow: hidden;
	font-family: var(--font-body);
}

/* Efecto de brillo en el borde superior */
.sorteos-elite-sorteo-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--gutierrez-orange), transparent);
	opacity: 0.6;
}

/* Título */
.sorteos-elite-sorteo-title {
	margin-top: 0;
	margin-bottom: 40px;
	font-size: 42px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 4px;
	font-family: var(--font-head);
	background: linear-gradient(180deg, var(--gutierrez-orange) 0%, var(--gutierrez-orange-dim) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Contador de participantes */
#sorteos-elite-participantes {
	margin-bottom: 40px;
	display: inline-block;
	padding: 15px 30px;
	background: rgba(255, 102, 0, 0.05);
	border-radius: 50px;
	border: 1px solid rgba(255, 102, 0, 0.2);
	backdrop-filter: blur(5px);
}

.sorteos-participantes-count {
	font-size: 16px;
	color: #aaa;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.sorteos-participantes-count strong {
	font-size: 24px;
	color: var(--gutierrez-orange);
	font-weight: 700;
	margin-right: 5px;
	font-family: var(--font-head);
}

.sorteos-no-participantes {
	color: #666;
	font-size: 16px;
	font-style: italic;
}

/* Contenedor del Slot Machine */
#sorteos-elite-slot-container {
	width: 100%;
	height: 320px;
	margin: 0 auto 50px;
	background: #050505;
	border-radius: 20px;
	position: relative;
	overflow: hidden;
	box-shadow:
		inset 0 0 50px rgba(0, 0, 0, 0.9),
		0 0 0 4px #111,
		0 0 0 5px rgba(255, 102, 0, 0.15),
		0 20px 40px rgba(0, 0, 0, 0.5);
	border: 1px solid #222;
}

/* Gradientes superior e inferior para efecto de profundidad 3D */
#sorteos-elite-slot-container::before,
#sorteos-elite-slot-container::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	height: 100px;
	z-index: 2;
	pointer-events: none;
}

#sorteos-elite-slot-container::before {
	top: 0;
	background: linear-gradient(to bottom,
			#050505 0%,
			rgba(5, 5, 5, 0.8) 40%,
			transparent 100%);
}

#sorteos-elite-slot-container::after {
	bottom: 0;
	background: linear-gradient(to top,
			#050505 0%,
			rgba(5, 5, 5, 0.8) 40%,
			transparent 100%);
}

/* Indicador central (Línea de premio) */
#sorteos-elite-slot-container .sorteos-slot-indicator {
	position: absolute;
	top: 50%;
	left: 20px;
	right: 20px;
	height: 90px;
	transform: translateY(-50%);
	border-top: 2px solid rgba(255, 102, 0, 0.35);
	border-bottom: 2px solid rgba(255, 102, 0, 0.35);
	background: linear-gradient(90deg,
			transparent 0%,
			rgba(255, 102, 0, 0.06) 20%,
			rgba(255, 102, 0, 0.06) 80%,
			transparent 100%);
	z-index: 1;
	pointer-events: none;
	box-shadow:
		0 -10px 20px rgba(0, 0, 0, 0.4),
		0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Flechas indicadoras laterales */
#sorteos-elite-slot-container .sorteos-slot-indicator::before,
#sorteos-elite-slot-container .sorteos-slot-indicator::after {
	content: '►';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gutierrez-orange);
	font-size: 20px;
	opacity: 0.9;
	text-shadow: 0 0 10px rgba(255, 102, 0, 0.6);
}

#sorteos-elite-slot-container .sorteos-slot-indicator::before {
	left: 10px;
}

#sorteos-elite-slot-container .sorteos-slot-indicator::after {
	content: '◄';
	right: 10px;
}

/* Vista previa del slot */
.sorteos-slot-preview {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.sorteos-slot-preview .preview-item {
	opacity: 0.3;
	filter: blur(1px);
	transform: scale(0.9);
	animation: previewPulse 3s ease-in-out infinite;
}

@keyframes previewPulse {
	0%,
	100% {
		opacity: 0.3;
		transform: scale(0.9);
	}
	50% {
		opacity: 0.5;
		transform: scale(0.95);
	}
}

/* Reel (carrete) del slot */
.sorteos-slot-reel {
	position: absolute;
	top: 115px;
	left: 0;
	right: 0;
	transform: translateY(0);
	will-change: transform, filter;
}

/* Efecto de blur durante el movimiento rápido */
.sorteos-slot-reel.blur-effect {
	filter: blur(4px);
}

/* Items del slot */
.sorteos-slot-item {
	height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
	text-transform: uppercase;
	letter-spacing: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 0 40px;
	opacity: 0.3;
	transition: opacity 0.3s, transform 0.3s;
}

/* El item ganador se resalta al final */
.sorteos-slot-item.ganador-item {
	color: var(--gutierrez-orange);
	font-family: var(--font-head);
	opacity: 1;
	font-weight: 900;
	text-shadow:
		0 0 10px rgba(255, 102, 0, 0.6),
		0 0 20px rgba(255, 102, 0, 0.4);
}

/* Botón de sortear - Estilo deportivo */
.sorteos-elite-sortear-btn {
	padding: 22px 60px;
	background: linear-gradient(135deg, var(--gutierrez-orange-light) 0%, var(--gutierrez-orange) 50%, var(--gutierrez-orange-dim) 100%);
	color: #fff;
	border: none;
	border-radius: 50px;
	font-size: 18px;
	font-weight: 800;
	font-family: var(--font-head);
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	box-shadow:
		0 10px 20px rgba(255, 102, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.4);
	text-transform: uppercase;
	letter-spacing: 3px;
	position: relative;
	overflow: hidden;
	z-index: 10;
}

.sorteos-elite-sortear-btn::after {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	transform: rotate(45deg) translate(-100%, -100%);
	transition: transform 0.6s;
}

.sorteos-elite-sortear-btn:hover:not(:disabled)::after {
	transform: rotate(45deg) translate(100%, 100%);
}

.sorteos-elite-sortear-btn:hover:not(:disabled) {
	transform: translateY(-3px);
	box-shadow:
		0 15px 30px rgba(255, 102, 0, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.4);
	background: linear-gradient(135deg, var(--gutierrez-orange) 0%, var(--gutierrez-orange-hover) 50%, var(--gutierrez-orange) 100%);
}

.sorteos-elite-sortear-btn:active:not(:disabled) {
	transform: translateY(1px);
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.sorteos-elite-sortear-btn:disabled {
	background: #333;
	color: #666;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

/* Contenedor del ganador */
#sorteos-elite-ganador {
	margin-top: 50px;
	display: none;
	opacity: 0;
	transform: translateY(30px);
	transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#sorteos-elite-ganador.show {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

.sorteos-elite-ganador-content {
	background: rgba(18, 18, 18, 0.95);
	padding: 50px;
	border-radius: 24px;
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.6),
		0 0 0 1px rgba(255, 102, 0, 0.3);
	border: 1px solid rgba(255, 102, 0, 0.15);
	position: relative;
	overflow: hidden;
}

/* Borde animado del ganador */
.sorteos-elite-ganador-content::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--gutierrez-orange), #fff, var(--gutierrez-orange));
	background-size: 200% 100%;
	animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}

.ganador-icon {
	font-size: 60px;
	margin-bottom: 20px;
	display: inline-block;
	animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
	0% {
		transform: scale(0);
	}
	80% {
		transform: scale(1.2);
	}
	100% {
		transform: scale(1);
	}
}

.sorteos-elite-ganador-content h3 {
	margin: 0 0 30px 0;
	color: var(--gutierrez-orange);
	font-family: var(--font-head);
	font-size: 24px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 4px;
}

.ganador-info {
	background: rgba(255, 255, 255, 0.02);
	padding: 30px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.ganador-nombre {
	font-size: 42px;
	font-weight: 900;
	color: #fff;
	font-family: var(--font-head);
	margin: 0 0 10px 0;
	letter-spacing: 1px;
	background: linear-gradient(180deg, #fff 0%, #ccc 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.ganador-email {
	font-size: 18px;
	color: #aaa;
	margin: 0;
	font-family: monospace;
}

.ganador-negocio {
	font-size: 16px;
	color: var(--gutierrez-orange);
	font-family: var(--font-head);
	margin: 20px 0 0 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 20px;
	background: rgba(255, 102, 0, 0.1);
	border-radius: 20px;
	border: 1px solid rgba(255, 102, 0, 0.2);
}

/* Confeti */
.confetti {
	position: absolute;
	width: 10px;
	height: 10px;
	background-color: var(--gutierrez-orange);
	animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
	0% {
		transform: translateY(-10vh) rotate(0deg);
		opacity: 1;
	}
	100% {
		transform: translateY(100vh) rotate(720deg);
		opacity: 0;
	}
}

/* Responsive */
@media (max-width: 768px) {
	.sorteos-elite-sorteo-container {
		padding: 40px 20px;
		margin: 20px;
	}

	.sorteos-elite-sorteo-title {
		font-size: 28px;
	}

	#sorteos-elite-slot-container {
		height: 260px;
	}

	.sorteos-slot-item {
		height: 80px;
		font-size: 24px;
	}

	.ganador-nombre {
		font-size: 32px;
	}
}

/* Notificaciones */
.sorteos-elite-notification {
	position: absolute;
	top: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(-20px);
	background: rgba(18, 18, 18, 0.95);
	color: #fff;
	padding: 12px 24px;
	border-radius: 50px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
	font-weight: 600;
	opacity: 0;
	transition: all 0.3s ease;
	z-index: 100;
	pointer-events: none;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.sorteos-elite-notification.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

.sorteos-elite-notification.error {
	background: #dc3545;
	color: #fff;
	box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
	border-color: rgba(220, 53, 69, 0.2);
}

.sorteos-elite-notification.success {
	background: #28a745;
	color: #fff;
	box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
	border-color: rgba(40, 167, 69, 0.2);
}