html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    overflow: hidden; /* Prevent scrollbars */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f0f0;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #fff;
    cursor: crosshair;
}

#toolbar {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    gap: 5px;
    padding: 5px;
}

.toolbar-btn {
    background-color: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333; /* Icon color */
}

.toolbar-btn.active {
    background-color: #cce5ff; /* A light blue to indicate active state */
    color: #007bff;
}

.toolbar-btn:hover {
    background-color: #e0e0e0;
}

.toolbar-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    background-color: transparent;
}

.toolbar-btn svg {
    width: 24px;
    height: 24px;
}

/* Hide the file input, but keep it accessible for the label */
#imageLoader,
#importMesh {
    display: none;
}

.separator {
    width: 1px;
    background-color: #ccc;
    margin: 4px 8px;
}

#notification {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(220, 53, 69, 0.9); /* A bootstrap-like danger red */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    pointer-events: none; /* So it doesn't block mouse events */
}

#notification.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% from the top and centered */
    padding: 20px 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    position: relative;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.modal-content h3 { margin-top: 20px; margin-bottom: 10px; }
.modal-content ul, .modal-content ol { padding-left: 20px; }
.modal-content li { margin-bottom: 8px; }
.modal-content code {
    background-color: #eee;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

@keyframes fadeIn { from {opacity: 0} to {opacity: 1} }