.hanimtext-wrapper {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    line-height: 1.4;
    overflow: visible;
}

.hanimtext-runner {
    display: inline-block;
    position: relative;
    will-change: transform, opacity, filter;
}

/* 1) Marquee Ticker (نمایش عنوان‌به‌عنوان شبیه اخبار زیرنویس) */
.hanimtext-effect-marquee {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    box-sizing: border-box;
    position: relative;
}

.hanimtext-effect-marquee .hanimtext-runner {
    display: inline-block !important;
    white-space: nowrap !important;
    will-change: transform;
    transform: translateZ(0);
}



/* 2) Gentle Scale (بزرگ و کوچک شدن ملایم) */
.hanimtext-effect-gentlescale .hanimtext-in {
    animation: hanimGentlePulseIn 0.8s ease forwards, hanimGentlePulseLoop 3s ease-in-out infinite alternate;
}
.hanimtext-effect-gentlescale .hanimtext-out {
    animation: hanimFadeOut 0.5s ease forwards;
}
@keyframes hanimGentlePulseIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes hanimGentlePulseLoop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(0.97); }
}

/* 3) Fade */
.hanimtext-effect-fade .hanimtext-in {
    animation: hanimFadeIn 0.8s forwards ease;
}
.hanimtext-effect-fade .hanimtext-out {
    animation: hanimFadeOut 0.5s forwards ease;
}
@keyframes hanimFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes hanimFadeOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(1.04); }
}

/* 4) Slide */
.hanimtext-effect-slide .hanimtext-slide-up.hanimtext-in {
    animation: hanimSlideUpIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hanimtext-effect-slide .hanimtext-slide-up.hanimtext-out {
    animation: hanimSlideUpOut 0.5s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}
@keyframes hanimSlideUpIn {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hanimSlideUpOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-40px); }
}

.hanimtext-effect-slide .hanimtext-slide-down.hanimtext-in {
    animation: hanimSlideDownIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hanimtext-effect-slide .hanimtext-slide-down.hanimtext-out {
    animation: hanimSlideDownOut 0.5s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}
@keyframes hanimSlideDownIn {
    from { opacity: 0; transform: translateY(-40px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hanimSlideDownOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(40px); }
}

.hanimtext-effect-slide .hanimtext-slide-left.hanimtext-in {
    animation: hanimSlideLeftIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hanimtext-effect-slide .hanimtext-slide-left.hanimtext-out {
    animation: hanimSlideLeftOut 0.5s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}
@keyframes hanimSlideLeftIn {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes hanimSlideLeftOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-50px); }
}

.hanimtext-effect-slide .hanimtext-slide-right.hanimtext-in {
    animation: hanimSlideRightIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hanimtext-effect-slide .hanimtext-slide-right.hanimtext-out {
    animation: hanimSlideRightOut 0.5s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}
@keyframes hanimSlideRightIn {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes hanimSlideRightOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(50px); }
}

/* 5) Typing */
.hanimtext-cursor {
    display: inline-block;
    margin-right: 3px;
    animation: hanimCursorBlink 0.75s infinite;
    font-weight: 300;
}
@keyframes hanimCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 6) Blur */
.hanimtext-effect-blur .hanimtext-in {
    animation: hanimBlurIn 0.8s ease-out forwards;
}
.hanimtext-effect-blur .hanimtext-out {
    animation: hanimBlurOut 0.5s ease-in forwards;
}
@keyframes hanimBlurIn {
    from { opacity: 0; filter: blur(16px); transform: scale(1.08); }
    to   { opacity: 1; filter: blur(0px); transform: scale(1); }
}
@keyframes hanimBlurOut {
    from { opacity: 1; filter: blur(0px); transform: scale(1); }
    to   { opacity: 0; filter: blur(16px); transform: scale(0.94); }
}

/* 7) Mask Reveal */
.hanimtext-effect-mask {
    overflow: hidden;
}
.hanimtext-effect-mask .hanimtext-in {
    animation: hanimMaskRevealIn 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}
