body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    background-color: #f0f0f0;
}

h1, h2, h3 {
    text-align: center;
    color: #333;
}

.container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

#glCanvas {
    border: 1px solid black;
    cursor: crosshair;
    background-color: #ddd; /* Fallback */
    touch-action: none; /* Prevent default touch actions like scrolling */
}

#uiPanel {
    border: 1px solid #ccc;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    min-width: 250px; /* Minimum width for the panel */
    max-width: 300px;
}

#chargeList {
    list-style: none;
    padding: 0;
    max-height: 300px; /* Limit height and make scrollable */
    overflow-y: auto;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

#chargeList li {
    padding: 8px 5px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer; /* Indicate selectability */
    transition: background-color 0.2s;
}
#chargeList li:hover {
    background-color: #f5f5f5;
}
#chargeList li.selected {
    background-color: #e0e8ff;
    font-weight: bold;
}


#chargeList label {
    flex-grow: 1; /* Allow label to take space */
    white-space: nowrap;
}

#chargeList input[type="number"] {
    width: 60px;
    margin-left: auto; /* Push input to the right */
}
#chargeList button {
    padding: 2px 5px;
    font-size: 0.8em;
    cursor: pointer;
    background-color: #ffdddd;
    border: 1px solid #ffaaaa;
    border-radius: 3px;
}
#chargeList button:hover {
    background-color: #ffcccc;
}


button {
    padding: 8px 15px;
    margin: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #e7e7e7;
}

button:hover {
    background-color: #ddd;
}

p {
    font-size: 0.9em;
    color: #555;
    margin: 5px 0;
}