/* Quiz Animations CSS */

/* Animation Overlay */
.animation-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.animation-content {
    text-align: center;
    color: white;
    animation: zoomInOut 2s ease-in-out;
    position: relative;
}

/* Animation backgrounds */
.correct-animation {
    background: radial-gradient(
        circle,
        rgba(0, 255, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.wrong-animation {
    background: radial-gradient(
        circle,
        rgba(255, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.skip-animation {
    background: radial-gradient(
        circle,
        rgba(255, 165, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.buzzer-animation {
    background: radial-gradient(
        circle,
        rgba(0, 100, 255, 0.5) 0%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

/* Animation icon */
.animation-icon {
    font-size: 120px;
    margin-bottom: 20px;
    animation: pulse 1.5s ease-in-out;
    text-shadow: 0 0 20px currentColor;
}

.animation-text {
    font-size: 96px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.animation-song-info {
    font-size: 48px;
    margin-top: 20px;
    opacity: 0.9;
}

/* Cover preview */
.cover-preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 10000;
    background: linear-gradient(
        145deg,
        rgba(20, 20, 20, 0.95),
        rgba(40, 40, 40, 0.95)
    );
    padding: 30px;
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(255, 255, 255, 0.1);
}

.cover-preview img {
    max-width: 600px;
    max-height: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.cover-preview .song-details {
    text-align: center;
    color: white;
    margin-top: 25px;
    font-size: 52px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

/* Keyframe animations */
@keyframes zoomInOut {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.3);
    }
    75% {
        transform: scale(1.2);
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-15px);
    }
    20%,
    40%,
    60%,
    80% {
        transform: translateX(15px);
    }
}

.wrong-animation .animation-content {
    animation:
        shake 0.6s ease-in-out,
        zoomInOut 2s ease-in-out;
}

/* Fade animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-out {
    animation: fadeOutCenter 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes fadeOutCenter {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Success animation variant */
@keyframes successBounce {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.correct-animation .animation-icon {
    animation: successBounce 0.6s ease-out;
}

/* Error animation variant */
@keyframes errorShake {
    0%,
    100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

.wrong-animation .animation-icon {
    animation: errorShake 0.4s ease-in-out 3;
}

/* Skip animation variant */
@keyframes skipSlide {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.skip-animation .animation-icon {
    animation: skipSlide 0.5s ease-out;
}

/* Buzzer animation variant */
@keyframes buzzerFlash {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    25% {
        transform: scale(1.3);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    75% {
        transform: scale(1.2);
        opacity: 0.9;
    }
}

.buzzer-animation .animation-icon {
    animation: buzzerFlash 0.8s ease-in-out 2;
    color: #0064ff;
    text-shadow: 0 0 30px rgba(0, 100, 255, 0.8);
}

.buzzer-animation .animation-text {
    color: #00aaff;
    text-shadow:
        0 0 20px rgba(0, 170, 255, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 5px;
    font-size: 110px;
}

/* Joker animation styles */
.joker-animation .animation-content {
    animation:
        jokerSpin 2s ease-in-out,
        zoomInOut 2s ease-in-out;
}

.joker-animation .animation-icon {
    animation: jokerPulse 2s ease-in-out;
    color: #9b59b6;
    text-shadow:
        0 0 30px rgba(155, 89, 182, 1),
        0 0 60px rgba(155, 89, 182, 0.8);
    font-size: 150px;
}

.joker-animation .animation-text {
    color: #b666d2;
    text-shadow:
        0 0 25px rgba(155, 89, 182, 1),
        3px 3px 6px rgba(0, 0, 0, 0.5);
    letter-spacing: 8px;
    font-size: 120px;
    animation: jokerTextGlow 2s ease-in-out;
}

.joker-animation .animation-song-info {
    color: #d4a5e5;
    font-size: 56px;
    margin-top: 20px;
    text-shadow:
        0 0 15px rgba(155, 89, 182, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

@keyframes jokerSpin {
    0% {
        transform: rotate(0deg) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

@keyframes jokerPulse {
    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
    25% {
        transform: scale(1.2);
        filter: brightness(1.3) drop-shadow(0 0 40px rgba(155, 89, 182, 1));
    }
    50% {
        transform: scale(1.3);
        filter: brightness(1.5) drop-shadow(0 0 60px rgba(155, 89, 182, 1));
    }
    75% {
        transform: scale(1.2);
        filter: brightness(1.3) drop-shadow(0 0 40px rgba(155, 89, 182, 1));
    }
}

@keyframes jokerTextGlow {
    0%,
    100% {
        opacity: 0.8;
        letter-spacing: 8px;
    }
    50% {
        opacity: 1;
        letter-spacing: 12px;
        text-shadow:
            0 0 40px rgba(155, 89, 182, 1),
            0 0 80px rgba(155, 89, 182, 0.8),
            3px 3px 6px rgba(0, 0, 0, 0.7);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animation-icon {
        font-size: 80px;
    }

    .animation-text {
        font-size: 64px;
    }

    .animation-song-info {
        font-size: 38px;
    }

    .cover-preview img {
        max-width: 400px;
        max-height: 400px;
    }

    .cover-preview .song-details {
        font-size: 40px;
    }
}

/* Score update animation */
@keyframes scoreUpdate {
    0% {
        transform: scale(1);
        color: inherit;
    }
    50% {
        transform: scale(1.1);
        color: #4caf50;
        font-weight: bold;
    }
    100% {
        transform: scale(1);
        color: inherit;
    }
}

.score-updating {
    animation: scoreUpdate 0.4s ease-in-out;
    transition: all 0.3s ease;
}

/* Buzzer state transitions */
.player,
.playerbuzzed,
.playerblocked {
    transition: all 0.3s ease-in-out;
}

.playerbuzzed {
    animation: buzzerPulse 1s ease-in-out infinite;
}

@keyframes buzzerPulse {
    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
    }
}

/* Special Type Sticker Overlay */
.special-sticker-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    width: 500px;
    height: 120px;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 8000;
    font-family: "Bebas Neue", sans-serif;
    font-size: 144px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: white;
    text-shadow:
        3px 3px 6px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.5);
    padding: 20px 40px;
    border: 4px solid white;
    border-radius: 15px;
    animation: stickerAppear 0.5s ease-out forwards;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 255, 255, 0.2);
}

/* Special type specific colors */
.special-sticker-instrumental {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #5dade2;
}

.special-sticker-sonderpreis {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    border-color: #f4d03f;
    animation:
        stickerAppear 0.5s ease-out forwards,
        sonderpreisGlow 2s ease-in-out infinite;
}

.special-sticker-shorty {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #ec7063;
}

.special-sticker-cover {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-color: #bb8fce;
}

@keyframes stickerAppear {
    0% {
        transform: translate(-50%, -50%) rotate(-25deg) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) rotate(-25deg) scale(1.1);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) rotate(-25deg) scale(1);
        opacity: 1;
    }
}

@keyframes stickerDisappear {
    0% {
        transform: translate(-50%, -50%) rotate(-25deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(-25deg) scale(0.8);
        opacity: 0;
    }
}

@keyframes sonderpreisGlow {
    0%,
    100% {
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.6),
            0 0 60px rgba(255, 255, 255, 0.2),
            0 0 80px rgba(241, 196, 15, 0.4);
    }
    50% {
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.6),
            0 0 60px rgba(255, 255, 255, 0.4),
            0 0 120px rgba(241, 196, 15, 0.8);
    }
}

/* Responsive adjustments for special sticker */
@media (max-width: 768px) {
    .special-sticker-overlay {
        width: 350px;
        height: 100px;
        font-size: 112px;
        padding: 15px 30px;
    }
}

/* Round Change Animation */
.round-change-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.95) 50%,
        rgba(0, 0, 0, 0.98) 100%
    );
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: hidden;
}

.round-change-content {
    text-align: center;
    color: white;
    animation: roundChangeZoom 1.5s ease-out;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Apply fade to center animation to content */
.round-change-overlay[style*="roundChangeFadeOutCenter"] .round-change-content {
    animation: contentFadeToCenter 0.5s ease-out forwards;
}

@keyframes contentFadeToCenter {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.3);
        opacity: 0;
    }
}

.round-change-name {
    font-size: 150px;
    font-weight: bold;
    text-transform: uppercase;
    color: #00ff88;
    text-shadow:
        0 0 40px rgba(0, 255, 136, 0.8),
        0 0 80px rgba(0, 255, 136, 0.5),
        4px 4px 8px rgba(0, 0, 0, 0.8);
    animation:
        roundNameEntrance 1.5s ease-out,
        roundNameWave 3s ease-in-out 1.5s 2,
        roundNameGlow 1s ease-in-out 1.5s infinite alternate;
    letter-spacing: 12px;
    line-height: 1.2;
    padding: 40px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Player names container */
.round-change-players {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Disable CSS-controlled container animation so JS controls per-player reveal */
    opacity: 1;
    animation: none;
}

.player-name {
    font-size: 60px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    /* Start hidden; JS will set opacity to 1 when revealing */
    opacity: 0;
    transform: translateY(0); /* start at final position (no vertical movement) */
    transition: opacity 260ms ease-in, transform 260ms ease-in;
}

/* Remove built-in per-player keyframe animations so JS controls appearance and position */
.player-1,
.player-2,
.player-3,
.player-4,
.player-5 {
    animation: none !important;
}

/* Keep a simple container fade keyframe (unused for player positioning) */
@keyframes playersContainerFadeIn {
    to {
        opacity: 1;
    }
}

/* Round change background effects */
.round-change-overlay::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 255, 136, 0.05) 10px,
        rgba(0, 255, 136, 0.05) 20px
    );
    animation:
        roundChangeStripes 20s linear infinite,
        stripesIntensity 5s ease-in-out;
}

@keyframes stripesIntensity {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.round-change-overlay::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        transparent 0%,
        transparent 40%,
        rgba(0, 255, 136, 0.1) 50%,
        transparent 60%
    );
    animation:
        roundChangeRipple 2s ease-out 5,
        roundChangeRippleSlow 3s ease-out 5s infinite;
}

@keyframes roundChangeRippleSlow {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 0.2;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

@keyframes roundChangeZoom {
    0% {
        transform: scale(0.3) rotate(-5deg);
        opacity: 0;
    }
    25% {
        transform: scale(1.1) rotate(2deg);
    }
    50% {
        transform: scale(0.95) rotate(-1deg);
    }
    75% {
        transform: scale(1.02) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes roundNumberPulse {
    0% {
        transform: scale(0) rotate(-360deg);
        opacity: 0;
    }
    40% {
        transform: scale(1.3) rotate(10deg);
        opacity: 1;
    }
    60% {
        transform: scale(0.9) rotate(-5deg);
    }
    80% {
        transform: scale(1.1) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes numberGlow {
    0%, 100% {
        transform: scale(1);
        filter: brightness

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes roundChangeStripes {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes roundChangeRipple {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes roundChangeFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes roundChangeFadeOutCenter {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes roundNameWave {
    0%, 100% {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    }
    10% {
        transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    }
    20% {
        transform: perspective(1000px) rotateY(5deg) rotateX(-2deg);
    }
    30% {
        transform: perspective(1000px) rotateY(-4deg) rotateX(1.5deg);
    }
    40% {
        transform: perspective(1000px) rotateY(4deg) rotateX(-1.5deg);
    }
    50% {
        transform: perspective(1000px) rotateY(-3deg) rotateX(1deg);
    }
    60% {
        transform: perspective(1000px) rotateY(3deg) rotateX(-1deg);
    }
    70% {
        transform: perspective(1000px) rotateY(-2deg) rotateX(0.5deg);
    }
    80% {
        transform: perspective(1000px) rotateY(2deg) rotateX(-0.5deg);
    }
    90% {
        transform: perspective(1000px) rotateY(-1deg) rotateX(0.3deg);
    }
}

@keyframes roundNameEntrance {
    0% {
        transform: scale(0) rotateY(180deg);
        opacity: 0;
        letter-spacing: 50px;
    }
    50% {
        transform: scale(1.2) rotateY(90deg);
        opacity: 0.7;
        letter-spacing: 20px;
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
        letter-spacing: 8px;
    }
}

/* Falling letters animation for scoreboard dissolution */
@keyframes fallDown {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Pause Animation Overlay */
.pause-animation-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: radial-gradient(circle at center, rgba(25, 25, 30, 0.98) 0%, rgba(0, 0, 0, 1) 100%) !important;
    display: none;
    z-index: 99999 !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Removed the style attribute selector to prevent forced display */

.pause-animation-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 40px !important;
    width: 100% !important;
    height: 100vh !important;
    padding: 60px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.pause-text {
    font-size: 400px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    color: #ff69b4 !important;
    text-shadow:
        0 0 40px currentColor,
        0 0 80px currentColor,
        0 0 120px currentColor,
        4px 4px 8px rgba(0, 0, 0, 0.8) !important;
    animation:
        pauseZoom 1.5s ease-out,
        pausePulse 2s ease-in-out 1.5s infinite,
        pauseColorChange 4s ease-in-out infinite;
    letter-spacing: 20px !important;
    margin: 0 !important;
    text-align: center !important;
    display: block !important;
}

.pause-subtitle {
    font-size: 48px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 20px 0 !important;
    font-style: italic !important;
    font-family: 'Dancing Script', 'Brush Script MT', 'Lucida Handwriting', 'Comic Sans MS', cursive !important;
    font-weight: 400 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
    text-align: center !important;
    display: block !important;
}

.pause-beer-icons {
    font-size: 100px !important;
    margin: 20px 0 !important;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5)) !important;
    text-align: center !important;
    display: block !important;
}

.pause-song-marquee {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 120px !important;
    overflow: hidden !important;
    background: rgba(0, 0, 0, 0.9) !important;
    border-top: 3px solid rgba(255, 255, 255, 0.3) !important;
    display: flex !important;
    align-items: center !important;
}

.marquee-content {
    display: inline-flex !important;
    white-space: nowrap !important;
    font-size: 56px !important;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    line-height: 120px !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    font-weight: 500 !important;
    animation: marqueeScroll 30s linear infinite;
    padding-left: 100% !important;
}

.marquee-content span {
    padding: 0 100px;
}

/* Additional keyframe animations for pause screen */
@keyframes pauseColorChange {
    0%, 100% { color: #ff69b4; }
    25% { color: #00ff88; }
    50% { color: #00aaff; }
    75% { color: #ffd700; }
}

@keyframes beerBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-15px) scale(1.1) rotate(-8deg); }
    50% { transform: translateY(0) scale(1); }
    75% { transform: translateY(-15px) scale(1.1) rotate(8deg); }
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Pause animation keyframes */
@keyframes pauseZoom {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(90deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes pauseTextEntrance {
    0% {
        transform: scale(0) rotateX(180deg);
        opacity: 0;
        letter-spacing: 100px;
    }
    50% {
        transform: scale(1.2) rotateX(90deg);
        opacity: 0.7;
        letter-spacing: 40px;
    }
    100% {
        transform: scale(1) rotateX(0deg);
        opacity: 1;
        letter-spacing: 20px;
    }
}

@keyframes pausePulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.3) drop-shadow(0 0 50px rgba(255, 105, 180, 1));
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pauseFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* Pause overlay background animation */
.pause-animation-overlay::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(255, 255, 255, 0.02) 20px,
        rgba(255, 255, 255, 0.02) 40px
    );
    animation: pauseStripes 30s linear infinite;
}

@keyframes pauseStripes {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments for pause animation */
@media (max-width: 768px) {
    .pause-animation-content {
        padding: 40px 20px;
    }

    .pause-text {
        font-size: 200px;
        letter-spacing: 14px;
    }

    .pause-subtitle {
        font-size: 28px;
    }

    .pause-beer-icons {
        font-size: 70px;
    }

    .marquee-content {
        font-size: 36px;
        line-height: 80px;
    }

    .pause-song-marquee {
        bottom: 0;
        height: 80px;
    }
}

@keyframes roundNamePulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    25% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
    75% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

@keyframes roundNameGlow {
    0% {
        text-shadow:
            0 0 40px rgba(0, 255, 136, 0.8),
            0 0 80px rgba(0, 255, 136, 0.5),
            4px 4px 8px rgba(0, 0, 0, 0.8);
    }
    100% {
        text-shadow:
            0 0 60px rgba(0, 255, 136, 1),
            0 0 120px rgba(0, 255, 136, 0.8),
            0 0 180px rgba(0, 255, 136, 0.4),
            4px 4px 12px rgba(0, 0, 0, 0.9);
    }
}

/* Particle effects for intense phase */
.round-change-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
}

.round-change-intense .round-change-particles {
    opacity: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.round-change-intense .particle {
    animation: particleFloat 3s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; top: 80%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; top: 85%; animation-delay: 0.3s; }
.particle:nth-child(3) { left: 35%; top: 75%; animation-delay: 0.6s; }
.particle:nth-child(4) { left: 50%; top: 90%; animation-delay: 0.9s; }
.particle:nth-child(5) { left: 65%; top: 80%; animation-delay: 1.2s; }
.particle:nth-child(6) { left: 75%; top: 85%; animation-delay: 1.5s; }
.particle:nth-child(7) { left: 85%; top: 75%; animation-delay: 1.8s; }
.particle:nth-child(8) { left: 95%; top: 88%; animation-delay: 2.1s; }

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        transform: translateY(-800px) translateX(100px) scale(0.5);
        opacity: 0;
    }
}

/* Light beam effects */
.round-change-beams {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
}

.round-change-intense .round-change-beams {
    opacity: 0.6;
}

.beam {
    position: absolute;
    width: 2px;
    height: 200%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 255, 136, 0.8) 50%,
        transparent 100%
    );
    transform-origin: top center;
}

.round-change-intense .beam {
    animation: beamSweep 2s ease-in-out infinite;
}

.beam-1 {
    left: 20%;
    animation-delay: 0s;
}

.beam-2 {
    left: 40%;
    animation-delay: 0.5s;
}

.beam-3 {
    left: 60%;
    animation-delay: 1s;
}

.beam-4 {
    left: 80%;
    animation-delay: 1.5s;
}

@keyframes beamSweep {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100%) rotate(15deg);
        opacity: 0;
    }
}

/* Enhance name animation during intense phase */
.round-change-intense .round-change-name {
    animation:
        roundNameEntrance 1.5s ease-out,
        roundNameWave 3s ease-in-out 1.5s 2,
        roundNameGlow 0.5s ease-in-out 1.5s infinite alternate,
        intenseShake 0.1s ease-in-out 3s 20;
}

@keyframes intenseShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px) rotateZ(-0.5deg); }
    75% { transform: translateX(2px) rotateZ(0.5deg); }
}

/* Special round variations */
.round-change-bonus .round-change-name {
    color: #ffd700;
    text-shadow:
        0 0 40px rgba(255, 215, 0, 0.8),
        0 0 80px rgba(255, 215, 0, 0.5),
        4px 4px 8px rgba(0, 0, 0, 0.8);
    animation:
        roundNameEntrance 1.5s ease-out,
        roundNameWave 3s ease-in-out 1.5s 2,
        roundNameGlow 1s ease-in-out 1.5s infinite alternate,
        bonusSparkle 0.5s ease-in-out 7s 6;
}

/* Bonus round player names */
.round-change-bonus .player-name {
    color: #ffd700;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes bonusSparkle {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 40px rgba(255, 215, 0, 0.8));
    }
    50% {
        filter: brightness(1.5) drop-shadow(0 0 80px rgba(255, 215, 0, 1));
    }
}

.round-change-bonus::before {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 215, 0, 0.05) 10px,
        rgba(255, 215, 0, 0.05) 20px
    );
}

.round-change-bonus::after {
    background: radial-gradient(
        circle,
        transparent 0%,
        transparent 40%,
        rgba(255, 215, 0, 0.1) 50%,
        transparent 60%
    );
}

/* Bonus round particle effects */
.round-change-bonus .particle {
    background: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.round-change-bonus .beam {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 215, 0, 0.8) 50%,
        transparent 100%
    );
}

/* Responsive adjustments for round change */
@media (max-width: 768px) {
    .round-change-name {
        font-size: 80px;
        padding: 20px;
        letter-spacing: 8px;
    }

    .player-name {
        font-size: 40px;
    }

    .round-change-players {
        gap: 10px;
    }
}

/* Full-screen achievement overlay variant (replace or add alongside the original .achievement-popup rules) */
.achievement-popup.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200000;
    padding: 0;
    border-radius: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.06), rgba(0,0,0,0.85) 40%), linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.85));
    backdrop-filter: blur(6px);
}

