body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 95vh; /* Ensure viewport height */
    background-color: #f0f0f0;
    font-family: sans-serif;
    margin: 0;
    overflow: hidden; /* Prevent body scrollbars if container is large */
}

.physics-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    display: flex;
    flex-direction: column;
    /* max-width: 600px; Set max width if needed */
    /* width: 90%; */
}

h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 5px;
}

p {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

#physics-world {
    width: 500px; /* Adjust as needed */
    height: 350px; /* Adjust as needed */
    border: 1px solid #ccc;
    background-color: #e0e0e0; /* Fallback background */
    margin: 0 auto 10px auto; /* Center the world */
    position: relative; /* Needed for Matter.js canvas positioning */
    cursor: crosshair;
}

#status {
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #888;
    min-height: 1.2em;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 15px; /* Row and column gap */
    padding: 10px;
    border-top: 1px solid #eee;
}

.controls label {
    font-size: 0.9rem;
    color: #555;
}

.controls input[type="range"] {
    width: 100px; /* Smaller sliders */
    cursor: pointer;
    vertical-align: middle;
}

.controls output {
    font-size: 0.85rem;
    font-weight: bold;
    color: #333;
    min-width: 30px;
    text-align: right;
}

#clearButton {
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    background-color: #ffc107;
    color: #333;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

#clearButton:hover {
    background-color: #e0a800;
}

/* Matter.js canvas styling if needed */
#physics-world canvas {
    display: block; /* Remove potential extra space below canvas */
    background-color: #f0f8ff; /* Ensure canvas bg matches options */
}