body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #e0e6eb; /* Light background color */
    padding: 20px;
    box-sizing: border-box;
}

.calculator-container {
    width: 800px; 
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden; 
    position: relative; 
}

.calculator-form-section {
    float: left; 
    width: 55%; 
    padding: 30px;
    box-sizing: border-box;
}

.calculator-header {
    overflow: hidden; 
    margin-bottom: 25px;
}

.calculator-header h2 {
    float: left;
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.clear-all-btn {
    float: right;
    background: none;
    border: none;
    color: #6a7c8d;
    font-size: 0.9em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.clear-all-btn:hover {
    background-color: #f0f0f0;
}

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

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

.input-with-icon,
.input-with-text {
    position: relative;
    width: 100%;
}

.input-with-icon input,
.input-with-text input {
    width: calc(100% - 2px); /* Full width minus border */
    padding: 12px 15px;
    border: 1px solid #d0d7de;
    border-radius: 5px;
    font-size: 1em;
    color: #333;
    box-sizing: border-box;
    padding-left: 40px; /* Space for currency icon */
}

.input-with-text input {
    padding-right: 60px; /* Space for unit text */
    padding-left: 15px; /* No icon on left */
}

.currency-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a7c8d;
    font-weight: 700;
}

.unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a7c8d;
    font-size: 0.9em;
}

.form-group-row {
    overflow: hidden; /* Clear floats */
    margin-bottom: 20px;
}

.form-group-row .form-group {
    float: left;
    width: 48%; /* Roughly half width */
    margin-right: 4%; /* Space between */
    margin-bottom: 0; /* Override default margin */
}

.form-group-row .form-group.rate {
    margin-right: 0; /* No right margin for the last item */
}

.radio-group {
    border: 1px solid #d0d7de;
    border-radius: 5px;
    overflow: hidden; /* For inner borders */
}

.radio-option {
    padding: 12px 15px;
    border-bottom: 1px solid #d0d7de;
    display: block; /* Ensure each option takes full width */
    cursor: pointer;
}

.radio-option:last-child {
    border-bottom: none;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
    vertical-align: middle;
    /* Custom radio button styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #6a7c8d;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
    top: -1px; /* Adjust vertical alignment */
}

.radio-option input[type="radio"]:checked {
    background-color: #007bff; /* Blue dot when checked */
    border-color: #007bff;
}

.radio-option input[type="radio"]:checked::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-option label {
    display: inline-block; /* Align label with radio button */
    font-size: 1em;
    color: #333;
    cursor: pointer;
    margin-bottom: 0; /* Override default label margin */
    font-weight: 400;
}

.calculate-btn {
    background-color: #ffe812; /* Yellow button */
    color: #333;
    padding: 15px 25px;
    border: none;
    border-radius: 25px; /* Rounded button */
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    margin-top: 25px;
    display: block; /* Ensures it takes full width */
    text-align: center;
    box-shadow: 0 5px 10px rgba(255, 232, 18, 0.3); /* Subtle shadow */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.calculate-btn:hover {
    background-color: #f0d500;
    box-shadow: 0 7px 15px rgba(255, 232, 18, 0.4);
}

.calculator-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calculator"><rect x="2" y="4" width="20" height="16" rx="2" ry="2"></rect><line x1="8" y1="8" x2="16" y2="8"></line><line x1="8" y1="12" x2="16" y2="12"></line><line x1="8" y1="16" x2="16" y2="16"></line></svg>'); /* Calculator icon SVG */
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    margin-right: 8px;
}

.calculator-results-section {
    float: right; 
    width: 45%; 
    background-color: #1a334d; 
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    padding: 30px;
    box-sizing: border-box;
    display: flex; /* Use flex for centering content */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 490px; /* Ensure it matches the height of the form section */
    border-radius: 0 0 0 48px;
}

.results-content {
    color: #ffffff;
    padding: 20px;
}

.results-illustration {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px auto;
    /* Updated SVG for the illustration to match the design mockup more closely */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><rect x="0" y="0" width="200" height="200" fill="none"/><path d="M70 40 L160 40 L160 160 L70 160 Z" fill="#3a5f80" stroke="#a0b0c0" stroke-width="2" stroke-linejoin="round"/><path d="M130 30 L170 30 L170 150 L130 150 Z" fill="#3a5f80" stroke="#a0b0c0" stroke-width="2" stroke-linejoin="round"/><circle cx="150" cy="170" r="15" fill="#ffe812" stroke="#a0b0c0" stroke-width="2"/><circle cx="80" cy="170" r="15" fill="#ffe812" stroke="#a0b0c0" stroke-width="2"/><path d="M75 55 L155 55" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="M75 75 L155 75" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="M75 95 L155 95" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="M75 115 L155 115" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="M75 135 L155 135" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="M120 100 L140 100 L140 120 L120 120 Z" fill="#ffe812"/><path d="M100 100 L110 100 L110 110 L100 110 Z" fill="#fff"/><circle cx="105" cy="105" r="3" fill="#1a334d"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.results-content h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 500;
}

.results-content p {
    font-size: 0.9em;
    line-height: 1.5;
    color: #a0b0c0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calculator-container {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .calculator-form-section,
    .calculator-results-section {
        float: none;
        width: 100%;
        border-radius: 0;
    }

    .calculator-results-section {
        min-height: 300px; /* Adjust height for smaller screens */
        border-top-right-radius: 0;
        border-bottom-left-radius: 15px; /* Round bottom left for mobile */
    }

    .form-group-row .form-group {
        float: none;
        width: 100%;
        margin-right: 0;
    }
}