/* Ensure content still centers nicely */
.achievement-popup.fullscreen .achievement-content {
    padding: 40px;
    max-width: 1200px;
    width: 90%;
    box-sizing: border-box;
    background: transparent;
}

/* Keep variant colors on icon/title as before; full-screen just provides a dramatic backdrop */
/* Achievement popup styled to match correct/wrong overlay but with silver/gold variants */
.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    padding: 22px 30px;
    border-radius: 18px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(255, 255, 255, 0.03);
    color: #111;
    overflow: hidden;
    text-align: left;
    transform-origin: center center;
    animation: achievementPop 0.6s ease-out;
}

/* content layout inside achievement */
.achievement-content {
    display: flex;
    gap: 18px;
    align-items: center;
    width: 100%;
}

/* icon */
.achievement-icon {
    font-size: 140px;
    line-height: 1;
    width: 180px;
    text-align: center;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.6));
}

/* text */
.achievement-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.achievement-title {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.achievement-sub {
    font-size: 36px;
    opacity: 0.9;
}

/* silver / gold variants */
.achievement-popup.silver {
    background: radial-gradient(circle at 30% 20%, #f6f7f8 0%, #cfcfcf 40%, #9f9f9f 100%);
    border: 2px solid rgba(255,255,255,0.6);
    color: #0b0b0b;
}
.achievement-popup.silver .achievement-icon {
    color: #c0c0c0;
    text-shadow:
        0 0 28px rgba(192,192,192,0.35),
        0 0 8px rgba(255,255,255,0.2);
}
.achievement-popup.silver .achievement-title {
    color: #222;
    text-shadow: 0 3px 10px rgba(255,255,255,0.08);
}

/* gold */
.achievement-popup.gold {
    background: radial-gradient(circle at 30% 20%, #fff6d6 0%, #ffd966 40%, #e1a300 100%);
    border: 2px solid rgba(255,255,255,0.7);
    color: #111;
}
.achievement-popup.gold .achievement-icon {
    color: #ffdd55;
    text-shadow:
        0 0 30px rgba(255,215,0,0.5),
        0 0 8px rgba(255,255,255,0.2);
}
.achievement-popup.gold .achievement-title {
    color: #2a1600;
    text-shadow: 0 3px 10px rgba(255, 240, 200, 0.08);
}

/* show / hide helpers to match other animations */
.achievement-popup.show {
    display: flex;
    animation: achievementPop 0.55s cubic-bezier(.2,.9,.3,1);
    opacity: 1;
}
.achievement-popup.hide {
    animation: achievementFadeOut 0.35s ease-out forwards;
}

/* subtle pop + settle animation */
@keyframes achievementPop {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes achievementFadeOut {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }
}

.achievement-bronze-animation .animation-content { /* mimic silver/gold style but bronze tint */
  border-color: #b87333;
}


.achievement-silver-animation {
    background: radial-gradient(
        circle,
        rgba(230, 230, 235, 0.7) 0%,
        rgba(130, 130, 140, 0.28) 45%,
        rgba(40, 40, 45, 0.95) 100%
    );
}
.achievement-gold-animation {
    background: radial-gradient(
        circle,
        rgba(255, 245, 200, 0.85) 0%,
        rgba(255, 205, 80, 0.45) 45%,
        rgba(40, 30, 10, 0.95) 100%
    );
}

/* Icon color treatments */
.achievement-silver-animation .animation-icon {
    color: #d1d5db; /* silvery */
    text-shadow:
        0 0 36px rgba(209,213,219,0.35),
        0 0 10px rgba(255,255,255,0.08);
    animation: successBounce 0.6s ease-out;
}
.achievement-gold-animation .animation-icon {
    color: #ffd966; /* gold */
    text-shadow:
        0 0 44px rgba(255,217,102,0.5),
        0 0 12px rgba(255,255,255,0.08);
    animation: successBounce 0.6s ease-out;
}

/* text color tweaks */
.achievement-silver-animation .animation-text {
    color: #0b0b0b;
    text-shadow: 0 3px 12px rgba(255,255,255,0.06);
}
.achievement-gold-animation .animation-text {
    color: #2a1600;
    text-shadow: 0 3px 12px rgba(255,240,200,0.06);
}

/* Keep the same animation-content rules as correct so behavior is identical */
.achievement-silver-animation .animation-content,
.achievement-gold-animation .animation-content {
    animation: zoomInOut 2s ease-in-out;
}
/* responsive */
@media (max-width: 768px) {
    .achievement-icon { font-size: 86px; width: 120px; }
    .achievement-title { font-size: 34px; }
    .achievement-sub { font-size: 20px; }
    .achievement-popup { padding: 16px; border-radius: 14px; }
}
