/* BACKGROUND ANIMATIONS CSS */

.bg-animal {
    position: fixed;
    pointer-events: none; /* Never interfere with clicks */
    z-index: 9999; /* Bring to front */
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.1));
}

.bg-animal i {
    font-size: 50px;
    filter: drop-shadow(2px 2px 0 #fff);
}

/* SMASH GAME UI - OPTIMIZED PRO EDITION */
.smash-score-board {
    margin-top: 10px;
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    border-radius: 20px;
    padding: 10px 15px; /* Reduced padding for fit */
    text-align: center;
    color: white;
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4), 
                inset 0 3px 0 rgba(255, 255, 255, 0.3);
    border: 3px solid #fff;
    animation: pulse-score-large 2s infinite alternate ease-in-out;
    position: relative;
    overflow: hidden;
}

.smash-score-board::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: rotate-shine 10s infinite linear;
    pointer-events: none;
}

.score-label {
    font-size: 14px; /* Slightly smaller for fit */
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    text-transform: uppercase;
}

#smash-score-value {
    font-size: 42px; /* Optimized giant size to prevent clipping */
    font-weight: 950;
    font-family: 'Outfit', 'Nunito', sans-serif;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
    line-height: 1.1;
    display: block;
}

@keyframes pulse-score-large {
    from { transform: scale(1) translateY(0); }
    to { transform: scale(1.05) translateY(-5px); }
}

@keyframes rotate-shine {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* MOBILE OPTIMIZATION for Score Board */
@media (max-width: 768px) {
    .smash-score-board {
        width: 100% !important; /* FILL THE WIDTH BELOW BUTTONS */
        height: 60px !important;
        margin-top: 5px !important;
        padding: 5px 20px !important;
        border-radius: 30px !important;
        display: flex !important;
        flex-direction: row !important; /* Horizontal layout for wide look */
        justify-content: space-between !important;
        align-items: center !important;
        box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4) !important;
        border: 3px solid #fff !important;
    }

    .score-label {
        font-size: 11px !important;
        letter-spacing: 1px !important;
        margin-bottom: 0 !important;
        opacity: 0.9;
    }

    #smash-score-value {
        font-size: 32px !important;
        text-shadow: 2px 2px 0 rgba(0,0,0,0.1) !important;
        margin-top: 0 !important;
    }
}

/* SMASH EFFECT 2.0 */
.smash-splash {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 80%);
    border: 4px solid #fff;
    border-radius: 50%;
    pointer-events: none;
    animation: smash-pop-rings 0.5s forwards cubic-bezier(0, 0, 0.2, 1);
    z-index: 10000;
}

@keyframes smash-pop-rings {
    0% { transform: scale(0.2); opacity: 1; border-width: 10px; }
    100% { transform: scale(3); opacity: 0; border-width: 1px; }
}

/* FLOATING SCORE POP */
.score-popup {
    position: absolute;
    font-size: 24px;
    font-weight: 950;
    color: #ffeb3b;
    text-shadow: 2px 2px 0 #333, -1px -1px 0 #333;
    pointer-events: none;
    z-index: 10001;
    animation: float-up-fade 0.8s forwards ease-out;
}

@keyframes float-up-fade {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-80px) scale(1.5); opacity: 0; }
}

.bg-animal {
    /* Custom Hammer Cursor */
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="%23ff9800" stroke="white" stroke-width="1.5"><path d="M19.5,2.5L14,8L16,10L21.5,4.5L19.5,2.5M13,9L8,14L10,16L15,11L13,9M4,18L2,20L4,22L6,20L4,18Z"/></svg>') 12 12, crosshair;
    pointer-events: auto !important; 
    transition: filter 0.2s;
}

.bg-animal:hover {
    filter: drop-shadow(0 0 10px #ffeb3b) brightness(1.2);
}

.bg-animal.shaking {
    animation: quick-shake 0.1s infinite;
}

@keyframes quick-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
}

.bg-animal.smashed {
    pointer-events: none;
    animation: squash-disappear 0.25s forwards cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

@keyframes squash-disappear {
    0% { transform: scale(1); }
    50% { transform: scale(1.4, 0.4); }
    100% { transform: scale(0); opacity: 0; }
}

/* MOVEMENT PATHS */

/* Horizontal */
@keyframes move-horiz {
    from { left: -150px; }
    to { left: 115vw; }
}
@keyframes move-horiz-rev {
    from { left: 115vw; }
    to { left: -150px; }
}

/* Vertical */
@keyframes move-vert {
    from { top: -150px; }
    to { top: 115vh; }
}
@keyframes move-vert-rev {
    from { top: 115vh; }
    to { top: -150px; }
}

/* Diagonal / Anywhere */
@keyframes move-any {
    0% { top: -100px; left: -100px; }
    100% { top: 110vh; left: 110vw; }
}
@keyframes move-any-rev {
    0% { top: 110vh; left: 110vw; }
    100% { top: -100px; left: -100px; }
}

/* Base Movement Classes */
.path-horiz { animation: move-horiz linear forwards; }
.path-horiz-rev { animation: move-horiz-rev linear forwards; }
.path-vert { animation: move-vert linear forwards; }
.path-vert-rev { animation: move-vert-rev linear forwards; }
.path-any { animation: move-any linear forwards; }
.path-any-rev { animation: move-any-rev linear forwards; }


/* BODY ANIMATIONS (WIGGLES) */
.snake-body {
    animation: slither 1.5s infinite ease-in-out;
}
@keyframes slither {
    0%, 100% { transform: translateY(0) rotate(5deg); }
    50% { transform: translateY(15px) rotate(-5deg); }
}

.elephant-body {
    animation: heavy-walk 2s infinite ease-in-out;
}
@keyframes heavy-walk {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-8px) rotate(2deg); }
    75% { transform: translateY(-8px) rotate(-2deg); }
}

.bird-body {
    animation: flapping 0.4s infinite alternate ease-in-out;
}
@keyframes flapping {
    from { transform: scaleY(0.7) rotate(-5deg); }
    to { transform: scaleY(1.1) rotate(5deg); }
}

.direction-flipper {
    transition: transform 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}
