body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
    position: relative;
    min-height: 100vh;
}
.calculator-container {
    max-width: 800px;
    margin: auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.calculator-heading {
    text-align: center;
    color: #007bff;
    font-family: 'Poppins Marathi Bold', sans-serif;
    font-weight: bold;
}
.input-group {
    margin-bottom: 15px;
}
.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 5px;
}
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.calculate-button {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}
.calculate-button:hover {
    background-color: #0056b3;
}
.download-print-buttons {
    display: none;
    margin-top: 10px;
    display: flex;
    gap: 10px;
}
.download-pdf-button, .print-button {
    display: block;
    flex-grow: 1;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    text-align: center;
    text-decoration: none;
}
.download-pdf-button:hover, .print-button:hover {
    background-color: #0056b3;
}


#result-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 4px;
    display: none;
}
#result-container h3 {
    margin-top: 0;
    color: #28a745;
    text-align: center;
}
#result-container p {
    margin: 5px 0;
    text-align: center;
}
#calculation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
#calculation-table th, #calculation-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
#calculation-table th {
    background-color: #f0f0f0;
    text-align: center;
}
.print-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8em;
    padding: 5px;
    border-top: 1px solid #ddd;
    color: #777;
    background-color: #f4f4f4;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #result-container, #result-container * {
        visibility: visible;
    }
    #result-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: white;
        padding: 20px;
    }
    body::after {
        content: none !important; /* Remove body footer in print specifically */
    }
    .print-footer { /* Footer for print area */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        text-align: center;
        font-size: 0.8em;
        padding: 5px;
        border-top: 1px solid #ddd;
        color: #777;
        background-color: #f4f4f4;
        visibility: visible; /* Ensure footer is visible in print */
    }

}


/* Responsive adjustments */
@media (max-width: 600px) {
    .calculator-container {
        padding: 15px;
    }
    .calculator-heading {
        font-size: 1.5em;
    }
    .input-group label {
        font-size: 0.9em;
    }
    .input-group input, .input-group select {
        padding: 8px;
        font-size: 0.9em;
    }
    .calculate-button,  .download-pdf-button, .print-button {
        font-size: 0.9em;
    }
    .download-print-buttons {
        flex-direction: column;
    }
    .download-pdf-button, .print-button {
        width: 100%;
        flex-grow: 0;
    }
    #result-container {
        padding: 10px;
    }
    #result-container h3 {
        font-size: 1.1em;
    }
    #result-container p {
        font-size: 0.9em;
    }
}