.jt-jumpscare-editor-preview {
    padding: 20px;
    border: 2px dashed #8dbb34;
    border-radius: 10px;
    background: #111;
    color: #fff;
    text-align: center;
    line-height: 1.5;
}

.jt-jumpscare,
.jt-jumpscare * {
    box-sizing: border-box;
}

.jt-jumpscare {
    position: relative;
    width: 100%;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    --jt-power: 1;
}

.jt-jumpscare[data-intensity="1"] { --jt-power: .74; }
.jt-jumpscare[data-intensity="2"] { --jt-power: .88; }
.jt-jumpscare[data-intensity="3"] { --jt-power: 1; }

.jt-jumpscare--fixed {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
}

.jt-jumpscare.is-armed,
.jt-jumpscare.is-prelude,
.jt-jumpscare.is-scare,
.jt-jumpscare.is-ending {
    opacity: 1;
    visibility: visible;
}

.jt-jumpscare__darkness,
.jt-jumpscare__scene,
.jt-jumpscare__ending {
    position: absolute;
    inset: 0;
}

.jt-jumpscare__darkness {
    z-index: 1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 44%, #171717 0%, #050505 38%, #000 76%);
}

.jt-jumpscare__noise {
    position: absolute;
    inset: -50%;
    opacity: .10;
    background-image: repeating-radial-gradient(circle, #fff 0 1px, transparent 1px 4px);
    background-size: 7px 7px;
}

.effect-dark_prelude .jt-jumpscare__noise,
.effect-scanlines .jt-jumpscare__noise {
    animation: jt-noise .14s steps(2) infinite;
}

.jt-jumpscare__scene {
    z-index: 2;
    overflow: hidden;
    background: #000;
    opacity: 0;
}

.jt-jumpscare.is-prelude .jt-jumpscare__scene,
.jt-jumpscare.is-scare .jt-jumpscare__scene {
    opacity: 1;
}

.jt-jumpscare__image,
.jt-jumpscare__rgb,
.jt-jumpscare__slices span {
    position: absolute;
    inset: -10%;
    background-image: var(--jt-desktop-image);
    background-size: cover;
    background-position: center center;
    will-change: transform, filter, clip-path;
}

@media (max-width: 767px), (orientation: portrait) {
    .jt-jumpscare__image,
    .jt-jumpscare__rgb,
    .jt-jumpscare__slices span {
        background-image: var(--jt-mobile-image);
        inset: -6%;
        background-position: center top;
    }
}

.jt-jumpscare__image {
    filter: brightness(.8) contrast(1.2) saturate(1.05);
    transform: scale(.98);
}

.jt-jumpscare__rgb {
    display: none;
    opacity: .42;
    mix-blend-mode: screen;
}
.effect-glitch .jt-jumpscare__rgb,
.effect-slices .jt-jumpscare__rgb { display: block; }
.jt-jumpscare__rgb--one { filter: sepia(1) saturate(10) hue-rotate(305deg); }
.jt-jumpscare__rgb--two { filter: sepia(1) saturate(10) hue-rotate(140deg); }

.jt-jumpscare__slices {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
}
.effect-slices .jt-jumpscare__slices { display: block; }
.jt-jumpscare__slices span:nth-child(1) { clip-path: inset(10% 0 68% 0); }
.jt-jumpscare__slices span:nth-child(2) { clip-path: inset(42% 0 32% 0); }
.jt-jumpscare__slices span:nth-child(3) { clip-path: inset(72% 0 8% 0); }

.jt-jumpscare__scanlines {
    position: absolute;
    inset: 0;
    z-index: 7;
    opacity: 0;
    background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(255,255,255,.15) 3px 4px);
}
.effect-scanlines .jt-jumpscare__scanlines { opacity: .20; }

.jt-jumpscare__vignette {
    position: absolute;
    inset: 0;
    z-index: 6;
    background: radial-gradient(circle at center, transparent 25%, rgba(0,0,0,.18) 55%, rgba(0,0,0,.86) 100%);
}

