body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1, h2 {
    text-align: center;
    color: #5a4a42; /* Bakery brown */
}

#simulation-container {
    width: 95%;
    max-width: 800px; /* Max width for larger screens */
    margin: 20px auto;
    border: 1px solid #ccc;
    background-color: #fff;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

#beamCanvas {
    display: block; /* Remove extra space below canvas */
    width: 100%;   /* Make canvas responsive */
    height: auto; /* Maintain aspect ratio based on JS */
    background-color: #e0f2f7; /* Light blue background */
}

#results {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

#results p {
    margin: 8px 0;
    font-size: 1.1em;
}

#results span {
    font-weight: bold;
    color: #c62828; /* Red color for results */
}

#instructions {
    margin-top: 20px;
    font-size: 0.9em;
    color: #555;
    text-align: center;
    width: 90%;
    max-width: 600px;
}

/* Basic mobile first adjustments */
@media (min-width: 600px) {
    body {
        margin: 30px;
    }
    #results, #instructions {
        width: 80%;
    }
}