.hanimtext-effect-mask .hanimtext-out {
    animation: hanimMaskRevealOut 0.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}
@keyframes hanimMaskRevealIn {
    from { transform: translateY(115%); }
    to   { transform: translateY(0%); }
}
@keyframes hanimMaskRevealOut {
    from { transform: translateY(0%); }
    to   { transform: translateY(-115%); }
}

/* 8) Bounce Pop */
.hanimtext-effect-bounce .hanimtext-in {
    animation: hanimBounceIn 0.85s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}
.hanimtext-effect-bounce .hanimtext-out {
    animation: hanimBounceOut 0.4s ease-in forwards;
}
@keyframes hanimBounceIn {
    0%   { opacity: 0; transform: scale(0.3) translateY(40px); }
    50%  { opacity: 1; transform: scale(1.08) translateY(-8px); }
    70%  { transform: scale(0.96) translateY(4px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes hanimBounceOut {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.4) translateY(-30px); }
}

/* 9) Color Shift */
.hanimtext-effect-colorshift .hanimtext-in {
    animation: hanimColorShiftIn 0.7s forwards ease, hanimColorShiftLoop 4s 0.7s infinite alternate ease-in-out;
}
.hanimtext-effect-colorshift .hanimtext-out {
    animation: hanimFadeOut 0.4s forwards ease;
}
@keyframes hanimColorShiftIn {
    from { opacity: 0; filter: hue-rotate(180deg); }
    to   { opacity: 1; filter: hue-rotate(0deg); }
}
@keyframes hanimColorShiftLoop {
    0%   { filter: hue-rotate(0deg) saturate(1); }
    50%  { filter: hue-rotate(90deg) saturate(1.5); }
    100% { filter: hue-rotate(240deg) saturate(2); }
}

/* 10) Animated Gradient */
.hanimtext-effect-gradient .hanimtext-runner {
    background-image: linear-gradient(120deg, #ec4899, #8b5cf6, #3b82f6, #10b981, #f59e0b, #ec4899);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hanimtext-effect-gradient .hanimtext-in {
    animation: hanimFadeIn 0.7s forwards ease, hanimGradientShift 6s ease infinite;
}
.hanimtext-effect-gradient .hanimtext-out {
    animation: hanimFadeOut 0.4s forwards ease;
}
@keyframes hanimGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 11) Neon Glow */
.hanimtext-effect-shadow .hanimtext-in {
    animation: hanimShadowGlow 2s infinite alternate ease-in-out, hanimFadeIn 0.6s forwards;
}
.hanimtext-effect-shadow .hanimtext-out {
    animation: hanimFadeOut 0.4s forwards;
}
@keyframes hanimShadowGlow {
    from { text-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
    to   { text-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 50px currentColor; }
}

/* 12) Neon Flicker */
.hanimtext-effect-neonflicker .hanimtext-in {
    animation: hanimNeonFlicker 2.5s infinite;
}
.hanimtext-effect-neonflicker .hanimtext-out {
    animation: hanimFadeOut 0.3s forwards;
}
@keyframes hanimNeonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px currentColor, 0 0 25px currentColor;
    }
    20%, 24%, 55% {
        opacity: 0.3;
        text-shadow: none;
    }
}

