@import url('https://fonts.googleapis.com/css2?family=Titan+One&family=Fredoka:wght@400;700&display=swap');

body {
    font-family: 'Fredoka', sans-serif;
}

.jungle-font {
    font-family: 'Titan One', cursive;
}

/* River Parallax */
.river-pattern {
    background: radial-gradient(circle at 50% 50%, #0ea5e9, #0284c7);
}

.wave-layer {
    position: absolute;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDUwIDIwIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMjU1LDI1NSwyNTUsMC4yKSIgc3Ryb2tlLXdpZHRoPSIyIj48cGF0aCBkPSJNTAgMTAgQTI1IDEwIDAgMCAxIDUwIDEwIiBmaWxsPSJub25lIi8+PC9zdmc+');
    opacity: 0.3;
}

.wave-1 {
    animation: flow 8s linear infinite;
    top: 10%;
}

.wave-2 {
    animation: flow 12s linear infinite reverse;
    top: 40%;
    opacity: 0.2;
}

.wave-3 {
    animation: flow 6s linear infinite;
    top: 70%;
}

@keyframes flow {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Log Bobbing */
@keyframes bob {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(5px) rotate(1deg);
    }
}

.log-btn {
    width: 120px;
    height: 60px;
    background: #5d4037;
    border: 4px solid #3e2723;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Titan One', cursive;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
    user-select: none;
    pointer-events: auto;
    position: relative;
    /* Wood texture */
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.1) 10px, rgba(0, 0, 0, 0.1) 20px);

    animation: bob 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

.log-btn:hover {
    transform: scale(1.05);
    background-color: #6d4c41;
}

.log-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

/* Improved Tiger Jump */
@keyframes jump {
    0% {
        transform: translate(-50%, 0) scale(1) rotate(0);
    }

    20% {
        transform: translate(-50%, 20px) scale(1.1, 0.9);
    }

    /* Anticipate */
    50% {
        transform: translate(-50%, -180%) scale(0.9, 1.1) rotate(360deg);
    }

    /* High jump with spin */
    80% {
        transform: translate(-50%, 0) scale(1.1, 0.9);
    }

    /* Land squish */
    100% {
        transform: translate(-50%, 0) scale(1) rotate(360deg);
    }
}

.animate-jump {
    animation: jump 0.8s cubic-bezier(0.45, 0, 0.55, 1);
}

/* Intro Float for logs */
@keyframes floatUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.log-enter {
    animation: floatUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.hidden {
    display: none !important;
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}