* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    padding: 40px 20px;
    min-height: 100vh;
}

.modal-trigger {
    display: block;
    margin: 0 auto 40px;
    padding: 15px 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-trigger:hover {
    background-color: #0056b3;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.active {
    display: block;
    opacity: 1;
}

.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    z-index: 1001;
    transition: transform 0.3s ease-in-out;
}

.modal-overlay.active .modal-container {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    z-index: 1002;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease-in-out;
}

.modal-close:hover {
    background-color: #f3f4f6;
}

.calculator-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.calculator-left {
    float: left;
    box-sizing: border-box;
    padding: 40px;
    min-height: 620px;
    width: 55%; 
    background-color: #fff;
}

.calculator-right {
    float: right;
    min-height: 620px;
    width: 45%; 
    background-color: #00425a; 
    color: #fff;
    text-align: center;
    display: block;
    position: relative;
}

.calculator-right::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00425a;
    border-radius: 0%;
    border-radius: 0 0 0 48px;
}

.results-content {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
    height: 100%;
    display: table-cell;
    vertical-align: middle;
    width: 100%;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 30px;
    position: relative;
}

.clear-all {
    position: absolute;
    right: 0;
    top: 5px;
    font-size: 14px;
    color: #6b7280;
    text-decoration: underline;
    cursor: pointer;
    border: none;
    background: none;
}

.clear-all:hover {
    color: #4a5568;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input[type="number"],
.input-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 16px;
    color: #2d3748;
    outline: none;
    transition: border-color 0.2s ease-in-out;
    box-sizing: border-box;
    background-color: #fff;
}

.input-wrapper input[type="number"]:focus,
.input-wrapper input[type="text"]:focus {
    border-color: #007bff;
}

.input-prefix,
.input-suffix {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #4a5568;
    pointer-events: none;
    background-color: #e2e8f0;
    padding: 0 15px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    z-index: 3;
}

.input-prefix {
    left: 0;
    width: 60px;
    justify-content: center;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-suffix {
    right: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}

.input-with-prefix input {
    padding-left: 70px; 
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    position: relative;
    z-index: 2;
    background-color: white;
}

.input-with-suffix input {
    padding-right: 55px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    position: relative;
    z-index: 2;
    background-color: white;
}

.input-group {
    position: relative;
    overflow: hidden; 
}

.input-group-item {
    float: left;
    width: calc(50% - 10px);
    margin-right: 20px;
    box-sizing: border-box;
}

.input-group-item:last-child {
    margin-right: 0;
}

.input-group-item .input-wrapper {
    display: block; 
}

.input-group-item .input-wrapper input {
    width: 100%;
    padding-left: 30px; 
}

.radio-group {
    margin-top: 20px;
}

.radio-option {
    position: relative;
    margin-bottom: 15px;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-option label {
    display: block;
    padding: 15px 20px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 16px;
    color: #2d3748;
    padding-left: 50px;
}

.radio-option label::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    background-color: #fff;
    box-sizing: border-box;
}

.radio-option input[type="radio"]:checked + label {
    border-color: #007bff;
    background-color: #e6f0ff;
}

.radio-option input[type="radio"]:checked + label::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #007bff;
}

.calculate-button {
    width: 100%;
    padding: 15px;
    background-color: #ffc107;
    color: #1a202c;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin-top: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.calculate-button:hover {
    background-color: #e0a800;
}

.calculate-button svg {
    margin-right: 10px;
    vertical-align: middle;
}

.calculator-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.results-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.results-content p {
    font-size: 16px;
    line-height: 1.5;
    color: #a0aec0;
}

.demo-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.demo-content h1 {
    font-size: 32px;
    color: #1a202c;
    margin-bottom: 20px;
    position: static;
}

.demo-content p {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .calculator-left,
    .calculator-right {
        width: 100%;
        float: none;
        padding: 30px;
        min-height: auto;
    }

    .calculator-right::before {
        border-radius: 0;
    }

    .results-content {
        display: block;
        table-cell: auto;
        vertical-align: top;
        min-height: 300px;
    }

    .input-group-item {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .input-group-item:last-child {
        margin-bottom: 0;
    }
}