/* Eclipse FX: animaciones extra. Modo "llamativo" por defecto; html.fx-lite = sutil. */

/* Fondo de estrellas */
#ez-stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .85; }
html.fx-off #ez-stars { display: none; }

/* Aparición al hacer scroll */
.fx-rv { opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--fx-d, 0s); }
.fx-rv.fx-in { opacity: 1; transform: none; }
html.fx-lite .fx-rv { transform: none; transition-duration: .35s; }
html.fx-off .fx-rv { opacity: 1; transform: none; transition: none; }

/* Tarjetas: inclinación 3D + brillo que sigue al mouse */
.card--manga, .card--juego, .gcard, .shopitem, .tcard { --mx: 50%; --my: 50%; }
.card--manga::after, .card--juego::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .22), transparent 55%); }
.card--manga:hover::after, .card--juego:hover::after { opacity: 1; }
html.fx-lite .card--manga::after, html.fx-lite .card--juego::after { display: none; }
.card--manga .card__img, .card--juego .card__img { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.card--manga:hover .card__img, .card--juego:hover .card__img { transform: scale(1.07); }
html.fx-off .card--manga:hover .card__img, html.fx-off .card--juego:hover .card__img { transform: none; }

/* Botones: ondas al tocar y brillo que cruza */
.btn { position: relative; overflow: hidden; }
.fx-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, .45); transform: scale(0); animation: fx-ripple .6s ease-out forwards; }
@keyframes fx-ripple { to { transform: scale(1); opacity: 0; } }
.btn--download::before, .btn--patreon::before { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: fx-sheen 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes fx-sheen { 0%, 60% { left: -80%; } 100% { left: 140%; } }
html.fx-lite .btn--download::before, html.fx-lite .btn--patreon::before { display: none; }

/* Títulos con degradado que respira */
.hero h1, .section > h2 { background-size: 200% auto; }
html:not(.fx-lite):not(.fx-off) .hero h1 { background-image: linear-gradient(90deg, #fff, #f9a8d4, #a78bfa, #fff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: fx-grad 8s linear infinite; }
@keyframes fx-grad { to { background-position: 200% center; } }

/* Tienda y cofres */
.shopitem { transition: transform .25s, box-shadow .25s; }
.shopitem:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(var(--primary-rgb), .25); }
.tcard.rar-epica, .tcard.rar-rara, .tcard.rar-legendaria { position: relative; overflow: hidden; }
.tcard.rar-epica::after, .tcard.rar-rara::after, .tcard.rar-legendaria::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--rc) 35%, transparent) 50%, transparent 65%); background-size: 250% 100%; animation: fx-holo 3.5s ease-in-out infinite; }
@keyframes fx-holo { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
html.fx-lite .tcard::after, html.fx-off .tcard::after { display: none; }
[data-ez-chest]:not(:disabled) { animation: fx-wiggle 2.8s ease-in-out infinite; }
@keyframes fx-wiggle { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-4deg) scale(1.05); } 94% { transform: rotate(4deg) scale(1.05); } 97% { transform: rotate(-2deg); } }
html.fx-lite [data-ez-chest], html.fx-off [data-ez-chest] { animation: none !important; }

/* Partículas (monedas, confeti, chispas del cursor) */
.fx-p { position: fixed; z-index: 99999; pointer-events: none; will-change: transform, opacity; }

/* Lector */
.rd-page img { animation: fx-fade .5s ease both; }
.rd-end { animation: fx-pop .6s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes fx-fade { from { opacity: 0; transform: scale(.985); } }
@keyframes fx-pop { from { opacity: 0; transform: translateY(18px) scale(.95); } }
html.fx-lite .rd-page img, html.fx-lite .rd-end { animation-duration: .25s; }
html.fx-off .rd-page img, html.fx-off .rd-end { animation: none; }

/* Perfil */
.pcard__avwrap .av { transition: transform .35s cubic-bezier(.2, .9, .3, 1.3); }
.pcard__avwrap:hover .av { transform: scale(1.08) rotate(-3deg); }
.pcard { transition: box-shadow .4s; }
.pcard:hover { box-shadow: 0 12px 40px rgba(var(--primary-rgb), .22); }
html:not(.fx-lite):not(.fx-off) .pcard__avwrap .av { animation: fx-float 5s ease-in-out infinite; }
@keyframes fx-float { 50% { transform: translateY(-4px); } }


@media (prefers-reduced-motion: reduce) {
	.fx-rv { opacity: 1; transform: none; transition: none; }
	[data-ez-chest], .tcard::after, .btn::before, .rd-page img, .rd-end, .pcard__avwrap .av { animation: none !important; }
	#ez-stars { display: none; }
}

/* Tarjetas de la portada y listados (.gcard) */
.gcard { position: relative; overflow: hidden; transition: transform .2s, box-shadow .25s; }
.gcard:hover { box-shadow: 0 10px 30px rgba(var(--primary-rgb), .28); }
.gcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .2), transparent 55%); }
.gcard:hover::after { opacity: 1; }
.gcard__media img { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.gcard:hover .gcard__media img { transform: scale(1.07); }
html.fx-lite .gcard::after, html.fx-off .gcard::after { display: none; }
html.fx-off .gcard:hover .gcard__media img { transform: none; }

/* Admin bar móvil: no deja hueco sobre el encabezado fijo */
@media (max-width: 600px) { .site-header { top: 0; } }