/* 13) Shimmer Sweep */
.hanimtext-effect-shimmer .hanimtext-runner {
    background: linear-gradient(90deg, currentColor 0%, #ffffff 50%, currentColor 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hanimtext-effect-shimmer .hanimtext-in {
    animation: hanimShimmerSweep 2.5s linear infinite;
}
.hanimtext-effect-shimmer .hanimtext-out {
    animation: hanimFadeOut 0.4s forwards;
}
@keyframes hanimShimmerSweep {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* 14) Wave / Skew */
.hanimtext-char {
    display: inline-block;
    will-change: transform, opacity;
}
.hanimtext-effect-wave .hanimtext-char-in {
    animation: hanimCharWaveIn 0.7s forwards cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hanimtext-effect-wave .hanimtext-char-out {
    animation: hanimCharWaveOut 0.4s forwards ease-in;
}
@keyframes hanimCharWaveIn {
    0%   { opacity: 0; transform: translateY(30px) skewY(20deg) scale(0.6); }
    100% { opacity: 1; transform: translateY(0) skewY(0deg) scale(1); }
}
@keyframes hanimCharWaveOut {
    0%   { opacity: 1; transform: translateY(0) skewY(0deg) scale(1); }
    100% { opacity: 0; transform: translateY(-25px) skewY(-15deg) scale(0.7); }
}

/* 15) Cyber Glitch */
.hanimtext-effect-glitch .hanimtext-in {
    position: relative;
    animation: hanimGlitchAnim 1.8s infinite;
}
.hanimtext-effect-glitch .hanimtext-out {
    animation: hanimFadeOut 0.3s forwards;
}
@keyframes hanimGlitchAnim {
    0% {
        transform: translate(0);
        text-shadow: -2px 0 #00ffff, 2px 0 #ff00ff;
    }
    20% {
        transform: translate(-3px, 2px);
        text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff;
    }
    40% {
        transform: translate(2px, -2px);
        text-shadow: -1px 0 #00ffff, 1px 0 #ff00ff;
    }
    60% {
        transform: translate(-1px, 1px);
        text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff;
    }
    80% {
        transform: translate(0);
        text-shadow: none;
    }
    100% {
        transform: translate(0);
        text-shadow: -2px 0 #00ffff, 2px 0 #ff00ff;
    }
}

/* 16) Smoke Dissolve */
.hanimtext-effect-smoke .hanimtext-in {
    animation: hanimSmokeIn 0.8s ease-out forwards;
}
.hanimtext-effect-smoke .hanimtext-out {
    animation: hanimSmokeOut 0.6s ease-in forwards;
}
@keyframes hanimSmokeIn {
    0%   { opacity: 0; filter: blur(20px); transform: translateY(-20px) scale(1.1); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}
@keyframes hanimSmokeOut {
    0%   { opacity: 1; filter: blur(0); transform: scale(1); }
    100% { opacity: 0; filter: blur(25px); transform: translateY(-30px) scale(1.25); }
}

/* 17) 3D Flip X */
.hanimtext-effect-3d {
    perspective: 800px;
}
.hanimtext-effect-3d .hanimtext-in {
    animation: hanim3dFlipIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transform-origin: 50% 50% -40px;
}
.hanimtext-effect-3d .hanimtext-out {
    animation: hanim3dFlipOut 0.5s ease forwards;
    transform-origin: 50% 50% -40px;
}
@keyframes hanim3dFlipIn {
    0%   { opacity: 0; transform: rotateX(-90deg) translateZ(20px); }
    100% { opacity: 1; transform: rotateX(0deg) translateZ(0); }
}
@keyframes hanim3dFlipOut {
    0%   { opacity: 1; transform: rotateX(0deg) translateZ(0); }
    100% { opacity: 0; transform: rotateX(90deg) translateZ(20px); }
}

/* 18) Coin Flip Y */
.hanimtext-effect-flipy {
    perspective: 800px;
}
.hanimtext-effect-flipy .hanimtext-in {
    animation: hanimFlipYIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hanimtext-effect-flipy .hanimtext-out {
    animation: hanimFlipYOut 0.45s ease-in forwards;
}
@keyframes hanimFlipYIn {
    0%   { opacity: 0; transform: rotateY(-90deg) scale(0.8); }
    100% { opacity: 1; transform: rotateY(0deg) scale(1); }
}
@keyframes hanimFlipYOut {
    0%   { opacity: 1; transform: rotateY(0deg) scale(1); }
    100% { opacity: 0; transform: rotateY(90deg) scale(0.8); }
}