/* Unit Converter Stylesheet */
.uc-wrapper {
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.uc-container {
    background: #ffffff;
    padding: 24px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 320px; /* Locked narrow for AdSense space */
    box-sizing: border-box;
}

.uc-container h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #1e293b; /* Slate Dark */
    margin-bottom: 16px;
    text-align: center;
    font-weight: 800;
}

/* Pill Button Navigation */
.uc-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.uc-cat-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.uc-cat-btn.active {
    background: #4f46e5; /* Indigo */
    color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.uc-cat-btn:hover:not(.active) {
    background: #e2e8f0;
    color: #1e293b;
}

.uc-input-group {
    margin-bottom: 16px;
    text-align: left;
}

.uc-input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.uc-input-group input,
.uc-input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.uc-input-group input:focus,
.uc-input-group select:focus {
    outline: none;
    border-color: #4f46e5; /* Indigo Focus */
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background: #ffffff;
}

.uc-result-box {
    margin-top: 16px; /* Tightened space since button is gone */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    background: #eef2ff; /* Light Indigo Tint */
    border: 1px solid #c7d2fe;
    display: none; 
}

.uc-result-box h3 {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #4338ca;
    letter-spacing: 0.05em;
}

.uc-result-main {
    margin: 10px 0 2px 0;
    font-size: 2rem;
    font-weight: 900;
    color: #312e81;
    word-break: break-all; /* Prevents long decimals from overflowing */
}

.uc-result-label {
    margin: 0 0 15px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #4f46e5;
}

.uc-breakdown {
    border-top: 1px solid #a5b4fc;
    padding-top: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: #3730a3;
}

.uc-equation {
    font-family: monospace;
    font-size: 0.9rem;
    background: #ffffff;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #c7d2fe;
    color: #1e293b;
}