/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 10px;
}

.container > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Form Styles */
#scpi-simulator {
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    background-color: #fafafa;
}

legend {
    font-weight: bold;
    color: #0056b3;
    padding: 0 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important for padding and width */
}

button#calculateBtn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button#calculateBtn:hover {
    background-color: #0056b3;
}

/* Results Styles */
.hidden {
    display: none;
}

#results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 20px;
}

.result-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.result-card h2 {
    margin-top: 0;
    color: #0056b3;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.result-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-card li {
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
    border-bottom: 1px solid #f0f0f0;
}

.result-card li:last-child {
    border-bottom: none;
}

.result-card .label {
    color: #555;
}

.result-card .value {
    font-weight: bold;
}

.positive {
    color: #28a745; /* Green */
}

.negative {
    color: #dc3545; /* Red */
}

.summary {
    grid-column: 1 / -1; /* Span all columns */
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1em;
}

.summary.positive {
    background-color: #e9f7ec;
    border: 1px solid #a7d7b5;
}

.summary.negative {
    background-color: #fdecea;
    border: 1px solid #f5b0b0;
}

/* Details Table Styles */
#details-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.details-table h3 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 5px;
}

.details-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.details-table th, .details-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: right;
}

.details-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

.details-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.details-table tbody tr:hover {
    background-color: #f1f1f1;
}
