
.glitch-text {
    font-size: 25px;
    position: relative;
    color: white;
    animation: flicker 2s infinite;
    display: flex;
    align-items: center;
    gap: 15px;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    overflow: hidden;
    color: #0dcaf0;
    z-index: -1;
}

.glitch-text::before {
    animation: glitchTop 2s infinite linear;
}

.glitch-text::after {
    animation: glitchBottom 2s infinite linear;
}

@keyframes glitchTop {
    0% { clip-path: inset(0 0 80% 0); transform: translate(-2px, -2px); }
    20% { clip-path: inset(0 0 30% 0); transform: translate(2px, 1px); }
    40% { clip-path: inset(0 0 50% 0); transform: translate(-1px, 0); }
    60% { clip-path: inset(0 0 10% 0); transform: translate(1px, -1px); }
    80% { clip-path: inset(0 0 60% 0); transform: translate(-2px, 2px); }
    100% { clip-path: inset(0 0 80% 0); transform: translate(0, 0); }
}

@keyframes glitchBottom {
    0% { clip-path: inset(80% 0 0 0); transform: translate(2px, 2px); }
    20% { clip-path: inset(30% 0 0 0); transform: translate(-1px, -1px); }
    40% { clip-path: inset(50% 0 0 0); transform: translate(1px, 0); }
    60% { clip-path: inset(10% 0 0 0); transform: translate(-2px, 1px); }
    80% { clip-path: inset(60% 0 0 0); transform: translate(1px, -2px); }
    100% { clip-path: inset(80% 0 0 0); transform: translate(0, 0); }
}

@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
    }
    20%, 22%, 24%, 55% {
        opacity: 0.4;
    }
}

.speaker-wrapper {
    width: 90px;
    height: auto;
    /* Optional z-index falls nötig */
    position: relative;
}

.festival-speaker {
    width: 90px;
    height: auto;
    animation: speakerShake 0.5s infinite ease-in-out,
    speakerPulse 1s infinite ease-in-out;
    transform-origin: center bottom;
}

/* Basswellen Basis */
.bass-wave {
    fill: none;
    stroke: #0dcaf0;
    stroke-width: 3;
    opacity: 0.5;
    animation: bassPulse 0.3s infinite ease-out;
    transform-origin: 145px 130px;
}

/* Basswellen animieren schnell und staffeln */
/* 15 Wellen in Dauerschleife ca. 2+ Wellen pro Sekunde = ~130 Wellen/min */
.bass-wave:nth-child(12) { animation-delay: 0s; }
.bass-wave:nth-child(13) { animation-delay: 0.02s; }
.bass-wave:nth-child(14) { animation-delay: 0.04s; }
.bass-wave:nth-child(15) { animation-delay: 0.06s; }
.bass-wave:nth-child(16) { animation-delay: 0.08s; }
.bass-wave:nth-child(17) { animation-delay: 0.10s; }
.bass-wave:nth-child(18) { animation-delay: 0.12s; }
.bass-wave:nth-child(19) { animation-delay: 0.14s; }
.bass-wave:nth-child(20) { animation-delay: 0.16s; }
.bass-wave:nth-child(21) { animation-delay: 0.18s; }
.bass-wave:nth-child(22) { animation-delay: 0.20s; }
.bass-wave:nth-child(23) { animation-delay: 0.22s; }
.bass-wave:nth-child(24) { animation-delay: 0.24s; }
.bass-wave:nth-child(25) { animation-delay: 0.26s; }
.bass-wave:nth-child(26) { animation-delay: 0.28s; }

@keyframes bassPulse {
    0% {
        r: 14;
        opacity: 0.5;
        transform: translateX(0);
    }
    70% {
        r: 40;
        opacity: 0;
        transform: translateX(85px);
    }
    100% {
        r: 14;
        opacity: 0;
        transform: translateX(85px);
    }
}

@keyframes speakerShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(6px) rotate(5deg); }
    50% { transform: translateX(-6px) rotate(-5deg); }
    75% { transform: translateX(5px) rotate(4deg); }
}

@keyframes speakerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
