body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a; /* Dark theme background */
    color: #e0e0e0; /* Light text color */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #2c2c2c; /* Darker container background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 1000px;
    text-align: center;
}

h1, h2 {
    color: #4CAF50; /* Green accent color */
    margin-bottom: 20px;
}

/* New section for simulation controls */
.simulation-controls {
    margin-bottom: 30px;
}

.sliders {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.sliders > div {
    flex-basis: 30%;
    min-width: 250px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #bbb;
}

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    background: #555;
    border-radius: 5px;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

input[type="range"]:hover {
    opacity: 1;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

/* Action Buttons for switching views */
.action-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.action-button {
    background-color: #007bff; /* Blue accent for buttons */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.action-button:hover {
    background-color: #0056b3;
}

/* Simulation Area */
.simulation-area {
    margin-bottom: 30px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #1f1f1f;
    overflow: hidden; /* Ensure rays don't go outside */
    position: relative;
}

svg {
    display: block;
    margin: 0 auto;
}

/* Image Info Section */
.image-info-section, .quiz-section {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.image-info-section p, .quiz-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.image-info-section span {
    color: #FFD700; /* Gold color for values */
    font-weight: bold;
}

.solution-button, .quiz-button {
    background-color: #4CAF50; /* Green accent */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.solution-button:hover, .quiz-button:hover {
    background-color: #45a049;
}

/* Quiz Section specific styles */
.quiz .options {
    margin-top: 15px;
    text-align: left;
}

.quiz .options label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
}

.quiz .options input[type="radio"] {
    margin-right: 8px;
}

.question-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #555;
}

.question-item:last-child {
    border-bottom: none; /* No border for the last question */
    margin-bottom: 0;
    padding-bottom: 0;
}

.question-item p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.question-item .options label {
    font-size: 1em;
    margin-bottom: 5px;
    font-weight: normal;
}

.question-item .options input[type="radio"] {
    margin-right: 8px;
}

.question-result {
    font-weight: bold;
    margin-top: 10px;
}

/* Modal for Solution */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #3a3a3a; /* Dark background for modal content */
    margin: auto;
    padding: 20px; /* Reduced padding */
    border: 1px solid #555;
    width: 70%; /* Reduced width */
    max-width: 600px; /* Reduced max-width */
    border-radius: 10px;
    position: relative; /* For positioning the close button */
    color: #e0e0e0; /* Light text color */
    text-align: left;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001; /* Ensure content is on top of overlay */
}

.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute; /* Position relative to .modal-content */
    top: 10px;
    right: 20px;
    transition: color 0.2s ease; /* Smooth transition on hover */
}

.close-button:hover,
.close-button:focus {
    color: #e0e0e0;
    text-decoration: none;
    cursor: pointer;
}

#solutionContent h3 {
    color: #4CAF50;
    margin-top: 10px; /* Reduced margin-top for smaller spacing */
    margin-bottom: 5px; /* Reduced margin-bottom for smaller spacing */
}

#solutionContent p {
    margin-bottom: 5px; /* Reduced margin-bottom for tighter paragraphs */
    line-height: 1.4; /* Slightly reduced line height for compactness */
}

#solutionContent strong {
    color: #FFD700;
}

#solutionContent pre {
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto; /* Allow horizontal scrolling for code blocks */
    white-space: pre-wrap; /* Preserve whitespace and wrap text */
    word-wrap: break-word; /* Break long words */
}