#complex-calculator {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.form-group, .info-box {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* This will push the input to the right */

}
label {
    display: inline-block;
    margin-bottom: 5px;
    flex: 0 0 250px;
    padding-right: 10px;
    font-weight: bold;
}
select, input[type="number"], input[type="text"] {
    padding: 5px;
    margin-top: 5px;
}
select {
    width: calc(100% - 260px);
}
input[type="number"]#pieces, #kwh-value {
    width: 100px;
    margin-left: auto; /* This will push the input to the right */
}
#info-boxes {
    margin-bottom: 15px;
}
.info-box span {
    flex: 0 0 100px; /* Fixed width like other inputs */
    margin-left: auto; /* Push to the right */
    text-align: left; /* Keep text aligned left within the span */
}
button {
    width: auto;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 20px auto 0;
    display: block;
}
button:hover {
    background-color: #45a049;
}
#result-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.result-item {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between; /* This will push the value to the right */

}
.result-item label {
    font-weight: bold;
    margin-right: 10px;
}

/* Responsive design for smaller screens */
@media screen and (max-width: 600px) {
    #complex-calculator {
        padding: 10px;
    }
    .form-group, .info-box {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px; /* Increased margin */
    }
    label {
        flex: 0 0 auto;
        margin-right: 0;
        margin-bottom: 8px; /* Increased margin */
        width: 100%;
    }
    select, input[type="number"], input[type="text"] {
        width: 100%;
        padding: 8px 5px; /* Increased padding */
    }
    input[type="number"]#pieces, #kwh-value {
        padding: 8px 5px;
        margin-left: 0; /* Reset margin for mobile view */

    }
    .result-item {
        display: flex;
        flex-direction: column;
    }
    .result-item label {
        margin-bottom: 5px;
    }
    button {
        width: 100%;
        padding: 12px 20px; /* Increased padding */
    }
}