:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --text-color: #2c3e50;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Fredoka One', cursive, sans-serif;
    background: var(--bg-gradient);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    overscroll-behavior: none;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Background decorations */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    z-index: 0;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: #FF9A9E;
    top: -50px;
    left: -50px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background: #A18CD1;
    bottom: 50px;
    right: -20px;
}

.circle-3 {
    width: 150px;
    height: 150px;
    background: #FBC2EB;
    top: 40%;
    left: 10%;
}

/* Animal Stage */
#animal-stage {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 60%;
}

#animal {
    font-size: 300px;
    cursor: pointer;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    /* Hit area expansion */
    padding: 40px;
    border-radius: 50%;
}

#animal:active {
    transform: scale(0.95);
}

.animal-emoji {
    display: block;
    line-height: 1;
}

/* Feedback Text */
#feedback-text {
    height: 50px;
    margin-top: 60px;
    font-size: 32px;
    color: var(--text-color);
    text-shadow: 2px 2px 0px white;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: bold;
}

/* Instruction */
.instruction {
    position: absolute;
    bottom: 50px;
    font-size: 24px;
    color: #555;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 30px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: bounce 2s infinite;
    z-index: 10;
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes jump {
    0% {
        transform: scale(1) translateY(0);
    }

    40% {
        transform: scale(1.1, 0.9) translateY(10px);
    }

    60% {
        transform: scale(0.9, 1.1) translateY(-50px);
    }

    80% {
        transform: scale(1.05, 0.95) translateY(0);
    }

    100% {
        transform: scale(1) translateY(0);
    }
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    50% {
        transform: rotate(15deg);
    }

    75% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes rotate90 {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes wobble {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(20deg);
    }

    50% {
        transform: rotate(-20deg);
    }

    75% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes specialSpin {
    0% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }

    25% {
        transform: scale(1.3) rotate(90deg);
        filter: drop-shadow(0 0 30px red);
    }

    50% {
        transform: scale(1.5) rotate(180deg);
        filter: drop-shadow(0 0 50px yellow) brightness(1.2);
    }

    75% {
        transform: scale(1.3) rotate(270deg);
        filter: drop-shadow(0 0 30px blue);
    }

    100% {
        transform: scale(1) rotate(360deg);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }
}

/* Utility classes for animation triggering */
.anim-pop-in {
    animation: popIn 0.8s forwards;
}

.anim-jump {
    animation: jump 0.5s;
}

.anim-shake {
    animation: shake 0.4s;
}

@keyframes sway {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-30px) rotate(-5deg);
    }

    50% {
        transform: translateX(30px) rotate(5deg);
    }

    75% {
        transform: translateX(-15px) rotate(-2deg);
    }

    100% {
        transform: translateX(0);
    }
}

.anim-rotate {
    animation: rotate90 0.5s;
}

.anim-wobble {
    animation: wobble 0.6s;
}

.anim-sway {
    animation: sway 0.6s;
}

.anim-special {
    animation: specialSpin 1s;
}

/* Back Button */
.back-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.2s;
    font-size: 28px;
    color: #4facfe;
    border: 4px solid #4facfe;
    font-weight: bold;
    cursor: pointer;
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 rgba(0, 0, 0, 0.1);
    color: #4facfe;
}

.back-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}