/* Unit Converter Styles — scoped under #unit-converter-app */
#unit-converter-app {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    margin: 0 auto;
}

#unit-converter-app .main-container {
    width: 100%;
    margin: 60px auto;
}

#unit-converter-app .glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

#unit-converter-app .header-section h1 {
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
    font-size: 3rem;
}

#unit-converter-app .header-section p {
    font-size: 1.1rem;
}

/* Category tab strip */
#unit-converter-app .cat-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 4px;
    margin-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#unit-converter-app .cat-tabs::-webkit-scrollbar {
    height: 4px;
}

#unit-converter-app .cat-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#unit-converter-app .cat-tab {
    flex: 0 0 auto;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: #f1f5f9;
    color: #64748b;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 44px;
}

#unit-converter-app .cat-tab:hover {
    background: #e2e8f0;
    color: #1f2937;
}

#unit-converter-app .cat-tab.active {
    background: #4f46e5;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Conversion inputs row */
#unit-converter-app .conversion-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#unit-converter-app .conversion-row .input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#unit-converter-app .conversion-row label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

#unit-converter-app .conversion-row input,
#unit-converter-app .conversion-row select {
    min-height: 44px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 8px 14px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

#unit-converter-app .conversion-row input:focus,
#unit-converter-app .conversion-row select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

#unit-converter-app .conversion-row input {
    -moz-appearance: textfield;
}

#unit-converter-app .conversion-row input::-webkit-outer-spin-button,
#unit-converter-app .conversion-row input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Swap button */
#unit-converter-app .swap-btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    color: #4f46e5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    margin-top: 22px;
    padding: 0;
}

#unit-converter-app .swap-btn:hover {
    background: #f8fafc;
    border-color: #4f46e5;
    transform: scale(1.1);
}

#unit-converter-app .swap-btn:active {
    transform: scale(0.95);
}

/* Formula display */
#unit-converter-app .formula-display {
    text-align: center;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 12px;
    font-weight: 500;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Flash animation on result field */
#unit-converter-app .flash {
    animation: flashAnim 0.6s ease-out;
}

@keyframes flashAnim {
    0% { background-color: #fef9c3; border-color: #facc15; }
    100% { background-color: #fff; border-color: #e2e8f0; }
}

/* Copy button */
#unit-converter-app .copy-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    margin-top: 4px;
    margin-bottom: 16px;
}

#unit-converter-app .copy-btn:hover {
    background: #f8fafc;
    border-color: #4f46e5;
}

#unit-converter-app .copy-btn.copied {
    background: #ecfdf5;
    border-color: #10b981;
    color: #10b981;
}

/* Conversion table */
#unit-converter-app .cvt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-top: 8px;
}

#unit-converter-app .cvt-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
}

#unit-converter-app .cvt-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

#unit-converter-app .cvt-table tr:nth-child(even) td {
    background: #fafbfc;
}

#unit-converter-app .cvt-table tr:hover td {
    background: #eef2ff;
}

#unit-converter-app .cvt-table .cvt-unit {
    font-weight: 600;
    color: #1f2937;
}

#unit-converter-app .cvt-table .cvt-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #4f46e5;
    font-weight: 500;
}

/* Section label */
#unit-converter-app .section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-top: 16px;
    margin-bottom: 8px;
}

/* Footer */
#unit-converter-app .footer {
    margin-top: 60px;
    padding-bottom: 40px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* Mobile-first responsive */
@media (max-width: 767.98px) {
    #unit-converter-app .main-container {
        margin: 30px auto;
        padding: 0 15px;
    }

    #unit-converter-app .glass-card {
        padding: 25px;
    }

    #unit-converter-app .header-section h1 {
        font-size: 2rem;
    }

    #unit-converter-app .conversion-row {
        gap: 8px;
    }

    #unit-converter-app .swap-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-top: 20px;
    }

    #unit-converter-app .footer {
        margin-top: 30px;
        padding-bottom: 20px;
    }

    #unit-converter-app .cat-tab {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}