/* Panel animado de la portada: tragaperras del casino -> Battle Pass -> ruleta, en bucle.
 *
 * - El marcado esta en template.php (.ep) y el reloj en assets/js/promo.js: el JS deja
 *   las animaciones CSS en pausa y las pone en el instante que toca, asi cada escena empieza
 *   desde el principio al entrar y no cambia hasta haber enseñado el premio.
 * - Sin JS se ve el estado final de cada escena: los estilos base de los rodillos, la ruleta
 *   y la barra ya son el del premio.
 * - No mira prefers-reduced-motion a proposito: Windows lo activa al quitar los efectos de
 *   animacion (rendimiento) y el panel se quedaba quieto. Se para con el raton encima.
 * - Ancho del hero >= 800px de contenido: el panel va a la derecha, encima del banner.
 *   Mas estrecho: debajo del texto. En moviles se escala entero (--ep-k lo pone el JS).
 */

.ec-hero { container-type: inline-size; flex-wrap: wrap; }

/* overflow: hidden recorta la escena que entra o sale; el panel es mas grande que las
   tarjetas para no cortarles el brillo */
/* flex: none y no flex-basis 100%: en movil el hero es una columna y la base en % lo dejaba
   con alto 0. En fila, 100% (tope 400px) no cabe junto al texto y baja a otra linea */
