body {
    margin: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
}

#game-area {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#collected-count {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 128, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 18px;
}

#shop {
    position: absolute;
    bottom: 20px;
    left: 130px;
    background-color: rgba(0, 128, 0, 0.8);
    color: white;
    padding: 5px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

.leaf {
    position: absolute;
    width: 70px;
    cursor: pointer;
    user-select: none;
    z-index: 1;
}

#shop-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 2;
    width: 400px;
    text-align: center;
}

#close-shop {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.shop-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.upgrade-card {
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.upgrade-card h3 {
    margin: 0;
    margin-bottom: 5px;
    color: #333;
}

.upgrade-card p {
    margin: 5px 0;
    color: #666;
}

.upgrade-card button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.upgrade-card button:hover {
    background-color: #218838;
}

#notifications {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.notification {
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    margin-top: 5px;
    border-radius: 5px;
    font-size: 14px;
    animation: fadeout 2s forwards;
}

@keyframes fadeout {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@media (max-width: 768px) {
    #collected-count {
        position: absolute;
        top: 87%;
        left: 10px;
        font-size: 16px;
    }

    #shop {
        top: 15px;
        left: 120px;
        font-size: 16px;
    }

    #notifications {
        position: fixed;
        bottom: 92%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #shop-modal {
        width: 300px;
        padding: 15px;
    }

    .upgrade-card {
        padding: 8px;
        margin-bottom: 8px;
    }

    .upgrade-card h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .upgrade-card p {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .upgrade-card button {
        font-size: 12px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    #collected-count {
        position: absolute;
        top: 92%;
        left: 10px;
        font-size: 14px;
    }

    #shop {
        top: 92%;
        left: 100px;
        font-size: 14px;
    }

    #notifications {
        position: fixed;
        bottom: 90%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #shop-modal {
        width: 250px;
        padding: 25px;
    }

    .upgrade-card {
        padding: 8px;
        margin-bottom: 1px;
    }

    .upgrade-card h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .upgrade-card p {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .upgrade-card button {
        font-size: 12px;
        padding: 4px 8px;
    }

    #shop-modal>h2 {
        font-size: 23px;
    }

}

@media (min-width: 414px) and (max-width: 896px) {
    #collected-count {
        position: absolute;
        top: 94%;
        left: 10px;
        font-size: 14px;
    }

    #shop {
        top: 94%;
        left: 100px;
        font-size: 14px;
    }

    #notifications {
        position: fixed;
        bottom: 92%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #shop-modal {
        width: 300px;
        padding: 15px;
    }

    .upgrade-card {
        padding: 8px;
        margin-bottom: 2px;
    }

    .upgrade-card h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .upgrade-card p {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .upgrade-card button {
        font-size: 16px;
        padding: 4px 8px;
    }
}

@media (min-width: 390px) and (max-width: 844px) {
    #collected-count {
        position: absolute;
        top: 2%;
        left: 10px;
        font-size: 14px;
    }

    #shop {
        top: 3%;
        left: 100px;
        font-size: 14px;
    }

    #notifications {
        position: fixed;
        bottom: 92%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #shop-modal {
        width: 300px;
        padding: 15px;
    }

    .upgrade-card {
        padding: 8px;
        margin-bottom: 2px;
    }

    .upgrade-card h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .upgrade-card p {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .upgrade-card button {
        font-size: 16px;
        padding: 4px 8px;
    }
}


@media (min-width: 768px) and (max-width: 1024px) {
    #collected-count {
        position: absolute;
        top: 94%;
        left: 10px;
        font-size: 18px;
    }

    #shop {
        top: 94%;
        left: 120px;
        font-size: 18px;
    }

    #notifications {
        position: fixed;
        bottom: 92%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .notification {
        background-color: rgba(255, 0, 0, 0.8);
        color: white;
        padding: 18px 12px;
        margin-top: 5px;
        border-radius: 5px;
        font-size: 17px;
        animation: fadeout 2s forwards;
    }

    #shop-modal {
        width: 550px;
        padding: 33px;
    }

    .upgrade-card {
        padding: 8px;
        margin-bottom: 8px;
    }

    .upgrade-card h3 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .upgrade-card p {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .upgrade-card button {
        font-size: 20px;
        padding: 4px 8px;
    }
}

#shop-modal>h2 {
    font-size: 32px;
}

#close-shop {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 15px 24px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 24px;
}

#close-shop {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 15px 24px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
}

@media (min-width: 1024px) and (max-width: 1366px) {
    #shop-modal {
        width: 350px;
        padding: 18px;
    }

    .upgrade-card {
        padding: 9px;
        margin-bottom: 9px;
    }

    .upgrade-card h3 {
        font-size: 15px;
        margin-bottom: 7px;
    }

    .upgrade-card p {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .upgrade-card button {
        font-size: 13px;
        padding: 5px 9px;
    }
}

@media (min-width: 1020px) and (max-width: 1368px) {
    #collected-count {
        position: absolute;
        top: 94%;
        left: 10px;
        font-size: 25px;
    }

    #shop {
        top: 94%;
        left: 150px;
        font-size: 25px;
    }

    #notifications {
        position: fixed;
        bottom: 92%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #shop-modal {
        width: 660px;
        padding: 40px;
    }

    .upgrade-card {
        padding: 8px;
        margin-bottom: 14px;
    }

    .upgrade-card h3 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .upgrade-card p {
        font-size: 22px;
        margin-bottom: 13px;
    }

    .upgrade-card button {
        font-size: 20px;
        padding: 12px 17px;
    }

    .notification {
        background-color: rgba(255, 0, 0, 0.8);
        color: white;
        padding: 25px 12px;
        margin-top: 5px;
        border-radius: 5px;
        font-size: 17px;
        animation: fadeout 2s forwards;
    }

    #close-shop {
        background-color: #d9534f;
        color: white;
        border: none;
        padding: 25px 30px;
        margin-bottom: 15px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 24px;
    }

    #shop-modal>h2 {
        font-size: 44px;
    }
}


@media (min-width: 390px) and (max-width: 844px) {
    #collected-count {
        position: absolute;
        top: 85%;
        left: 10px;
        padding-bottom: 150px;
        font-size: 14px;
    }

    #shop {
        top: 85%;
        left: 100px;
        font-size: 14px;
        padding-bottom: 150px;
    }

    #notifications {
        position: fixed;
        bottom: 92%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #shop-modal {
        width: 300px;
        height: 550px;
        padding: 15px;
    }

    .upgrade-card {
        padding: 8px;
        margin-bottom: 2px;
    }

    .upgrade-card h3 {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .upgrade-card p {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .upgrade-card button {
        font-size: 16px;
        padding: 4px 8px;
    }
    #shop-modal>h2 {
        font-size: 20px;
    }

    #close-shop {
        background-color: #d9534f;
        color: white;
        border: none;
        padding: 11px 12px;
        margin-bottom: 10px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 16px;
    }

    .upgrade-card button {
        font-size: 14px;
        padding: 4px 8px;
    }
}

