body {
    font-family: sans-serif;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    line-height: 1.6;
    color: #333;
}

h1 { margin-bottom: 0.5rem; }

.container {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.form-group { margin-bottom: 1rem; }

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

input[type="number"], input[type="file"] {
    width: 100%;
    padding: 0.6rem;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
}

button {
    flex: 1;
    background: #007bff;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

button:hover { background: #0056b3; }
button:disabled { background: #ccc; cursor: not-allowed; }

#downloadBtn {
    background: #28a745;
}
#downloadBtn:hover { background: #218838; }
#downloadBtn:disabled { background: #ccc; }

#status {
    margin-top: 1rem;
    font-weight: bold;
    color: #555;
    text-align: center;
    min-height: 1.6em;
}

/* 3D Viewer */
#viewer-container {
    width: 100%;
    height: 500px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

canvas { display: none; }
#viewer-container canvas { display: block; } /* Show only Three.js canvas */