.ep { --ep-k: 1; position: relative; z-index: 10; flex: none; width: 100%; max-width: 400px; height: calc(340px * var(--ep-k));
	margin: 14px auto 0; overflow: hidden; font-family: Inter, sans-serif; color: #fff; }
@container (min-width: 800px) {
	.ec-hero > .ec-hero-txt { max-width: 440px; }
	.ep { position: absolute; right: 0; top: 0; bottom: 0; width: 400px; height: auto; margin: 0; }
}

.ep-esc { position: absolute; inset: 0 0 30px 0; display: grid; place-items: center; transform: translateX(100%); visibility: hidden; }
.ep-esc:first-child { transform: none; visibility: visible; }
.ep-esc > * { transform: scale(var(--ep-k)); flex: none; }
a.ep-enlace { color: inherit; text-decoration: none; display: block; }
.ep img { image-rendering: pixelated; }

.ep-puntos { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 7px; }
.ep-puntos i { position: relative; width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.ep-puntos i.is-on { width: 30px; }
.ep-puntos b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }

/* ===== 1. Tragaperras ===== */
.ep-slot { width: 320px; padding: 14px 16px 16px; border-radius: 18px; text-align: center;
	background: linear-gradient(180deg, #2a1d08, #120c04); border: 2px solid #c9952f;
	box-shadow: 0 0 0 4px rgba(0, 0, 0, .4), 0 0 40px rgba(232, 185, 74, .35), inset 0 0 20px rgba(0, 0, 0, .6); }
.ep-slot-t { font: 900 26px Cinzel, serif; letter-spacing: .18em; background: linear-gradient(180deg, #fff3c4, #e8b94a 55%, #a56c1e);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 0 8px rgba(232, 185, 74, .6)); animation: ep-neon 1.6s ease-in-out infinite; }
@keyframes ep-neon { 50% { filter: drop-shadow(0 0 16px rgba(255, 200, 80, .95)); } }
.ep-bombillas { display: flex; justify-content: space-between; margin: 6px 4px 10px; }
.ep-bombillas i { width: 7px; height: 7px; border-radius: 50%; background: #ffcf5a; box-shadow: 0 0 6px #ffcf5a; animation: ep-parpadeo 1s infinite; }
.ep-bombillas i:nth-child(even) { animation-delay: .5s; }
@keyframes ep-parpadeo { 50% { opacity: .25; box-shadow: none; } }
.ep-rodillos { display: flex; gap: 8px; justify-content: center; padding: 8px; border-radius: 12px; background: #050307;
	border: 1px solid rgba(232, 185, 74, .4); position: relative; animation: ep-premio 4.8s infinite; }
.ep-rodillos::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: rgba(255, 80, 80, .7); box-shadow: 0 0 8px #ff5050; }
@keyframes ep-premio { 0%, 65% { box-shadow: none; } 70%, 82%, 94% { box-shadow: 0 0 26px rgba(255, 207, 90, .95), inset 0 0 16px rgba(255, 207, 90, .55); } 76%, 88%, 100% { box-shadow: 0 0 8px rgba(255, 207, 90, .4); } }
.ep-rod { width: 74px; height: 150px; overflow: hidden; border-radius: 8px; background: linear-gradient(180deg, #1c1f2b, #f2efe6 30%, #f2efe6 70%, #1c1f2b); }
.ep-tira { display: flex; flex-direction: column; align-items: center; }
.ep-tira img { width: 46px; height: 46px; margin: 2px 0; }
/* fila = 50px, vuelta = 8 premios = 400px. Cada rodillo da dos vueltas y para con la Mystery
   Box en la linea; el principio y el final son la misma imagen, asi el bucle no salta */
.ep-rod:nth-child(1) .ep-tira { transform: translateY(-1150px); animation: ep-rod0 4.8s infinite; }
.ep-rod:nth-child(2) .ep-tira { transform: translateY(-1450px); animation: ep-rod1 4.8s infinite; }
.ep-rod:nth-child(3) .ep-tira { transform: translateY(-1350px); animation: ep-rod2 4.8s infinite; }
@keyframes ep-rod0 { 0%, 6% { transform: translateY(-350px); animation-timing-function: cubic-bezier(.4, .05, .25, 1.05); } 40%, 100% { transform: translateY(-1150px); } }
@keyframes ep-rod1 { 0%, 6% { transform: translateY(-650px); animation-timing-function: cubic-bezier(.4, .05, .25, 1.05); } 52%, 100% { transform: translateY(-1450px); } }
@keyframes ep-rod2 { 0%, 6% { transform: translateY(-550px); animation-timing-function: cubic-bezier(.4, .05, .25, 1.05); } 64%, 100% { transform: translateY(-1350px); } }
.ep-slot-pie { margin-top: 10px; height: 16px; position: relative; font: 700 12px Inter, sans-serif; color: #f6dc93; }
.ep-slot-pie span { position: absolute; inset: 0; white-space: nowrap; }
.ep-slot-pie .ep-gana { opacity: 0; font: 900 14px Cinzel, serif; letter-spacing: .12em; color: #ffe08a; text-shadow: 0 0 10px #f59e0b; animation: ep-aparece 4.8s infinite; }
.ep-slot-pie .ep-normal { animation: ep-desaparece 4.8s infinite; }
@keyframes ep-aparece { 0%, 65% { opacity: 0; } 68%, 97% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ep-desaparece { 0%, 65% { opacity: 1; } 68%, 97% { opacity: 0; } 100% { opacity: 1; } }

/* ===== 2. Battle Pass ===== */
.ep-bp { width: 340px; padding: 18px; border-radius: 18px; background: linear-gradient(160deg, #1b1440, #0b0a1e); border: 1px solid rgba(167, 139, 250, .45);
	box-shadow: 0 0 40px rgba(139, 92, 246, .35); position: relative; overflow: hidden; transition: border-color .2s; }
a.ep-enlace:hover .ep-bp { border-color: rgba(232, 185, 74, .8); }
.ep-bp::before { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-100%);
	background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .12) 50%, transparent 65%); animation: ep-barrido 3s ease-in-out infinite; }
@keyframes ep-barrido { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.ep-bp-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ep-bp-t { font: 900 22px Cinzel, serif; letter-spacing: .06em; line-height: 1.15; }
.ep-bp-t small { display: block; font: 700 11px Inter, sans-serif; letter-spacing: .2em; color: #c4b5fd; }
.ep-bp-prem { font: 900 10px Inter, sans-serif; letter-spacing: .14em; color: #1c1206; padding: 4px 9px; border-radius: 999px;
	background: linear-gradient(180deg, #f7dc93, #d9a43c); box-shadow: 0 0 12px rgba(232, 185, 74, .6); }
.ep-bp-camino { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; position: relative; }
.ep-bp-camino::before { content: ""; position: absolute; left: 20px; right: 20px; top: 50%; height: 4px; background: rgba(255, 255, 255, .12); border-radius: 2px; }
.ep-bp-fill { position: absolute; left: 20px; top: calc(50% - 2px); height: 4px; width: calc(100% - 40px); border-radius: 2px;
	background: linear-gradient(90deg, #8b5cf6, #e8b94a); box-shadow: 0 0 10px #a78bfa; animation: ep-llenar 4s ease-in-out infinite; }
@keyframes ep-llenar { 0% { width: 0; } 70%, 100% { width: calc(100% - 40px); } }
.ep-bp-nodo { position: relative; width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: #120e2a; border: 2px solid rgba(167, 139, 250, .5); }
.ep-bp-nodo.is-hecho { border-color: #e8b94a; box-shadow: 0 0 12px rgba(232, 185, 74, .6); }
.ep-bp-nodo b { position: absolute; bottom: -18px; font: 800 10px Inter, sans-serif; color: #c4b5fd; white-space: nowrap; }
.ep-bp-nodo img { width: 32px; height: 32px; }
.ep-bp-nodo.is-top { animation: ep-latir 1.4s ease-in-out infinite; }
@keyframes ep-latir { 50% { transform: scale(1.08); box-shadow: 0 0 22px rgba(232, 185, 74, .9); } }
.ep-bp-pie { display: flex; justify-content: space-between; gap: 8px; margin-top: 26px; font: 700 12px Inter, sans-serif; color: #ddd6fe; }
.ep-bp-pie span:last-child { color: #f6dc93; white-space: nowrap; }

/* ===== 3. Ruleta ===== */
.ep-rul { width: 350px; text-align: center; }
.ep-rul-t { font: 900 24px Cinzel, serif; letter-spacing: .16em; color: #fff; text-shadow: 0 0 12px rgba(232, 185, 74, .6); }
.ep-rul-marco { position: relative; margin-top: 12px; height: 92px; border-radius: 14px; overflow: hidden; background: #070a14; border: 2px solid rgba(232, 185, 74, .55);
	box-shadow: 0 0 30px rgba(232, 185, 74, .25), inset 0 0 30px rgba(0, 0, 0, .8); text-align: left; }
.ep-rul-marco::before, .ep-rul-marco::after { content: ""; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2; }
.ep-rul-marco::before { left: 0; background: linear-gradient(90deg, #070a14, transparent); }
.ep-rul-marco::after { right: 0; background: linear-gradient(-90deg, #070a14, transparent); }
/* casilla = 76px (66 + hueco), vuelta = 8 casillas = 608px. -468px deja la Mystery Box de la
   casilla 8 bajo la flecha; dos vueltas despues (-1684px) vuelve a estar ahi */
.ep-rul-tira { display: flex; gap: 10px; padding: 12px 0; width: max-content; transform: translateX(-1684px); animation: ep-correr 4.4s infinite; }
@keyframes ep-correr { 0%, 4% { transform: translateX(-468px); animation-timing-function: cubic-bezier(.15, .65, .2, 1); } 68%, 100% { transform: translateX(-1684px); } }
.ep-rul-c { flex: none; width: 66px; height: 66px; border-radius: 10px; display: grid; place-items: center; background: #121a2e; border-bottom: 4px solid var(--c, #64748b); }
.ep-rul-c img { width: 44px; height: 44px; }
.ep-rul-flecha { position: absolute; left: 50%; top: -2px; transform: translateX(-50%); z-index: 3; width: 0; height: 0;
	border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 16px solid #fbbf24; filter: drop-shadow(0 0 6px #fbbf24); }
.ep-rul-linea { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(251, 191, 36, .8); z-index: 3; box-shadow: 0 0 10px #fbbf24; }
.ep-rul-gana { position: absolute; left: calc(50% - 38px); top: 8px; width: 76px; height: 74px; border-radius: 12px; border: 2px solid #fbbf24; z-index: 3; opacity: 0;
	box-shadow: 0 0 18px rgba(251, 191, 36, .9), inset 0 0 14px rgba(251, 191, 36, .45); animation: ep-ruleta-gana 4.4s infinite; }
@keyframes ep-ruleta-gana { 0%, 68% { opacity: 0; } 72%, 84%, 96% { opacity: 1; } 78%, 90% { opacity: .35; } 100% { opacity: 0; } }
.ep-rul-pie { margin-top: 10px; font: 600 12px Inter, sans-serif; color: #cbd5e1; }
