/* ======= 体积单位换算器样式 ======= */

.tool-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-light);
}

.tool-title-wrapper i {
    font-size: 2rem;
    color: var(--primary-color);
}

.tool-title-wrapper .tool-title {
    margin-bottom: 0;
    border-bottom: none;
}

/* 数值输入 */
.vc-input-row input.form-input {
    font-size: 26px;
    font-weight: 600;
    text-align: center;
    padding: 14px 16px;
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.5px;
}

/* 换算行：源单位 | 交换 | 目标单位 */
.vc-convert-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: end;
    margin: 14px 0;
}

.vc-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vc-label,
.vc-opt-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
        linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    padding-right: 32px;
}

.form-select:hover,
.form-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.vc-swap-btn {
    min-width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 18px;
}

/* 选项行 */
.vc-options-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.vc-digits {
    width: auto;
    min-width: 100px;
}

/* 换算结果 */
.vc-result-box {
    margin: 6px 0 4px;
    padding: 20px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.vc-result-main {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.2;
    word-break: break-all;
}

.vc-result-unit {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 8px;
}

.vc-result-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* 错误提示 */
.error-tip {
    min-height: 20px;
    margin: 4px 0;
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* 全单位速查表 */
.vc-all-section {
    margin-top: 18px;
}

.vc-all-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.vc-all-tip {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.vc-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.vc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 460px;
}

.vc-table th {
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.vc-table td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
}

.vc-table tr:last-child td {
    border-bottom: none;
}

.vc-table tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.015);
}

.vc-unit-cell {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
}

.vc-value-cell {
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--text-primary);
    word-break: break-all;
}

.vc-copy-cell {
    text-align: right;
    white-space: nowrap;
}

.vc-copy-btn {
    padding: 4px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.vc-copy-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--primary-light);
}

/* 响应式 */
@media (max-width: 640px) {
    .vc-convert-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .vc-swap-btn {
        width: 100%;
        height: 40px;
        transform: rotate(90deg);
    }

    .vc-result-main {
        font-size: 30px;
    }
}
