   @import url('https://fonts.googleapis.com/css2?family=Fredoka+One:wght@400&family=Fredoka:wght@300;400;500&display=swap');

    * {
        box-sizing: border-box;
    }

    body {
        margin: 0; 
        padding: 0;
        font-family: 'Fredoka', cursive;
        background: linear-gradient(to bottom, #87CEEB, #98FB98, #F0E68C);
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }

    .clouds {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: -1;
    }

    .cloud {
        position: absolute;
        background: white;
        border-radius: 50px;
        opacity: 0.8;
        animation: float linear infinite;
    }

    .cloud:before {
        content: '';
        position: absolute;
        background: white;
        border-radius: 50px;
    }

    @keyframes float {
        0% { transform: translateX(-100px); }
        100% { transform: translateX(calc(100vw + 100px)); }
    }

    .container {
        height: 552px;
        width: 422px;
        position: relative;
        margin: 20px auto; 
        overflow: hidden;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        border-radius: 20px;
        border: 4px solid #8B4513;
    }

    canvas {
        height: 552px;
        width: 422px;
        display: block;
        background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 60%, #228B22 100%);
    }

    #scoreBoard {
        width: 420px;
        height: 60px;
        background: linear-gradient(45deg, #FFD700, #FFA500);
        position: absolute;
        top: -3px;
        left: 0;
        z-index: 1;	
        display: flex;
        justify-content: center;
        align-items: center;
        transition: transform 0.3s;
        border-radius: 15px 15px 0 0;
        border-bottom: 3px solid #FF8C00;
    }

    #scoreBoard.pulse {
        animation: pulse 0.5s;
    }

    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }

    #scoreBoard p {
        font-size: 24px;
        padding: 0;
        line-height: 47px;
        margin: 0;
        color: #8B4513;
        text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
        font-weight: 500;
    }

    #scoreBoard:before {
        content: '🍌 ';
        font-size: 20px;
    }

    #scoreBoard:after {
        content: ' 🍌';
        font-size: 20px;
    }

    #preloader {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #228B22, #32CD32);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 10;
        transition: opacity 0.5s;
        border-radius: 16px;
    }

    .loader {
        width: 80px;
        height: 80px;
        border: 8px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top: 8px solid #FFD700;
        animation: spin 1.5s linear infinite;
        margin-bottom: 20px;
    }

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

    #preloader p {
        color: white;
        font-size: 18px;
        margin-top: 10px;
        font-weight: 400;
    }

    #mainMenu, #gameOverMenu {
        height: 100%;
        width: 100%;
        text-align: center;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: linear-gradient(135deg, rgba(34, 139, 34, 0.95), rgba(50, 205, 50, 0.95));
        transition: opacity 0.5s, transform 0.5s;
        border-radius: 16px;
    }

    #gameOverMenu {
        visibility: hidden;
        opacity: 0;
        transform: translateY(20px);
        background: linear-gradient(135deg, rgba(139, 69, 19, 0.95), rgba(160, 82, 45, 0.95));
    }

    #gameOverMenu.visible {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    h2, h3, h1 {
        font-weight: normal; 
        margin: 10px 0;
        font-family: 'Fredoka One', cursive;
    }

    h1 {
        font-size: 40px; 
        color: #fff; 
        margin: 0px;
        text-shadow: 3px 3px 0 #228B22, 6px 6px 0 rgba(0,0,0,0.3);
        transform: translateY(-20px);
        animation: titleBounce 1s forwards;
    }

    h1:before {
        content: '🐵 ';
        font-size: 40px;
    }

    h1:after {
        content: ' 🐵';
        font-size: 40px;
    }

    @keyframes titleBounce {
        0% { transform: translateY(-20px); opacity: 0; }
        60% { transform: translateY(10px); opacity: 1; }
        100% { transform: translateY(0); opacity: 1; }
    }

    h3 {
        font-size: 16px;
        text-align: center;
        margin: 5px 0;
        color: #fff;
        opacity: 0;
        animation: fadeIn 0.5s 0.5s forwards;
        font-family: 'Fredoka', cursive;
        font-weight: 400;
    }

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

    .button {
        width: 160px;
        height: 50px;
        background: linear-gradient(to bottom, #FFD700, #FFA500);
        display: flex;
        justify-content: center;
        align-items: center;
        color: #8B4513;
        font-size: 18px;
        font-weight: 500;
        text-decoration: none;
        margin: 15px 0;
        border-radius: 25px;
        box-shadow: 0 6px 0 #FF8C00, 0 8px 12px rgba(0,0,0,0.3);
        transition: all 0.2s;
        opacity: 0;
        animation: fadeIn 0.5s 1s forwards;
        position: relative;
        overflow: hidden;
        font-family: 'Fredoka One', cursive;
    }

    .button:before {
        content: '🍌 ';
        font-size: 16px;
    }

    .button:after {
        content: ' 🍌';
        font-size: 16px;
    }

    .button:hover {
        transform: translateY(-3px);
        box-shadow: 0 9px 0 #FF8C00, 0 12px 15px rgba(0,0,0,0.4);
        background: linear-gradient(to bottom, #FFDF00, #FFB500);
    }

    .button:active {
        transform: translateY(2px);
        box-shadow: 0 3px 0 #FF8C00, 0 5px 8px rgba(0,0,0,0.3);
    }

    .info {
        position: absolute; 
       
        bottom: 20px; 
        margin: 0; 
        color: white;
        background: rgba(139, 69, 19, 0.8);
        padding: 15px;
        border-radius: 15px;
        opacity: 0;
        animation: fadeIn 0.5s 1.5s forwards;
        margin-left: 20px;
        font-family: 'Fredoka', cursive;
        font-weight: 400;
    }

    .key {
        width: 35px;
        height: 35px;
        background: linear-gradient(to bottom, #FFD700, #FFA500);
        text-indent: -9999px;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        margin: 0 5px;
        border-radius: 8px;
        box-shadow: 0 3px 0 #FF8C00;
        color: #8B4513;
        font-weight: bold;
        position: relative;
        top: -2px;
        font-family: 'Fredoka One', cursive;
    }

    .key:before {
        content: '';
        position: absolute;
        text-indent: 0;
        font-size: 16px;
    }

    .key.left:before {
        content: '←';
    }

    .key.right:before {
        content: '→';
    }

    .key.space:before {
        content: '⎵';
        font-size: 12px;
    }

    .particle {
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
        z-index: 3;
    }

    /* Vine decorations */
    .vine {
        position: absolute;
        width: 20px;
        height: 100%;
        background: repeating-linear-gradient(
            to bottom,
            #228B22 0px,
            #228B22 10px,
            #32CD32 10px,
            #32CD32 20px
        );
        border-radius: 10px;
        opacity: 0.6;
    }

    .vine.left {
        left: 10px;
        animation: sway 3s ease-in-out infinite;
    }

    .vine.right {
        right: 10px;
        animation: sway 3s ease-in-out infinite reverse;
    }

    @keyframes sway {
        0%, 100% { transform: rotate(0deg); }
        50% { transform: rotate(2deg); }
    }

    /* Mobile responsiveness */
    @media (max-height: 600px) {
        .container {
            transform: scale(0.8);
        }
    }

    @media (max-width: 450px) {
        .container {
            transform: scale(0.9);
        }
        
        h1 {
            font-size: 36px;
        }
    }
