body {
    width: 100%;
    margin: 0;
    background-color: #b0d3ff;
    text-align: center;
    overflow: auto;
}

#tools {
    border: 3px solid #b3b3b3;
    background-color: #ececec;
    border-style: inset;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
    width: fit-content;
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translate(-50%, -50%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

.tool {
    padding: 2px;
    font-size: 2em;
}

.effect:hover {
    transform: scale(1.2);
    cursor: grab;
}

.adding:hover {
    transform: scale(1.2);
    cursor: crosshair;
}

.grow {
    font-size: 1em;
    width: fit-width;
    padding: 10px;
}

#instructions {
    text-align: center;
    font-size: 1.3em;
    margin: 20px;
}

/* Style for when dragging over a target */
.drop-hover, .grown.drop-hover, .populated.drop-hover {
    transform: scale(1.1);
    /*box-shadow: 0 0 10px rgba(0,0,0,0.3);*/
    border: 2px solid #acff6d;
}

/* Style for grown elements */
.grown {
    border: 2px dashed #0000ff;
    text-shadow: none;
    transition: all 0.3s ease;
    color: #0000ff;
    padding: 10px;
    margin: 10px auto;
}

.populated {
    border: 0px;
    text-shadow: none;
    display: block;
}

.populated-header-styled {
    font-size: 2em;
}

.populated-content-styled {
    font-family: Arial, Helvetica, sans-serif;
}

#code {
    position: fixed;
    z-index: -2;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    font-size: 1em;
    text-align: center;
    text-shadow: 0 0 3px rgba(172, 255, 109, 0.9);
    padding: 20px;
    box-sizing: border-box;
}

#grow-area {
    /*border: 2px dashed #0000ff;*/
    padding: 40px;
    margin: 10px auto;
    display: block;
    width: 60%;
}

/*#structure {
    width: 75%;
    margin: 0 auto;
}*/

/* Mobile styles - for screens 768px and smaller */
@media screen and (max-width: 768px) {
    .tool {
        padding: 10px;  /* Larger touch target */
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .ui-draggable-dragging {
        touch-action: none;
    }

    /* Remove hover effects, replace with touch feedback */
    .effect:hover, .adding:hover {
        transform: none;
    }

    .tool:active {
        transform: scale(0.95);
        background-color: rgba(0,0,0,0.1);
    }

    /* Adjust tool container for mobile */
    #tools {
        left: 10%;  /* Move it more towards center */
        padding: 5px;
    }

    /* Make grow area wider on mobile */
    #grow-area {
        width: 80%;
    }

    /* Larger text for mobile */
    #instructions {
        font-size: 1.1em;
        margin: 15px;
    }
}