:root {
    --primary-color: #007bff; /* Blue color */
    --background-color: #f7f7f7;
    --card-background: #ffffff;
    --text-color: #3a3a3a;
    --label-color: #666;
    --border-color: #ced4da;
    --result-bg-color: #f9f9f9;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    --border-radius: 8px;
}

.u-value-converter-container {
    width: 100%;
    max-width: 600px; /* More compact width */
    background: var(--card-background);
    padding: 25px 30px; /* Reduced padding */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 20px auto; /* Centered with some margin */
    box-sizing: border-box; /* Ensures padding is included in width */
    font-family: 'Lato', sans-serif; /* Fallback for fonts not loaded by plugin */
    color: var(--text-color);
}

.u-value-converter-header {
    text-align: center;
    margin-bottom: 25px; /* Reduced margin */
}

.u-value-converter-container h1 {
    margin: 0 0 8px 0;
    font-size: 1.6rem; /* Smaller font size */
    font-weight: 700;
    color: var(--text-color);
}

.u-value-converter-header p {
    margin: 0;
    color: var(--label-color);
    font-size: 0.95rem; /* Slightly smaller */
}

/* Segmented Control Styling */
.u-value-converter-mode-selector {
    display: flex;
    width: 100%;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 25px;
}

.u-value-converter-mode-button {
    flex: 1;
    padding: 10px 15px; /* Reduced padding */
    border: none;
    background-color: #f1f1f1;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem; /* Smaller font size */
    font-weight: 700;
    color: var(--label-color);
    transition: background-color 0.3s, color 0.3s;
    outline: none;
}

.u-value-converter-mode-button:first-child {
    border-right: 1px solid var(--border-color);
}

.u-value-converter-mode-button.active {
    background-color: var(--primary-color);
    color: white;
}

/* Input Field Styling */
.u-value-converter-field-group {
    margin-bottom: 20px;
}

.u-value-converter-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--label-color);
    font-size: 0.95rem;
}

.u-value-converter-input-field {
    width: 100%;
    padding: 10px 12px; /* Reduced padding */
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.u-value-converter-input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); /* Shadow matches blue */
}

.u-value-converter-input-field::-webkit-inner-spin-button,
.u-value-converter-input-field::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.u-value-converter-input-field {
    -moz-appearance: textfield;
}

/* Result Box Styling */
.u-value-converter-result-box {
    background-color: var(--result-bg-color);
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--primary-color);
    padding: 15px; /* Reduced padding */
    border-radius: var(--border-radius);
    margin-top: 10px;
    text-align: center;
}

.u-value-converter-result-box .u-value-converter-result-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--label-color);
    margin: 0 0 5px 0;
}
    
.u-value-converter-result-box .u-value-converter-result-value {
    font-size: 2rem; /* Smaller result font */
    font-weight: 700;
    color: var(--text-color);
    min-height: 40px; /* Ensures consistent height */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Copy Button */
.u-value-converter-copy-button {
    display: inline-block;
    width: 100%;
    padding: 11px 15px; /* Reduced padding */
    margin-top: 20px; /* Reduced margin */
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.u-value-converter-copy-button:hover {
    background-color: #0069d9; /* Darker blue on hover */
}

.u-value-converter-copy-button:active {
    transform: scale(0.98);
}

/* Responsive Design */
@media (max-width: 480px) {
    .u-value-converter-container {
        padding: 20px;
    }
    .u-value-converter-container h1 {
        font-size: 1.4rem;
    }
}