/* --- General Body and Theme Colors --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #E6E6FA; /* Light Purple - Lavender */
    color: #333;
    line-height: 1.6;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* --- Calculator Container --- */
.calculator-container {
    background-color: #FFFFFF; /* White */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
    margin: 20px; /* Margin for smaller screens */
}

h1 {
    color: #8A2BE2; /* Blue Violet - a vibrant purple */
    margin-bottom: 30px;
    font-size: 2em;
}

/* --- Input Groups --- */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #4B0082; /* Indigo - dark purple for labels */
}

.input-group input[type="number"] {
    width: calc(100% - 24px); /* Full width minus padding */
    padding: 12px;
    border: 1px solid #D8BFD8; /* Thistle - a soft light purple border */
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding in width calculation */
    transition: border-color 0.3s ease;
}

.input-group input[type="number"]:focus {
    border-color: #9370DB; /* Medium Purple on focus */
    outline: none;
    box-shadow: 0 0 0 2px rgba(147, 112, 219, 0.3); /* Soft glow */
}

/* --- Calculate Button --- */
#calculate-btn {
    background-color: #8A2BE2; /* Blue Violet */
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

#calculate-btn:hover {
    background-color: #6A0DAD; /* Darker Purple on hover */
    transform: translateY(-2px);
}

#calculate-btn:active {
    transform: translateY(0);
}

/* --- Result Area --- */
.result-area {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #D8BFD8; /* Thistle - light purple separator */
    text-align: left;
}

.result-area h2 {
    color: #4B0082; /* Indigo */
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px dashed #EEEFFD; /* Very light purple/blue for dashed lines */
}

.result-item:last-child {
    border-bottom: none; /* No border for the last item */
}

.result-item .label {
    font-weight: bold;
    color: #555;
}

.result-item .value {
    color: #8A2BE2; /* Blue Violet */
    font-weight: bold;
    font-size: 1.1em;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 500px) {
    .calculator-container {
        margin: 10px; /* Less margin on very small screens */
        padding: 20px;
        border-radius: 0; /* Optional: full width on very small devices */
        box-shadow: none; /* Optional: remove shadow on very small devices */
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    .input-group input[type="number"],
    #calculate-btn {
        font-size: 0.95em;
        padding: 12px;
    }

    .result-area h2 {
        font-size: 1.3em;
    }

    .result-item {
        flex-direction: column; /* Stack label and value vertically */
        align-items: flex-start;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .result-item .value {
        margin-top: 5px;
        font-size: 1em;
    }
}