* {
	margin: 0;
	padding: 0;
}

body {
	display: flex;
	flex-direction: column;
	position: relative;
	justify-content: flex-start;
	align-items: center;
	background-color: #78bbcb;
}

/* Telon */

#telon {
	display: flex;
	flex-direction: row;
	z-index: 100;
	position: fixed;
	width: 100%;
	overflow: visible;
}

#telon-izq, #telon-der {
	width: 50%;
	height: 100%;
	position: fixed;
}

#telon-izq img, #telon-der img {
	width: 100%;
	height: 100%;
}

#telon-izq {
	animation-name: mover-a-izq;
	animation-delay: 3.5s;
	animation-duration: 3.5s;
	left: 0;
	animation-fill-mode: forwards;
}

#telon-der {
	animation-name: mover-a-der;
	animation-delay: 3.5s;
	animation-duration: 3.5s;
	animation-fill-mode: forwards;
	right: 0;
}

@keyframes mover-a-izq {
	0% {
		left: 0;
	}
	100% {
		left: -1000px;
	}
}

@keyframes mover-a-der {
	0% {
		right: 0px;
	}
	100% {
		right: -1000px;
	}
}

/* Titulo */

@font-face {
	font-family: 'Cooper Black';
	src: url(fuentes/COOPBL.TTF);
}

.titulo {
	font-family: 'Cooper Black';
	text-align: center;
	font-size: 67px;
	margin-top: 2.5%;
}

/* Objetos */

#tabla {
	display: block;
}

.reloj1 {
	margin-left: 105px;
}

#jesus {
	text-align: top;
	margin-left: 15px;
}

#tostadorachica1 {
	margin-left: 90px;
}

.gusano2 {
	margin-left: 30px;
}

#tostadorachica2 {
	margin-left: 35px;
}

.tostadoragrande {
	margin-left: 160px;
}

#boca2 {
	margin-left: 20px;
}

#campanagrande {
	margin-left: 22px;
}

#campanachica {
	margin-left: 200px;
}

.reloj2 {
	margin-left: 90px;
	margin-top: -50px;
}

#tostadora3 {
	margin-left: 20px;
}

#audio {
	margin-top: 20%;
}

#etiqueta-aceite {
	display: none;
	position: fixed;
	top: 40%;
	left: 100%;
	width: 150px;
	z-index: 9999;
	pointer-events: none;
}

body.telon-abierto #etiqueta-aceite {
	display: block;
	animation: mover-aceite 10s linear infinite;
}

#etiqueta-aceite img {
	width: 100%;
	height: auto;
}

/* Animación para mover la imagen de derecha a izquierda en bucle */
@keyframes mover-aceite {
	0% {
		left: 100%;
	}
	100% {
		left: -200px;
	}
}

.comprar-aceite {
	margin-top: 40px;
	margin-bottom: 40px;
	text-align: center;
	z-index: 10;
	position: relative;
}

.boton-aceite {
	background-color: yellow;
	color: red;
	font-family: 'Comic Sans MS', cursive, sans-serif;
	font-size: 30px;
	padding: 15px 30px;
	text-decoration: none;
	border: 5px double red;
	border-radius: 15px;
	box-shadow: 0 0 20px red;
	animation: parpadeo 1s infinite alternate;
	transition: transform 0.2s;
	display: inline-block;
}

.boton-aceite:hover {
	transform: scale(1.1) rotate(-2deg);
}

/* Efecto parpadeo */
@keyframes parpadeo {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0.4;
	}
}

#jesus-container {
	position: relative;
	width: 180px;
	height: 180px;
	display: flex;
	justify-content: center;
	align-items: center;
}

#jesus {
	position: absolute;
	z-index: 2;
}

#jesus img {
	width: 100px;
	height: auto;
}

.orbit-text {
	position: absolute;
	width: 200px;
	height: 200px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -55%); /* subimos ligeramente el círculo */
	animation: spin 6s linear infinite;
	z-index: 1;
	pointer-events: none;
}

.orbit-text span {
	position: absolute;
	top: 50%;
	left: 50%;
	transform-origin: 0 90px; /* radio exacto de rotación */
	transform: rotate(calc(var(--i) * 21deg)) translateY(-90px);
	font-size: 16px;
	font-family: 'Comic Sans MS', cursive;
	font-weight: bold;
	color: red;
	text-shadow: 1px 1px yellow;
}

@keyframes spin {
	from {
		transform: translate(-50%, -55%) rotate(0deg);
	}
	to {
		transform: translate(-50%, -55%) rotate(360deg);
	}
}

@media (max-width: 768px) {
  .tabla-scroll {
    transform: scale(0.55); /* puedes ajustar entre 0.4 y 0.7 */
    transform-origin: top center;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
  }

  #etiqueta-aceite {
    top: 12% !important;
    width: 90px;
    display: block !important;
    animation: mover-aceite 10s linear infinite;
  }

  body.telon-abierto #etiqueta-aceite {
		top: 15% !important;
		width: 90px;
	}

  .titulo {
    font-size: 32px;
    margin: 20px auto;
  }

  .boton-aceite {
    font-size: 20px;
    padding: 10px 25px;
  }

  audio {
    width: 90%;
    max-width: 320px;
  }
}