/* ===== 单位换算 ===== */
.uc-hero {
    background: linear-gradient(160deg, #f5f3ff 0%, #eef2ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 26px;
    box-shadow: 0 12px 36px rgba(99, 102, 241, .08);
}

.uc-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.uc-logo {
    font-size: 28px;
    background: #e0e7ff;
    border-radius: 14px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uc-title {
    font-size: 20px;
    font-weight: 800;
    color: #3730a3;
}

.uc-sub {
    font-size: 13px;
    color: #a5b4fc;
}

.uc-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.uc-cat {
    border: 1px solid #e0e7ff;
    background: #fff;
    color: #6366f1;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.uc-cat:hover {
    border-color: #6366f1;
}

.uc-cat.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

.uc-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.uc-input-row input {
    flex: 1;
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    outline: none;
    background: #fff;
    color: #1e293b;
    transition: border-color .2s;
}

.uc-input-row input:focus {
    border-color: #818cf8;
}

.uc-input-row select {
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
}

.uc-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.uc-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    padding: 20px;
}

.uc-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all .2s;
}

.uc-row:hover {
    border-color: #818cf8;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .12);
    transform: translateY(-1px);
}

.uc-rv {
    font-size: 17px;
    font-weight: 800;
    color: #312e81;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.uc-ru {
    font-size: 12px;
    color: #94a3b8;
}

.uc-copy {
    align-self: flex-start;
    font-size: 11px;
    color: #818cf8;
    margin-top: 4px;
    opacity: 0;
    transition: opacity .2s;
}

.uc-row:hover .uc-copy {
    opacity: 1;
}

.uc-note {
    margin-top: 14px;
    font-size: 12px;
    color: #a5b4fc;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .uc-hero { padding: 20px 14px; }
    .uc-input-row { flex-direction: column; }
}

/* ===== 深色模式 ===== */
[data-theme="dark"] .uc-hero {
    background: linear-gradient(160deg, #1e1b4b 0%, #172554 100%);
    border-color: rgba(199, 210, 254, 0.16);
}
[data-theme="dark"] .uc-title { color: #eef2ff; }
[data-theme="dark"] .uc-sub,
[data-theme="dark"] .uc-note { color: #a5b4fc; }
[data-theme="dark"] .uc-row {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(199, 210, 254, 0.16);
}
[data-theme="dark"] .uc-rv { color: #c7d2fe; }
[data-theme="dark"] .uc-ru { color: #94a3b8; }
[data-theme="dark"] .uc-empty { color: #818cf8; }
[data-theme="dark"] .uc-cat {
    background: rgba(255, 255, 255, 0.06);
    color: #a5b4fc;
    border-color: rgba(199, 210, 254, 0.20);
}
[data-theme="dark"] .uc-cat:hover { background: rgba(99, 102, 241, 0.16); }
[data-theme="dark"] .uc-cat.active { background: #6366f1; color: #fff; border-color: #6366f1; }
[data-theme="dark"] .uc-input-row input,
[data-theme="dark"] .uc-input-row select {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border-color: rgba(199, 210, 254, 0.20);
}
[data-theme="dark"] .uc-input-row input::placeholder { color: rgba(226, 232, 240, 0.4); }
[data-theme="dark"] .uc-logo { background: rgba(99, 102, 241, 0.18); }