.jt-jumpscare__red,
.jt-jumpscare__flash {
    position: absolute;
    inset: 0;
    z-index: 12;
    opacity: 0;
}
.jt-jumpscare__red { background: rgba(155, 0, 0, .70); mix-blend-mode: screen; }
.jt-jumpscare__flash { background: #fff; }

.jt-jumpscare.is-flash .jt-jumpscare__flash { opacity: .9; }
.jt-jumpscare.is-red-pulse .jt-jumpscare__red { opacity: .82; }

.jt-jumpscare__headline {
    display: none;
    position: absolute;
    z-index: 14;
    top: 8%;
    left: 50%;
    width: min(92%, 950px);
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    gap: .15em;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 4px 0 #000, 0 0 18px #000;
}

.jt-jumpscare__primary {
    font-size: clamp(34px, 9vw, 120px);
    font-weight: 1000;
    color: #f21818;
    letter-spacing: -.03em;
    line-height: .88;
}

.jt-jumpscare__secondary {
    font-size: clamp(30px, 7vw, 90px);
    font-weight: 1000;
    color: #fff;
    letter-spacing: -.03em;
    line-height: .9;
}

.jt-jumpscare__countdown {
    position: absolute;
    z-index: 15;
    left: 50%;
    bottom: 8%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25em;
    text-align: center;
    opacity: 0;
}

.jt-jumpscare.is-countdown-visible .jt-jumpscare__countdown { opacity: 1; }

.jt-jumpscare__intro {
    font-size: clamp(18px, 3.6vw, 54px);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 3px 14px #000;
    letter-spacing: .02em;
}

.jt-jumpscare__number {
    font-size: clamp(70px, 22vw, 260px);
    line-height: .9;
    font-weight: 1000;
    color: #f21818;
    text-shadow: 0 0 28px rgba(242,24,24,.5), 0 6px 0 #000;
}

.jt-jumpscare.is-countdown-pop .jt-jumpscare__number {
    animation: jt-count-pop .25s ease-out 1;
}

.jt-jumpscare__laugh {
    position: absolute;
    z-index: 9;
    left: 50%;
    bottom: 4%;
    display: none;
    gap: clamp(8px, 3vw, 28px);
    transform: translateX(-50%);
    color: #fff;
    font-size: clamp(34px, 9vw, 110px);
    font-weight: 1000;
    text-shadow: 0 5px 0 #000, 0 12px 34px #000;
    white-space: nowrap;
}
.effect-laugh_text .jt-jumpscare__laugh { display: flex; }
.jt-jumpscare__laugh span:nth-child(2) { transform: translateY(-12%); }

.jt-jumpscare__symbols span {
    position: absolute;
    z-index: 9;
    display: none;
    color: #fff;
    font-size: clamp(34px, 8vw, 100px);
    font-family: Arial, sans-serif;
    font-weight: 1000;
    text-shadow: 0 4px 16px #000;
    opacity: 0;
}
.effect-symbols .jt-jumpscare__symbols span { display: block; }
.jt-jumpscare__symbols span:nth-child(1) { left: 4%; top: 18%; }
.jt-jumpscare__symbols span:nth-child(2) { right: 5%; top: 25%; }
.jt-jumpscare__symbols span:nth-child(3) { left: 9%; bottom: 17%; }
.jt-jumpscare__symbols span:nth-child(4) { right: 9%; bottom: 14%; }

.jt-jumpscare__ending {
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #000;
    opacity: 0;
    text-align: center;
    font-size: clamp(34px, 10vw, 110px);
}
.jt-jumpscare.is-ending .jt-jumpscare__ending { opacity: 1; }

.jt-jumpscare.is-scare .jt-jumpscare__image {
    animation: jt-base-entry .55s cubic-bezier(.1,.8,.2,1) both;
}
.effect-message_bounce.is-scare .jt-jumpscare__headline {
    animation: jt-message .5s cubic-bezier(.12,.85,.25,1.4) both;
}
.effect-laugh_text.is-scare .jt-jumpscare__laugh {
    animation: jt-laugh-text .17s steps(2) infinite;
}
.effect-symbols.is-scare .jt-jumpscare__symbols span {
    animation: jt-symbols .65s steps(2) both;
}
.effect-symbols.is-scare .jt-jumpscare__symbols span:nth-child(2) { animation-delay: .08s; }
.effect-symbols.is-scare .jt-jumpscare__symbols span:nth-child(3) { animation-delay: .15s; }
.effect-symbols.is-scare .jt-jumpscare__symbols span:nth-child(4) { animation-delay: .22s; }

.effect-glitch.is-scare .jt-jumpscare__rgb--one { animation: jt-rgb-one .13s steps(2) infinite; }
.effect-glitch.is-scare .jt-jumpscare__rgb--two { animation: jt-rgb-two .16s steps(2) infinite; }

.effect-slices.is-scare .jt-jumpscare__slices span:nth-child(1) { animation: jt-slice-one .17s steps(2) infinite; }
.effect-slices.is-scare .jt-jumpscare__slices span:nth-child(2) { animation: jt-slice-two .21s steps(2) infinite; }
.effect-slices.is-scare .jt-jumpscare__slices span:nth-child(3) { animation: jt-slice-three .15s steps(2) infinite; }

.effect-quake.is-shaking { animation: jt-quake calc(1.05s * var(--jt-power)) linear 1; }
.effect-zoom.is-scare .jt-jumpscare__image { animation: jt-crazy-zoom .92s cubic-bezier(.12,.9,.18,1) both; }
.effect-invert.is-scare .jt-jumpscare__scene { animation: jt-invert .24s steps(2) 4; }
.effect-blur.is-scare .jt-jumpscare__image { animation: jt-base-entry .55s both, jt-blur 1.1s ease-in-out .55s 3; }
.effect-rotate.is-scare .jt-jumpscare__scene { animation: jt-rotate .82s cubic-bezier(.2,.8,.2,1) 1; }

.jt-jumpscare.is-phase-two .jt-jumpscare__headline {
    filter: contrast(1.2);
    transform: translateX(-50%) scale(1.04);
}
.jt-jumpscare.is-phase-three .jt-jumpscare__scene {
    filter: saturate(1.2) contrast(1.25);
}

.jt-jumpscare.is-second-hit .jt-jumpscare__image {
    filter: brightness(1.1) contrast(1.55) saturate(1.2);
    transform: scale(1.28) rotate(-1deg);
}

@keyframes jt-noise { 0% { transform: translate(0); } 100% { transform: translate(3%, -2%); } }
@keyframes jt-count-pop { 0% { transform: scale(.72); } 100% { transform: scale(1); } }
@keyframes jt-base-entry {
    0% { transform: scale(.76); filter: brightness(1.9) contrast(1.7); }
    32% { transform: scale(1.23); }
    100% { transform: scale(1.08); filter: brightness(.88) contrast(1.35); }
}
@keyframes jt-crazy-zoom {
    0% { transform: scale(.55) rotate(-2deg); filter: brightness(2.2); }
    25% { transform: scale(1.38) rotate(2deg); }
    48% { transform: scale(.94) rotate(-1deg); }
    72% { transform: scale(1.28) rotate(1deg); }
    100% { transform: scale(1.1); filter: brightness(.9) contrast(1.4); }
}
@keyframes jt-message {
    0% { opacity: 0; transform: translate(-50%, -90px) scale(.45) rotate(-5deg); }
    70% { opacity: 1; transform: translate(-50%, 10px) scale(1.12) rotate(2deg); }
    100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes jt-laugh-text { 0% { transform: translateX(-50%) rotate(-2deg) scale(1); } 100% { transform: translateX(-50%) rotate(2deg) scale(1.07); } }
@keyframes jt-symbols {
    0% { opacity: 0; transform: scale(.2) rotate(-40deg); }
    50% { opacity: 1; transform: scale(1.4) rotate(20deg); }
    100% { opacity: .65; transform: scale(1) rotate(0); }
}
@keyframes jt-quake {
    0%,100% { transform: translate(0) rotate(0); }
    8% { transform: translate(-22px, 13px) rotate(-1deg); }
    16% { transform: translate(24px, -15px) rotate(1deg); }
    25% { transform: translate(-18px, -12px) rotate(-1deg); }
    36% { transform: translate(20px, 14px) rotate(1deg); }
    50% { transform: translate(-15px, 8px); }
    66% { transform: translate(13px, -9px); }
    82% { transform: translate(-8px, 5px); }
}
@keyframes jt-rgb-one {
    0% { transform: translate(-16px, 3px) scale(1.08); clip-path: inset(0 0 52% 0); }
    100% { transform: translate(14px, -4px) scale(1.1); clip-path: inset(35% 0 0 0); }
}
@keyframes jt-rgb-two {
    0% { transform: translate(12px, -2px) scale(1.1); clip-path: inset(48% 0 0 0); }
    100% { transform: translate(-14px, 5px) scale(1.08); clip-path: inset(0 0 40% 0); }
}
@keyframes jt-slice-one { 0% { transform: translateX(-18px) scale(1.08); } 100% { transform: translateX(16px) scale(1.12); } }
@keyframes jt-slice-two { 0% { transform: translateX(14px) scale(1.1); } 100% { transform: translateX(-20px) scale(1.08); } }
@keyframes jt-slice-three { 0% { transform: translateX(-10px) scale(1.11); } 100% { transform: translateX(18px) scale(1.09); } }
@keyframes jt-invert { 0% { filter: invert(0) hue-rotate(0); } 100% { filter: invert(1) hue-rotate(180deg); } }
@keyframes jt-blur { 0%,100% { filter: blur(0) brightness(.9) contrast(1.35); } 50% { filter: blur(8px) brightness(1.25) contrast(1.5); } }
@keyframes jt-rotate {
    0% { transform: rotate(0) scale(1); }
    24% { transform: rotate(-3deg) scale(1.04); }
    46% { transform: rotate(3deg) scale(1.08); }
    68% { transform: rotate(-2deg) scale(1.05); }
    100% { transform: rotate(0) scale(1); }
}

@media (max-width: 767px) {
    .jt-jumpscare__headline { top: 4.5%; width: 92%; }
    .jt-jumpscare__primary { font-size: clamp(34px, 12vw, 72px); }
    .jt-jumpscare__secondary { font-size: clamp(28px, 9vw, 60px); }
    .jt-jumpscare__countdown { bottom: 7%; }
    .jt-jumpscare__intro { font-size: clamp(18px, 5vw, 28px); }
    .jt-jumpscare__number { font-size: clamp(90px, 32vw, 190px); }
    .jt-jumpscare__laugh { bottom: 3%; font-size: clamp(26px, 8vw, 62px); }
}

@media (prefers-reduced-motion: reduce) {
    .jt-jumpscare, .jt-jumpscare * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* La imagen incluida ya contiene TE ATRAPAMOS y JA JA JA.
   Los textos HTML se muestran solo al activar la opción del backend. */
.jt-jumpscare--show-headline .jt-jumpscare__headline {
    display: flex;
}

/* Enmascara PREPÁRATE y el 3 horneados en las imágenes incluidas.
   Encima se dibuja una única cuenta atrás dinámica. */
.jt-jumpscare__countdown-mask {
    display: none;
    position: absolute;
    z-index: 13;
    left: 50%;
    bottom: -2%;
    width: min(46vw, 720px);
    height: 45vh;
    transform: translateX(-50%);
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 50% 58%,
            rgba(0,0,0,.99) 0 44%,
            rgba(0,0,0,.94) 55%,
            rgba(0,0,0,.66) 72%,
            transparent 100%
        );
}

.jt-jumpscare--mask-countdown .jt-jumpscare__countdown-mask {
    display: block;
}

@media (max-width: 767px), (orientation: portrait) {
    .jt-jumpscare__countdown-mask {
        bottom: -1%;
        width: 100vw;
        height: 45vh;
        background:
            radial-gradient(
                ellipse at 50% 58%,
                rgba(0,0,0,1) 0 42%,
                rgba(0,0,0,.96) 56%,
                rgba(0,0,0,.72) 74%,
                transparent 100%
            );
    }
}
