body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
}

#calculator-app {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

button[type="submit"], #start-over {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

button[type="submit"]:hover, #start-over:hover {
    background-color: #4cae4c;
}

#start-over {
    background-color: #f0ad4e;
    margin-bottom: 30px; /* Add space below start over button */
}

#start-over:hover {
    background-color: #ec971f;
}

#results-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.result-page {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ccc;
}

.result-page:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#projectionTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#projectionTable th, #projectionTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: right;
}

#projectionTable th {
    background-color: #f2f2f2;
    text-align: center;
}

.options-container {
    display: flex;
    gap: 20px; /* Space between the boxes */
    margin-top: 20px;
}

.option-box {
    flex: 1; /* Each box takes equal space */
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.option-box h3 {
    margin-top: 0;
    font-size: 1.1em;
    text-align: left;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.option-box p {
    margin: 8px 0;
    font-size: 0.95em;
}

.option-box span {
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .options-container {
        flex-direction: column; /* Stack boxes vertically on small screens */
    }
    #calculator-app {
        padding: 15px;
    }
    h1 {
        font-size: 1.5em;
    }
}

/* Add styles for the button container */
.button-container {
    display: flex;
    gap: 10px; /* Space between buttons */
    margin-bottom: 30px; /* Space below buttons */
}

/* Make buttons in the container share width */
.button-container button {
    flex: 1; /* Each button takes equal space */
    width: auto; /* Override the 100% width */
    margin-top: 0; /* Remove default top margin */
}

/* Style for the print button */
#print-results {
    background-color: #5bc0de;
}

#print-results:hover {
    background-color: #31b0d5;
}

/* Print-specific styles */
@media print {
    body {
        margin: 0;
        background-color: #fff;
    }
    #calculator-app {
        max-width: none;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }
    .no-print {
        display: none !important; /* Hide elements marked with .no-print */
    }
    .result-page {
        border-bottom: none; /* Remove dashed lines for printing */
        margin-bottom: 20px;
        page-break-inside: avoid; /* Try to keep each result page together */
    }
    .options-container {
        page-break-inside: avoid; /* Try to keep option boxes together */
    }
    h1, h2, h3 {
        text-align: left;
    }
}
