.qmx-announcement-ticker {
    width: 100%;
    box-sizing: border-box;
    background: var(--qmx-ticker-bg, #fff7f7);
    color: var(--qmx-ticker-text, #24324a);
    border-top: 1px solid rgba(255, 107, 107, 0.2);
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    z-index: 20;
}

.qmx-announcement-ticker,
.qmx-announcement-ticker * {
    box-sizing: border-box;
}

.qmx-announcement-ticker__inner {
    width: min(1200px, calc(100% - 32px));
    min-height: 44px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.qmx-announcement-ticker__label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--qmx-ticker-accent, #ff6b6b);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.qmx-announcement-ticker__viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.qmx-announcement-ticker__track {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 36px;
    white-space: nowrap;
    animation: qmx-announcement-scroll var(--qmx-ticker-duration, 55s) linear infinite;
    will-change: transform;
}

.qmx-announcement-ticker:hover .qmx-announcement-ticker__track {
    animation-play-state: paused;
}

.qmx-announcement-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    font-weight: 700;
}

.qmx-announcement-ticker__item a {
    color: inherit;
    text-decoration: none;
}

.qmx-announcement-ticker__item a:hover {
    color: var(--qmx-ticker-accent, #ff6b6b);
    text-decoration: underline;
}

.qmx-announcement-ticker__text {
    color: var(--qmx-item-color, var(--qmx-ticker-text, #24324a));
    letter-spacing: 0;
    text-decoration: none;
}

.qmx-announcement-ticker__text:hover {
    color: var(--qmx-item-color, var(--qmx-ticker-accent, #ff6b6b));
}

.qmx-text-effect {
    position: relative;
    display: inline-block;
}

.qmx-text-effect--neon-pink {
    color: var(--qmx-item-color, #ff4f9a);
    text-shadow:
        0 0 5px rgba(255, 79, 154, 0.45),
        0 0 14px rgba(255, 79, 154, 0.4),
        0 0 24px rgba(255, 107, 107, 0.22);
}

.qmx-text-effect--gold-shine,
.qmx-text-effect--rainbow-flow,
.qmx-text-effect--aurora,
.qmx-text-effect--ice-blue,
.qmx-text-effect--fire-glow {
    color: var(--qmx-item-color, #24324a);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.qmx-text-effect--gold-shine {
    background-image: linear-gradient(100deg, #7b4a00 0%, #f6c453 24%, #fff5bd 40%, #d18b00 58%, #7b4a00 100%);
    background-size: 220% 100%;
    animation: qmx-text-shine 2.8s linear infinite;
    filter: drop-shadow(0 1px 4px rgba(222, 156, 22, 0.25));
}

.qmx-text-effect--rainbow-flow {
    background-image: linear-gradient(100deg, #ff3b6b, #ff9f1c, #ffe66d, #2ec4b6, #3a86ff, #8338ec, #ff3b6b);
    background-size: 260% 100%;
    animation: qmx-text-rainbow 4.5s linear infinite;
}

.qmx-text-effect--aurora {
    background-image: linear-gradient(100deg, #13d8b5, #70e000, #00b4d8, #9b5de5, #f15bb5, #13d8b5);
    background-size: 240% 100%;
    animation: qmx-text-aurora 5.2s ease-in-out infinite;
    filter: drop-shadow(0 0 7px rgba(0, 180, 216, 0.25));
}

.qmx-text-effect--ice-blue {
    background-image: linear-gradient(100deg, #0f4c81, #4cc9f0, #e0fbfc, #48cae4, #1d3557);
    background-size: 220% 100%;
    animation: qmx-text-shine 3.8s linear infinite;
    filter: drop-shadow(0 0 7px rgba(76, 201, 240, 0.25));
}

.qmx-text-effect--fire-glow {
    background-image: linear-gradient(100deg, #7f1d1d, #ef4444, #f97316, #fde047, #ef4444);
    background-size: 240% 100%;
    animation: qmx-text-fire 2.6s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.28));
}

.qmx-text-effect--soft-pulse {
    color: var(--qmx-item-color, var(--qmx-ticker-accent, #ff6b6b));
    animation: qmx-text-pulse 2.2s ease-in-out infinite;
    text-shadow: 0 0 0 rgba(255, 107, 107, 0);
}

.qmx-announcement-ticker__dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--qmx-ticker-accent, #ff6b6b);
    flex: 0 0 auto;
}

@keyframes qmx-announcement-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes qmx-text-shine {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 220% 50%;
    }
}

@keyframes qmx-text-rainbow {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 260% 50%;
    }
}

@keyframes qmx-text-aurora {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes qmx-text-fire {
    0%,
    100% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.2));
    }
    50% {
        background-position: 100% 50%;
        filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.42));
    }
}

@keyframes qmx-text-pulse {
    0%,
    100% {
        opacity: 0.86;
        text-shadow: 0 0 0 rgba(255, 107, 107, 0);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 12px rgba(255, 107, 107, 0.45);
    }
}

@media (max-width: 640px) {
    .qmx-announcement-ticker__inner {
        width: min(100% - 20px, 1200px);
        min-height: 40px;
        gap: 10px;
    }

    .qmx-announcement-ticker {
        font-size: 14px;
    }

    .qmx-announcement-ticker__label {
        padding: 3px 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qmx-announcement-ticker__track {
        animation: none;
        transform: none;
    }

    .qmx-text-effect {
        animation: none;
    }
}
