/* =================================================================================
   Elige tu Dado — Parque del Recuerdo - Icsolina Palacios - PrevencionEterna.com
   ================================================================================= */

.etd-dado-wrapper {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

.etd-dado-wrapper *,
.etd-dado-wrapper *::before,
.etd-dado-wrapper *::after {
	box-sizing: border-box;
}

.etd-dado-container {
	position: relative;
	width: 100%;
	max-width: 480px;
	aspect-ratio: 1080 / 1350;
	overflow: hidden;
	border-radius: 12px;
	background: #0f8a3c;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	user-select: none;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

/* Fondo del diseño */
.etd-fondo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

/* Dado central: posicionado sobre el área donde estaba el dado en el diseño original */
.etd-dado {
	position: absolute;
	left: 51.5%;
	top: 53.4%;
	transform: translate(-50%, -50%);
	width: 26%;
	height: auto;
	filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
	pointer-events: none;
	will-change: transform;
}

.etd-dado.etd-rolling {
	animation: etd-shake 0.25s infinite;
}

@keyframes etd-shake {
	0%   { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
	25%  { transform: translate(-52%, -48%) rotate(-8deg) scale(1.03); }
	50%  { transform: translate(-48%, -52%) rotate(6deg) scale(0.98); }
	75%  { transform: translate(-53%, -50%) rotate(-4deg) scale(1.02); }
	100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
}

/* Zona clicable, ubicada sobre el texto "Y te descubre qué te tocó" + flecha */
.etd-hotspot {
	position: absolute;
	left: 24%;
	top: 73.5%;
	width: 52%;
	height: 13%;
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	border-radius: 999px;
	transition: transform 0.15s ease, filter 0.15s ease;
}

.etd-hotspot:hover:not(:disabled) {
	transform: scale(1.04);
	filter: brightness(1.06);
}

.etd-hotspot:active:not(:disabled) {
	transform: scale(0.97);
}

.etd-hotspot:disabled {
	cursor: default;
}

.etd-hotspot:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.etd-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* Canvas de confeti / fuegos artificiales */
.etd-confetti {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 5;
}

/* Modal de resultado */
.etd-modal {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(4, 40, 18, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
	z-index: 10;
	padding: 6%;
}

.etd-modal.etd-visible {
	opacity: 1;
	visibility: visible;
}

.etd-modal-card {
	position: relative;
	background: #faf6ea;
	border-radius: 20px;
	padding: 8% 7% 7%;
	width: 100%;
	max-width: 340px;
	text-align: center;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
	transform: translateY(14px) scale(0.96);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.etd-modal.etd-visible .etd-modal-card {
	transform: translateY(0) scale(1);
}

.etd-modal-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: transparent;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #2f6f3a;
	cursor: pointer;
	padding: 4px;
}

.etd-modal-title {
	margin: 0 0 4%;
	font-size: clamp(18px, 5vw, 22px);
	color: #1d6b34;
	font-weight: 800;
}

.etd-modal-dado {
	width: 34%;
	max-width: 110px;
	margin: 0 auto 4%;
	display: block;
	filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25));
}

.etd-modal-mensaje {
	margin: 0 0 5%;
	font-size: clamp(14px, 4vw, 17px);
	color: #2b2b2b;
	line-height: 1.4;
	font-weight: 600;
}

.etd-modal-replay {
	background: #1d6b34;
	color: #fff;
	border: none;
	padding: 12px 26px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.etd-modal-replay:hover {
	background: #164f26;
	transform: translateY(-1px);
}

.etd-modal-replay:active {
	transform: translateY(0);
}

@media (max-width: 380px) {
	.etd-modal-card {
		padding: 9% 6% 8%;
	}
}
